.net - Sockets Vs. WCF -


I work on applications such as a chat, where I use WPF on the serial lights on the client side and server side. Now the communication is based on socket: I have different messaging which I send serial and through TCP.

I started to realize that creating a separate message class for every possibility communication scenario is very high and is going to WCF.

So I need to know the following:

  1. It seems that the entire communication client using WCF is based on the colin. Is there a way to know what my WCF service is like when a customer calls in a certain way? This is very important for my application.

  2. Does the WCF notify my application when the customer is disconnected (e.g., the browser closes the window, where the Silverlight client is running) from the server ? This is also very important.

  3. Are the methods completely call Asynchronous? If so, do I have to start each method call again in the main thread of the server application?

  4. Does every customer have their own thread of relation? How many simultaneous connections can handle the server (running on a reasonably powerful PC) if client call methods are called every 2 seconds? I just need an assessment (10, 100, 1000 or more). "More" would be great;)

Maybe I am completely wrong and the WCF does not work at all connection-based. Then I have to get an alternative solution to manage the list of active connections.

Thank you for your help!

  1. Since you are using a Silverlight application, you have a UserName Password Verifier Can apply to the message layer, which adds some headers to the soap message, it can be used to exclusively for customers, unless the customer is not known then you should be running System.ServiceModel.OperationContext. You can use Current when you use a different user name in the WCF service Is required.

  2. When the client disconnects, then the server is not informed Msgs are "PerCall" by default, one way is to use a singleton class, with the help of the rest of the interstatex mode . Single, then implement an operation contract with a callback service, then when the client has to log in to the ur service, then they have to register with the callback service. The callback service can then cycle through connected customers and callback Can check the status of, whether it is still open or not, at the end remove the entries where the connections have been closed, eventually you need to Can achieve fitness

  3. Async calls are from clients, that is All WebSpace calls in Silverlight are in ASCN, as you have an option in ASP, WCF automatically handles ASINCC functionality, so that you do not need to rearrange anything, just give the service contract a code like a thread. , And everything will be okay

  4. To implement binary message encoding in RowLlite 3, your server and its bandwidth more In order to achieve the full benefits, the Silverlight does not support the raw TCP connection, it should very well be wrapped in a http message. There may be several concurrent calls (async memories) in each customer, so that they can keep things simple, just think about it like the server specifies a different thread in each message call, so what you said to answer your question , 1000


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -