Basic design question for a distributed application - How to access application's data

J

JB

Hi All,

I need to write my first "distributed" application and due to my lack
of knowledge and experience in that area, I'm stuck on the first big
design decision. Reading a lot on distributed applications, remoting,
etc didn't help me much for that particular issue.

The main data the application manipulates is a list of Queries. A
query is a custom object containing an SQL statement and some
parameters to allow the query to run (e.g. DB connection params,
etc).
My server is where my list of queries will reside. It will be a
windows service as it needs to run permanently.
My client will display that list of queries and enable the user to
add, delete and modify the queries in the list. The client will also
initiate the running of all the queries (i.e. tell the server to run
all the queries sequentially).
What would be the recommended design as far as the list of queries is
concerned:

- A "shared" style where my list of queries on the server is accessed
(by reference) and modified by the client. i.e. from the client I
would do something like:
QueryRef = Server.List(3) 'Get a reference on the 3rd Query in the
list
QueryRef.SQL = "Select * from TABLE1" 'Directly modify the reference
i.e. the Query itself
And how can that be implemented in .Net with VB or even C#?

- A "message" style where my list of queries on the server will not be
accessed directly but through some sort of Get/Set messages like:
QueryCopy = Server.GetQuery(3) 'Get a copy of the 3rd Query locally in
my client
QueryCopy.SQL = "Select * from TABLE1" 'Modify the copy of the Query
Server.SetQuery(3, QueryCopy) 'Send the changes to the server

- Or is there a better type of design?

If anybody could shed some light over this or point me to a good
source of information, I would greatly appreciate it.

Thanks & Regards
JB
 
G

Guest

Or is there a better type of design?

Do you queries change a lot ... or are they static?

Passing the query to the client introduces a lot of security issues -
basically someone could issue a DELETE FORM TABLE and you'll be in hot
water ;-)

Have you considered web services too?
 
J

JB

Do you queries change a lot ... or are they static?

Passing the query to the client introduces a lot of security issues -
basically someone could issue a DELETE FORM TABLE and you'll be in hot
water ;-)

Have you considered web services too?

The queries won't change much once they're created on the client and
run a couple of times for testing.
Also it's a simple application so security is not the prime concern.
I haven't really considered web services as the client and server will
reside on the same network/same platform.
 
M

Michel Posseth [MCP]

I would just store the query`s in a database and use notification services
to the service to synchonize the changed query strings

1 . A RDBMS ( SQL 2005 ) with a database with a table MyQuery`s
and columns like QueryId ( GUID ) | QueryString

2. the service loads on start the dataset with the query`s , and gets
notified by notification services when on of the query`s changes and reloads
the new versions

3. Client program wich can send commands to the service ( through
remoting ) , and can manipulate the dataset with querys in the RDBMS

just a thought :)




HTH

Michel
 
G

Guest

I haven't really considered web services as the client and server will
reside on the same network/same platform.

Web services is much simplier than remoting to implement. Also using web
services should have no bearing if it's a local or remote application ...
it's great for building SOA (service oriented architecture) applications.

Remoting is good too - but it depends on the type of data you're planning
to transfer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top