![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | Query about data distribution( streaming ) service. Hi I want to know that what is the best way to develop a server/service for the following scenario using WCF: Objective: To make a server that have to deliver information(data) to clients in a continuous manner. Current approach: Following is my current approache: 1. Make a duplex contract. SessionMode is requred. [ServiceContract( SessionMode = SessionMode.Required, CallbackContract = typeof( IClientCallback )] public interface IServer { [OperationContract( IsOnway=false, IsInitiating = true, IsTerminating=false)] void Join(); [OperationContract( IsOnway=true, IsInitiating = false, IsTerminating=true)] void Leave(); } public interface IClientCallback { [OperationContract( IsOnway=true)] void UpdateData( string data ); } 2. Implement the contract in a service that have Instance mode per session and concurrency model is Multiple. 3. Use WsDualHtppBinding. 4. Use throttle values to make concurrent sessions 5000 and number of instance 5000. Number of concurrent calls is 500. Service implementation work as follows: 1. When a client calls the Join method service stores its callback channel in a variable like this: this.clientCallback = OperationContext.Current.GetCallbackChannel<IClientCallback>(); 2. Service attaches an event handler to a data source. For example Cache.CacheFlush += this.OnCacheFlush. 3. Now when a OnCacheFlush is fired, service call client like this. this.clientCallback.UpdateData(data). 4. When a client want to disconnect it calls Leave. Quries: 1. Now can anyone tell me is this is scalable? How much concurrent client this approach will support? 2. Is there ay session issues or timeout issues? 3. Is there any memory issues? 4. What is the statbility of the service. 5. Is it better that i develop a singleton service and do my own session management and threading stuff? Some aukward problem currently facing: A problem i currently faced is that i connect 50 clients to service. All is working successfully for a period of time then gradually all clients starts disconnecting. The channel goes to Faulted state. Best Regards Danish Ahmed |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Query about data distribution( streaming ) service. Check WSStreamHTTPBinding example in PSDK. That stopped to work for me in Beta 2 but worked before, OTOH stream example with BasicHttpBinding continue to work in Beta 2 too Arkady "Danish Ahmed" <danish.ahmed@sharesense.com> wrote in message news:%23ybRBAfnGHA.4572@TK2MSFTNGP05.phx.gbl... > Hi > I want to know that what is the best way to develop a server/service for > the following scenario using WCF: > > Objective: > To make a server that have to deliver information(data) to clients in a > continuous manner. > > Current approach: > Following is my current approache: > > 1. Make a duplex contract. SessionMode is requred. > [ServiceContract( SessionMode = SessionMode.Required, CallbackContract > = typeof( IClientCallback )] > public interface IServer > { > [OperationContract( IsOnway=false, IsInitiating = true, > IsTerminating=false)] > void Join(); > > [OperationContract( IsOnway=true, IsInitiating = false, > IsTerminating=true)] > void Leave(); > } > > public interface IClientCallback > { > [OperationContract( IsOnway=true)] > void UpdateData( string data ); > } > > 2. Implement the contract in a service that have Instance mode per session > and concurrency model is Multiple. > > 3. Use WsDualHtppBinding. > > 4. Use throttle values to make concurrent sessions 5000 and number of > instance 5000. Number of concurrent calls is 500. > > Service implementation work as follows: > > 1. When a client calls the Join method service stores its callback channel > in a variable like this: > this.clientCallback = > OperationContext.Current.GetCallbackChannel<IClientCallback>(); > > 2. Service attaches an event handler to a data source. For example > Cache.CacheFlush += this.OnCacheFlush. > > 3. Now when a OnCacheFlush is fired, service call client like this. > this.clientCallback.UpdateData(data). > > 4. When a client want to disconnect it calls Leave. > > > Quries: > 1. Now can anyone tell me is this is scalable? How much concurrent client > this approach will support? > > 2. Is there ay session issues or timeout issues? > > 3. Is there any memory issues? > > 4. What is the statbility of the service. > > 5. Is it better that i develop a singleton service and do my own session > management and threading stuff? > > Some aukward problem currently facing: > A problem i currently faced is that i connect 50 clients to service. All > is working successfully for a period of time then gradually all clients > starts disconnecting. The channel goes to Faulted state. > > Best Regards > Danish Ahmed > > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Software Distribution Service 3.0 | .NET General | |||
| Software Distribution Service 3.0 | .NET General | |||
| MS Access: Summarizing some data in a query | .NET General | |||
| burning data onto CD-R, query | Vista General | |||