views:

60

answers:

4

My question is very simple to expose:

I have a few aplications that share data between then. I need a way to support that data sharing (cross several computers) and when one aplication changes data, others should be notified about that.

My question is about what tecnologies could be usefull to me. The solution i realise at this moment is to have a database to share data and an external publish-subscribe system (like http://pubsub.codeplex.com/) to notify all applications when the data is changed. But i belive that could exist some helpfull solutions.

Do you know any of then? Thanks.

A: 

If you are using Java, JMX comes to mind Sun's JMX tutorial. There is a lot of support for it and easy to use.

Chris J
Oh sorry. I missed that point. I'm working in .NET Thanks any way.
Zé Carlos
A: 

You can use Windows Communication Foundation (WCF) to communicate between clients and a server. The communication can be two ways, so the client can notify the server about a change, and the server will push out a message to all the relevant clients that need to get notified. A two way communication is called a Duplex Contract in WCF. That way, you don't have to use a database if you don't really need one.

Allon Guralnek
+1  A: 

Hmm, watch out when committing to an architecture like this, they never work well in practice. The first problem is the large amount of network traffic you'll create, that never scales well. More seriously, you'll run into huge concurrency problems. By definition, the "data changed" notification will be delivered late and there's no guarantee they'll be ordered. Everything works well as long as there is a long enough time delay between notifications, giving the sub-systems the chance to have a synchronized view of the data.

But that house of cards comes crashing down hard when the load increases and notifications start getting buffered. A sub-system will start making decisions on old views of the data and get out of sync with the views held by other sub-systems. Nothing you can do about it either, you cannot "lock" across a network. And extremely hard to debug, the sync mismatches are completely random and spurious.

Pursue a centralized server approach, concurrency is much easier to deal with.

Hans Passant
I appreciated your answaer. You point some important problems such as synchronism and network traffic. You suggested to use a centralized server. I think you are sugesting i keep the "shared data" in the server and the applications go get that data when it needed. This resolves the sync problems but creates a performance problem. My applications must run fast. I just cant go get the data to server everytime. I must keep a copy of "shared data" in RAM. That's why i prefer a notify system approach (even if it means to work with outdated data)
Zé Carlos
A: 

I can use Sql Server to store my data and Sql Server Notification Services ( http://msdn.microsoft.com/en-gb/library/ms172483(SQL.90).aspx ) to get notifications when data is changed.

Zé Carlos