Re: Database Server based on SQL database



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. Since
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
server
is a socket server. ie you communicate with server via sockets. There
is
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!

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
papers
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








.



Relevant Pages

  • Re: Help with first VB application - Data Entry form
    ... I assumed a desktop / winform client application ... time' stamp from the database machine - control machine ... ... problem solved - web server is control system. ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Backups have Shadow Copy Problems
    ... and restarted the server. ... suggested and changed the recovery model to simple on the one database called ... I understand the issue to be: the backup task failed ... You back up data from a volume that contains a Microsoft SQL Server ...
    (microsoft.public.windows.server.sbs)
  • Re: Help with first VB application - Data Entry form
    ... I assumed a desktop / winform client application ... time' stamp from the database machine - control machine ... ... problem solved - web server is control system. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Remobjects v KBM
    ... >> client query components) follow from that. ... Then, connections can be created to say SQL Server, Oracle, Interbase and ... can then be created from the abstract dataset definition in 'customers' to ... implicitly - this makes your code not be database connection specific). ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Help with first VB application - Data Entry form
    ... stamp from the database machine - control machine ... ... unnecessary data to the client ... ... and when building a database independent UI / Client - Server application, ... JavaScript, for example) and thus, will get the time from the web server, ...
    (microsoft.public.dotnet.languages.vb)