WCF interview questions – Explain 3 ways of implementing WCF(Windows Communication Foundation) concurrency?

Answer:
Three ways by which you can handle concurrency in WCF is Single,
multiple and reentrant. To specify WCF concurrency we need to use the ‘ServiceBehavior’ tag as shown below with appropriate ‘ConCurrencyMode’ property value.

Figure:

Single: – A single request has access to the WCF service object at
a given moment of time. So only one request will be processed at any given moment of time. The other requests have to wait until the request processed by the WCF service is not completed.

Multiple: – In this scenario multiple requests can be handled by
the WCF service object at any given moment of time. In other words request are processed at the same time by spawning multiple threads on the WCF server object. So you have great a throughput here but you need to ensure  concurrency issues related to WCF server objects.

Reentrant: – A single request thread has access to the WCF service
object, but the thread can exit the WCF service to call another WCF service or can also call WCF client through callback and reenter without deadlock.

You can also view video on WCF one way contract as follows: –


Please click here to see more .NET and WCF interview questions

Regards,

Visit Authors blog for more .NET and WCF interview Question
Advertisements

About c# and .NET Interview questions

This blog is for developers who want to crack .NET and C# interviews. It has all tips and tricks needed to crack .NET interviews , C# interview , SQL Server interview , Java interview , WCF Interview , Silverlight interview , WPF interview , LINQ interview , Entity framework Interview. Do not forget to watch our Learn step by step video series. Learn MVC in 16 hours:- https://www.youtube.com/watch?v=Lp7nSImO5vk Learn AngularJS Step by Step:- https://www.youtube.com/watch?v=0kmdjqgO9IY Learn Design Pattern in 8 hours:- https://www.youtube.com/watch?v=YDobmucohqk Learn C# and .NET in 60 days:- https://www.youtube.com/watch?v=yh2SrzCkNQA Learn MSBI in 32 hours:- https://www.youtube.com/watch?v=mGPJx3ocFgg Learn SharePoint Step by Step in 8 hours:- https://youtu.be/C2fW76SwJNU
This entry was posted in Uncategorized and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s