By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,127 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Aug 30 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
JB <jb*********@gmail.comwrote in news:1188496386.258493.51480
@y42g2000hsy.googlegroups.com:
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?
Aug 30 '07 #2

P: n/a
JB
On 30 Aug, 19:46, Spam Catcher <spamhoney...@rogers.comwrote:
JB <jb.bross...@gmail.comwrote in news:1188496386.258493.51480
@y42g2000hsy.googlegroups.com:
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?
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.
Aug 31 '07 #3

P: n/a

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


"JB" <jb*********@gmail.comschreef in bericht
news:11*********************@y42g2000hsy.googlegro ups.com...
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

Aug 31 '07 #4

P: n/a
JB <jb*********@gmail.comwrote in news:1188545918.691006.240760
@z24g2000prh.googlegroups.com:
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.
Aug 31 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.