Re: Database Server based on SQL database
- From: "Alexander Nickolov" <agnickolov@xxxxxxxx>
- Date: Mon, 20 Nov 2006 10:51:23 -0800
Well, for starters you conveniently omitted security from the
requirements. Is all the data to be trasmitted unencrypted
on the open Internet? I doubt it. Another concern is caching.
Are you to be caching requests for performance or you should
forward all requests unprocessed for low footprint? If caching -
is it only query results you need to cache or should you cache
portions of the database so you can resolve certain queries
locally? I'm sure this is only scratching the surface of unexplored
requirements you need to tackle first...
(In fact, it may very well turn out you don't need to write
anything, but instead you need to acquire third party software,
for example to conform to certain industry standards.)
The simplest solution would obviously be to send the raw
SQL statements and return the recordsets unprocessed.
I don't know if this meets your requirements, however,
and I doubt you'll achieve performance gain over using
the raw database over WAN. You may want to do it merely
for the encryption you can provide, if there's such requirement
(e.g. no VPN, but open Internet connections for example).
A noticeable improvement will come from caching the results
from the last N queries. Even better performance can be gained
by replicating the remote database locally. In that case you
don't actually need to write anything, since the database
software already takes care of the replication details.
I hope you see what I'm hinting at here. You have lots of
requirements that have driven you to the decision of using
socket communication. The decision what kind of protocol
to use then should also be driven by them, not by the random
suggestions you'll get here in the newsgroups by people not
familiar with your requirements.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Angus" <nospam@xxxxxxxxx> wrote in message
news:O89Ii7nCHHA.4772@xxxxxxxxxxxxxxxxxxxxxxx
Thanks but I am quite clear on my requirements. Confusion I think was
with
person who responded.
I have a contact management package which currently talks to a database on
a
LAN. But I want to enable the program to work over a WAN connection.
So I will write a server program which receives requests from clients via
a
socket connection. The requests (eg a request for some data in a row in a
table) will be passed on down to the database via whatever is best/fastest
access method.
So I need a protocol for communication between socket clients and socket
servers. Should I base this protocol on SQL or design my own protocol.
That is essentially the question.
Angus
"Alexander Nickolov" <agnickolov@xxxxxxxx> wrote in message
news:OS9eQznCHHA.4404@xxxxxxxxxxxxxxxxxxxxxxx
I expect you need to start from your requirements. Sinceserver
you didn't post them, I suspect you are not clear what
they are in the first place. Spend the time figuring out
your requirements and then the design should flow in
place with much less confusion...
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Angus" <nospam@xxxxxxxxx> wrote in message
news:%23XioRInCHHA.4312@xxxxxxxxxxxxxxxxxxxxxxx
Maybe I do not understand. Or maybe my question was not clear. The
isis a socket server. ie you communicate with server via sockets. There
a
product from BMC software called Remedy which works in this way. Data
storage is a SQL server. But clients don't talk directly to database -
communication is via socket server.
ie the client doesn't have OLE DB, ADO, DAO or whatever installed -
they
communicate via sockets - and some sort of protocol. That is what I am
trying to design.
Angus
"Vadym Stetsyak" <vadym_s@xxxxxxx> wrote in message
news:O2R9a6lCHHA.4740@xxxxxxxxxxxxxxxxxxxxxxx
Hello, Angus!papers
What does it mean "based ib SQL database"?
Have you seen DB servers like mySQL?
Its open source, so you can investigate its design.
Have a look at it ( http://www.mysql.org/ )
Also there are a lot of technical papers on MS SQL Server. From these
you can obtain the picture of DB server parts and architecture...
A> I want to build a socket based database server. How should the
A> client
A> communicate with the server? Should I create SQL syntax at the
A> client and
A> let the server pass this onto the database? Does this work? Would
A> creating
A> a totally new custom protocol for the database communication be
A> better?
A> I intuitively feel that that re-inventing the wheel is probably not
A> very
A> clever. And if the client can create the SQL strings that should
A> work ok.
A> But would be interested to hear from anyone who has also written or
A> is
A> writing a database server.
A> Another issue I suppose is buffering. Should the server store the
A> retrieved
A> SQL searches in memory and just pass to client the record they are
A> viewing?
A> Suppose makes sense.
A> Any comments would be greatly appreciated.
A> Angus
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
.
- References:
- Database Server based on SQL database
- From: Angus
- Re: Database Server based on SQL database
- From: Angus
- Re: Database Server based on SQL database
- From: Alexander Nickolov
- Re: Database Server based on SQL database
- From: Angus
- Database Server based on SQL database
- Prev by Date: Re: client-server application question
- Next by Date: Re: max connections
- Previous by thread: Re: Database Server based on SQL database
- Next by thread: IMimeInternational::DecodeHeader method
- Index(es):
Relevant Pages
|