G
Guest
I'm trying to increase concurrency as much as possible and have a couple of
questions regarding what's going on under the hood for the following code
segments:
ChannelServices.RegisterChannel(new TcpChannel());
When creating the TcpChannel is this just reserving a port?
Does it ever make sense to create and register multiple TcpChannels? Let's
say you have many client requests running within a ThreadPool trying to
access the channel? Does the transformation of these requests prior to the
actual communication get serialized because all requests are going thru the
same channel or is each requests transformation done asynchronously
underneath the hood? I'm hoping that the answer is the latter.
Also if it does make sense to have multiple channels how do you indicate
this in the actual request; there is no channel parameter that I can see.
Here is a typical request that I perform:
m_topupRequest = (RTS.Remoting.Server.TopUpRequest) Activator.GetObject(
typeof(RTS.Remoting.Server.TopUpRequest),
"tcp://localhost:10500/TopUpRequest");
TopUpResult topupResult = m_topupRequest.Request(rtsCardTypeID,
rtsCardTypeID, phone, currencyType, currencyAmount, dbCode, dealerName,
dealerID,posID, requestIsTest);
Note: localhost is just hard-coded, we will have multiple load-balanced
server machines.
Underneath the hood, does a new socket get created during the
Activator.GetObject call and everything handled asynchronously when the
request is performed?
questions regarding what's going on under the hood for the following code
segments:
ChannelServices.RegisterChannel(new TcpChannel());
When creating the TcpChannel is this just reserving a port?
Does it ever make sense to create and register multiple TcpChannels? Let's
say you have many client requests running within a ThreadPool trying to
access the channel? Does the transformation of these requests prior to the
actual communication get serialized because all requests are going thru the
same channel or is each requests transformation done asynchronously
underneath the hood? I'm hoping that the answer is the latter.
Also if it does make sense to have multiple channels how do you indicate
this in the actual request; there is no channel parameter that I can see.
Here is a typical request that I perform:
m_topupRequest = (RTS.Remoting.Server.TopUpRequest) Activator.GetObject(
typeof(RTS.Remoting.Server.TopUpRequest),
"tcp://localhost:10500/TopUpRequest");
TopUpResult topupResult = m_topupRequest.Request(rtsCardTypeID,
rtsCardTypeID, phone, currencyType, currencyAmount, dbCode, dealerName,
dealerID,posID, requestIsTest);
Note: localhost is just hard-coded, we will have multiple load-balanced
server machines.
Underneath the hood, does a new socket get created during the
Activator.GetObject call and everything handled asynchronously when the
request is performed?