client/server app: how?

Hi experts

I'm creating an application to schedule vehicles. it will be created with sql server 2005 and c# using winForms.
so basically it's a simple thing. client talks to server etc.
but: I need almost live updates. If User1 modifies a record all other users should be notified as soon as possible about the change.
Secondly our application (or server) talks with an external server through an interface. the external server forwards our communication to the vehicles and they send messages back to the external server. so, those returned messages need to go to the clients (like above, as soon as possible).
so far so good.

My idea was to have our server talk to the external server and distributes incoming messages to the client (and vice versa) via wcf.
now the other thing would be distributing client updates to all the other clients.
Here I'm not sure whats the way to go.
I thought about database triggers, which call a c# app that notifies the clients about the updates (wcf).
Should the clients make direct call to the database (with dataset etc., quite normal) or should I send all calls to a service located on the server which handles it (seems a bit complicated to me, since I have never done a client/server app like described above).

What do you think?
Am I on the right track, or do you have some other/better ideas?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Whether the clients make direct calls to the DB depends on the number of clients. If there are not many clients , u can keep it simple and request datasets to the clients.

On the other hand , a more robust solution will be to use a windows service.
The windows service will
1. poll your external server for the returned messages,
2. Keep those messages on the sql server database where the clients can fetch it.

For the clients to receive the messages,
1. U can use a timer interval to fetch d messages as datasets from the server to refresh the clients.
2. u can make d server drop updates as xml files in a location and then make the clients 'watch ' the location (using FileSystemWatcher ) for changes... if u dont want too many connections to your DB.

I hope i'v helped a little.
Let me know if u need further clarification.
Contrary to the belief, windows services are not complicated.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ArikaelAuthor Commented:
Hi Lopsy

There are only 5-6  people who will use this app heavily and approx. 4 users who will use it from time to time (every day)

You are talking about the messages from the external server, right?

what do you think about updates coming from the clients itself (inserts, updates etc.).
Would you do that directly or also via a windows service?
Carl TawnSystems and Integration DeveloperCommented:
It sounds like SQL Notification Services might suit your needs.

An introduction can be foudn here:
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

ArikaelAuthor Commented:

sounds interesting.
Am I correct that all I have to do on the client side is registering a listener which will automatically detect changes?
Does it detect every change which would affect the query I used in my command?
like here ->

Unfortunately microsoft decided to remove this feature in sql server 2008, do you know if sql server 2008 offers similar capabailites. Just in case we'd update to sql server 2008 in the future
Carl TawnSystems and Integration DeveloperCommented:
Couldn't really tell you the specifics as i've never used it in anger, i'm just aware of what it does.

Microsoft have released a component pack which adds SSNS support to SQL 2008, so its there if you need it. Their idea is to replace the functionality by extending Reporting Services, but i don't think it's quite there yet.
ArikaelAuthor Commented:

I digged through some articles about notification services.
But I fear that our application will cause very much traffic.
There are actually only 4-6 people who use it as their primary tool. But they update data very often (worst case: every 10 seconds is an update to a record).

I don't know if realtime communication is even possible without performance issues.
The best method would be something like this:

  1. Use a timer control to update the client interface for about 1/2 minutes. (Use XML)
  2. Provide a Refresh / Sync button to the client which they may click whenever they require updates.
  3. Put all your logic in the server (not in client), may be you need to use XML transactions. (If you rely on SQL, use Procedures) (Even if client lies you, SQL throws it as an exception)

ArikaelAuthor Commented:
thanks for your advices
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.