What is the best way to implement server to server communication?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • beacon
    Contributor
    • Aug 2007
    • 579

    What is the best way to implement server to server communication?

    Hi,

    [C# .NET 4.0]

    I'm looking for a way to automate a number of things at work to make my life easier...not because I've been told to, just because I want to. I've been learning C# for a few months now and I've been looking for personal projects to help facilitate that and I'm hoping my question today will eventually become another one.

    One of the things I'm looking into is a way to run basically the same service on multiple servers and, if an event is triggered (for instance, a printer/port is installed), the server will communicate with the other servers so they will replicate the same action (i.e. install the printer/port). The printer/port installation is a good example and is one that I can modify to meet the objectives of the five or so other items I want to automate since the essentially follow the same framework.

    I've researched Windows Services and written a couple. I've also researched Windows Communication Foundation (WCF) some, but I'll admit, it's complex and I've been hesitant to devote too much time to it due to fear that it may not be the right thing for this task...I think it is, but I'm not 100%.

    Which is what brings me here today...I'm looking for some thoughts on what are some of the best ways to implement a service on multiple servers that monitor for an event and, when that event takes place, an installation of a printer/port object for example, the installation is cascaded to the remaining servers. (For simplicity of the example, a specific printer/port object will only be installed to a specific server, so there's no need to worry about the same object being installed at the same time on multiple servers...it should only be installed once at a given time)

    I'm happy to provide any information that I may have left out to help facilitate the discussion. I'm eager to learn, but I'm still learning, so please go easy on me.

    Thanks,
    beacon
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    It sounds like your service is going to be listening for events (whatever those might be).

    I would probably cut a record of this into a database that the service will also be watching.

    When the service see a new record in the database, it will retrieve the information (probably the location of the installer) and execute the necessary commands to make the same event happen on the server it is running on.

    So, the windows service would be listing for 2 things: items installed on it (events), and records in a database that instruct it to install something automatically.

    Please be very cautious about implementing this service because you don't want malicious software installed on one server to then be automatically installed on all of your servers.

    Anyways, it sounds like a cool project.

    Happy coding,

    -Frinny

    Comment

    Working...