What are two possible ways to achieve this goal?

A WCF service code is implemented as follows. (Line numbers are included for reference only.)
01 <ServiceContract()>
02 <ServiceBehavior(
03InstanceContextMode:=InstanceContextMode.Single)>
04Public Class CalculatorService
05
06 <OperationContract()>
07Public Function Calculate(ByVal op1 As Double,
08ByVal op As String, ByVal op2 As Double) As Double

24End Function
25
26End Class
You need to increase the rate by which clients get the required response from the service.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution.
Choose two.)

A WCF service code is implemented as follows. (Line numbers are included for reference only.)
01 <ServiceContract()>
02 <ServiceBehavior(
03InstanceContextMode:=InstanceContextMode.Single)>
04Public Class CalculatorService
05
06 <OperationContract()>
07Public Function Calculate(ByVal op1 As Double,
08ByVal op As String, ByVal op2 As Double) As Double

24End Function
25
26End Class
You need to increase the rate by which clients get the required response from the service.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution.
Choose two.)

A.
Change the service behavior to the following.
<ServiceBehavior(
InstanceContextMode:=InstanceContextMode.Single,
ConcurrencyMode:=ConcurrencyMode.Multiple)>

B.
Change the service behavior to the following.
<ServiceBehavior(InstanceContextMode:=InstanceContextMode.PerCall)>

C.
Require the clients use threads, the Parallel Task Library, or other mechanism to issue service calls in
parallel.

D.
Require the clients to use async operations when calling the service.



Leave a Reply 0

Your email address will not be published. Required fields are marked *