Say two clients machines recall a ticket. If one client makes a change, what is the best way to keep the second client in sync? Obviously I don’t want the second client to overwrite the first one’s changes, but additionally I want the second client to be updated because it may do an operation based on that ticket that needs to include the update the other machine made.
Some approaches I’ve considered:
MSMQ – our application actually used to use this but by the time I was hired it was just dead code that was no longer being used. I’ve thought about reinstating it but I don’t feel that MSMQ quite offers the functionality I want in regard to not just notifying other clients of a change, but also distributing that change.
SQL Service Broker – it’s been a while since I looked at this but I definitely remember it was not the route I wanted to go.
Web Service – Instead of having applications each access the database themselves, I think having a webservice to be in the middle to be responsible for forming the business objects and handing them out would be a partial fix, except for the fact that our application is purely windows forms. But surely there is another way to implement this without the need for an actual web server?
Sockets – I’ve thought about just creating a windows service that integrates with our business object and uses windows sockets to either a) Just tell other clients they need to call the database for updates or b) Actually give the clients the updates so they don’t need to call the database.
This is new territory for me and I’m not aware of any good books or articles that address design patterns that deal with this issue so please direct me to any if you know of them.
With regards to your web-service option, be aware that WCF does not require a web-server. All it needs is a Host, and you can implement one yourself trivially. That host would probably be a Windows Service for your needs.