locked
Client Server Communication Approach RRS feed

  • Question

  •  

    I need to write a client server application using .NET Framework 2.0 , but i need to figure out which approach will be right considering following paratemers

     

    1) Security

    2) Reliability

    3) Performance 

    4) Implementation

     

    I cound think of following approach

    1) Socket Programing

    2) Named Pipes

    3) Remoting

     

    Please suggest which approach will be most appropriate. Any other approach can also be considered.

    Monday, April 28, 2008 5:17 AM

Answers

  • Dear Ajay,

     

    The solution approach will entirely depend on your requirements. Well, in .NET we oftely go for .NET Remoting and Web Services depending on our requirements. .NET Remoting provides you with fast access to the server and is normally used for intranet based applications. Where as Web Services use XML based SOAP protocol and normally used in internet based applications. Web Services provides you with scale-out option, which .NET Remoting does not really. 

     

    Their are many such advantages and disadvantages of remoting and web services, hence choosing the best option mearly depends on your system requirements.

    Tuesday, April 29, 2008 5:07 AM
  • I agree with Sandeep

    most of all, the main differences between .NET Remoting and Xml Web Services are related with complexity (Xml Web Services simpler) and marshalling/unmarshallin performance (.NET Remoting faster)

     

    Hopefully your team management may reconsider the baseline as WCF is an API besides .NET 2.0 so the CLR version won't change. For marketing reasons, unfortunately, the set of APIs containing WCF, WPF, Cardspace and WF was named .NET 3.0 but it's actually four new APIs added to the .NET 2.0 base class library, on top of the same core (as told, the CLR 2.0)

     

    What's good about WCF is that it's a common programming model based on plain object (that is, objects not tied to any API in particular!) which are configured either thru attributes or config files. You may decide a switch from binary serialization to web services, etc by just changing the configuration. But you don't need to touch the logic inside your plain objects

     

    An ocean of difference, what motivated to announce WCF and the other new members as .NET 3.0

    Monday, June 2, 2008 4:01 AM

All replies

  • Ajay,

     

    Your choice depends on what problem you are writing your solution for, and hence the requirements.

     

    If you talk about what you're trying to do, maybe we could help?

     

    Martin Platt

     

    Monday, April 28, 2008 5:22 AM
  • I second Martin's question, because at the moment a carrier pigeon could be the correct solution Wink We'll need to understand the platform the client and the server are running on, the network between the two and other non-functional requirements such as firewalls, secure transport, single-sign-in, etc, etc.


    Monday, April 28, 2008 5:50 AM
  • I agree with the first two responses; it really depends on what you are trying to do.  However, here are some tips to get you started.

    If it is stateless and doesn’t need microsecond performance, then I would say web services or WCF in 3.5.  If your project does require state, then remoting is your best bet.  Both of these technologies really function on top of socket communication. 

    Finally, if you are really interested in performance, write your own socket library with custom serialization.  Unless you are on the same machine, then named pipes is a bit better.  I would warn doing either of these correctly is not a trivial task.

    On a side note, I have seen some interesting applications built on top of MSMQ.  Depending on you circumstances, that might be another solution. 

    Any of the aforementioned protocols could be reliable if implemented correctly.  Implementation wise, I would say web services or WCF are by far the easiest.  Furthermore, they have robust security model.

     

    Yezdaan Baber

    http://www.ifinancialsystems.com/

     

    Tuesday, April 29, 2008 3:31 AM
  • Dear Ajay,

     

    The solution approach will entirely depend on your requirements. Well, in .NET we oftely go for .NET Remoting and Web Services depending on our requirements. .NET Remoting provides you with fast access to the server and is normally used for intranet based applications. Where as Web Services use XML based SOAP protocol and normally used in internet based applications. Web Services provides you with scale-out option, which .NET Remoting does not really. 

     

    Their are many such advantages and disadvantages of remoting and web services, hence choosing the best option mearly depends on your system requirements.

    Tuesday, April 29, 2008 5:07 AM
  • The application is something like a monitoring application which will be deployed on a local network. The server application will send some data which will be needed to trigger out some tasks (system level) on the clinet machine and the client machine will send back the tasks status.

     

    Tuesday, April 29, 2008 10:49 AM
  • Hi Ajay,

         A similar post started by another user couple weeks ago.  Read all the responses for the post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3155455&SiteID=1.  Dont let the title deceive you, as it started as something else...

     

    Thanks,

    Gaja

    Tuesday, April 29, 2008 12:15 PM
  •  GajaKannan wrote:

    Hi Ajay,

         A similar post started by another user couple weeks ago.  Read all the responses for the post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3155455&SiteID=1.  Dont let the title deceive you, as it started as something else...

     

    Thanks,

    Gaja

     

    There they are suggesting for WCF but i want to restrict it to framework 2.0. Also WMI (MOM) is not what i want to do 'coz it requires client server communication as well along having a GUI running in all the machines.

    Wednesday, April 30, 2008 8:17 AM
  • I agree with Sandeep

    most of all, the main differences between .NET Remoting and Xml Web Services are related with complexity (Xml Web Services simpler) and marshalling/unmarshallin performance (.NET Remoting faster)

     

    Hopefully your team management may reconsider the baseline as WCF is an API besides .NET 2.0 so the CLR version won't change. For marketing reasons, unfortunately, the set of APIs containing WCF, WPF, Cardspace and WF was named .NET 3.0 but it's actually four new APIs added to the .NET 2.0 base class library, on top of the same core (as told, the CLR 2.0)

     

    What's good about WCF is that it's a common programming model based on plain object (that is, objects not tied to any API in particular!) which are configured either thru attributes or config files. You may decide a switch from binary serialization to web services, etc by just changing the configuration. But you don't need to touch the logic inside your plain objects

     

    An ocean of difference, what motivated to announce WCF and the other new members as .NET 3.0

    Monday, June 2, 2008 4:01 AM