Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Messaging in local network with .NET

Tags:

c#

I need to implement some form of communication mechanism in my application, to send notifications/messages from one application instance to all the others. This is a normal scenario where someone adds and item or deletes and item and you want to notify other users that this has happened.

The application runs on the client and connects to a database on the local network. So its not like all clients access a server instance of the application. So from what I know I could use MessageQueues or some form of Database polling where I have a table that stores all the messages (not ideal).

Issue is I need to implement this very quickly, so sadly can't go very complex but need the quickest easiest solution.

thanks for the help!

like image 738
Richard Avatar asked Oct 26 '22 18:10

Richard


2 Answers

Sounds like it might be easier for you to use optimistic concurrency. Assume that things wont be deleted and deal with it at the affected client when it happens, which should be easier than developing some kind of concurrent notification system that won't scale at all...

Other than that, if you client list is small, db polling is the easiest way to do it without adding another layer of communication to your system, just add a table and implement a class library for everyone to do their thing on, if you can access the DB you are able to find out about deleted items etc.

like image 125
Spence Avatar answered Nov 15 '22 05:11

Spence


Rhino Queues should do the trick. Its a super-lightweight queue which doesn't need MSMQ and is XCOPY deployable

http://ayende.com/Blog/archive/2009/04/03/rhino-queues-take-6.aspx

like image 37
mcintyre321 Avatar answered Nov 15 '22 06:11

mcintyre321