Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - WCF based full duplex service issue

Reply
 
Old 4 Weeks Ago   #1 (permalink)
Nadeem Ashraf


 
 

WCF based full duplex service issue

Hi,

We are working on a Silverlight 3 based tool that we call "Live Presenter".
Briefly speaking, the purpose of this tool is to provide an environment
where a teacher/presentation host can push himself live to other users (with
the help of a camera and a software tool like Expression Encoder; for
example). Apart from the live video, a presenter can also push selected
multimedia content from his library including video, audio, image, text and
form etc. which may serve as a subject reference material during
presentation. The attendees/students on the other hand can also connect
through the same tool and watch the presentation live, as it is being
conducted by the presenter.

In order to push the messages from the client to the server and then pass
those messages around to various different connected clients, we are using
WCF full duplex messaging service. So for example, when a presenter tries to
push a video content to clients, a message is sent to the messaging service
which then sends the same message to each of the connected clients of that
specific session. On receiving the message, source of a medialement based
control is set to the url passed in the message.

We have used the following URLs for reference in building this service:

http://weblogs.asp.net/dwahlin/archi...ce-part-i.aspx
http://weblogs.asp.net/dwahlin/archi...e-part-ii.aspx

Having said above, we are running into two very critical issues pertaining
to this service that is hindering any serious progress since the last one
week.

1) The messages are getting lost somewhere in the transit when we try to run
this tool with even 3-4 members in a session.
2) The messages are getting significantly delayed in reaching the
destination

It is worthwhile to mention that we are using the same service for passing
around two different categories of messages. one category is our
command/control messages to push the content around (from presenter's
perspective) and other category is chat messages.

Since the Service has to maintain the state of the connected clients, it is
a singleton service (InstanceContextMode is single). We have tried to set
ConcurrenyMode to multiple without any luck. We even tried to break the
Service into two different services each serving different category of
messages but that didn't solve our problem either.

Today, we tried to follow a different approach and created a simple Socket
based chat Service (for processing chat messages only). This looked to be
fine until 2-3 clients connected with the Server and they started sending
and receiving messages rapidly. At one point the server failed with the
following exception:

Socket Error
System.InvalidOperationException: An asynchronous socket operation is
already in progress using this SocketAsyncEventArgs instance.

Client Code
args = new SocketAsyncEventArgs();
args.UserToken = socket;
args.RemoteEndPoint = endPoint;
args.SetBuffer(message, 0, message.Length);
socket.SendAsync(args);

Just like previous case, we have no clue as to what is wrong here and how
can this problem be resolved. Can somebody please help or guide us in an
appropriate manner.

Thanks.





My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
HP Printers Duplex Issue - Solution for Back Page Upside Down Vista print fax & scan
Vista Duplex Print Issue with IE7 Vista General
Running DOS based applications with full screen Vista performance & maintenance
HP 7310 + full feature drivers: duplex problems persist Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46