Trigger events remotely

2

What is the best way to remotely trigger / receive an event in C# ?

Example:

When you click a button on PC1, perform a certain task on the other PCs that own the app.

I thought of 3 solutions:

  • Socket
  • Query the database in 5s intervals
  • Perform http queries that return some json in 5s intervals
  • asked by anonymous 19.03.2015 / 20:27

    1 answer

    2

    It will depend on the architecture you used to build the software. If you have a server application that provides connection to clients via socks or WCF, then this is the way. Use the same layer architecture to send information (socks, wpf, remoting or others)

    Now, if your client applications connect to the database directly, the solution can be to create a table and get the update from time to time. You could leave an isolated thread running on the client, checking for changes. This would avoid building an exclusive server application for this purpose.

    The json case would only advise for web applications. If your web application has a look at this feature of html5.

    link

        
    23.03.2015 / 01:41