locked
Application architecture... RRS feed

  • Question

  • Hello! I'm new to C# and .NET. Most of the developement I've done lately is in PL/SQL and/or Perl, so C# is "a bit" of a change for me. I've got an architecture question first which I'm sure will lead to more questions. :)

    I work for a company that has hundreds of remote devices around the country. I need to write an app that, in a nutshell, reads the details of these devices from a database, contacts them via a phone call using a modem pool, downloads a data file, then updates certain fields in the database.

    I'd like opinions on whether this is a good way to do it or not:

    I'm thinking of writing two separate apps that communicate via remoting. One app (the client) would be the one that 'talks' to the database. It periodically reads the database to see which devices need to be contacted. It would be multi-threaded so it can initiate multiple contacts at once.

    The second app (the server) would be responsible for controlling the modem pool (up to 20 modems/phone lines). It would take a request from the client, contact the device, and get the data file, then respond back to the client with the status of the call (sucess or failed and why failed).

    Does this sound like a good way to proceed? Any hidden 'gotchas' I should know about? Threading, remoting, dialing a modem, etc, is all new to me so this should be..... 'interesting'. ;) 

    I'm using Visual Studio 2005 and .NET 3.0.

    Thanx!
       Dave
     
    Thursday, November 13, 2008 4:07 PM

Answers

  • Architecture?  Using the Proxy Pattern to talk to the remote devices is the typical way to do it across the Web.  But, that might require a little bit of modification to the code in the field, every device.  A modem may make it possible to do away with that issue, but I would still use a proxy in case the communication medium changes from modem to something a bit more sophisticated like the Web.

    Your client needs to think that it is talking directly to a remote device.  How it gets done is a "don't care" condition best handled by your proxy server.  Infact, I would make the actual proxy a separate layer between the modem server and the client.  The client's proxy should not care either how it actually gets done, only that it does.  That way if you update your communications, you only need to update the modem server to something else.

    Rudedog   =|^D
    Mark the best replies as answers. "Fooling computers since 1971."
    • Edited by Rudedog2 Thursday, November 13, 2008 5:10 PM spelling with bad eyes
    • Marked as answer by Harry Zhu Monday, November 17, 2008 7:20 AM
    Thursday, November 13, 2008 4:59 PM