Scalability of a singleton remote object

J

Julia

Hi,

My RemoteServer is a singleton remote object hosted by windows service and
accessed by ASP.NET application
using remoting,server activated

Basically my RemoteServer need to send several email message types,and it
have a single method

Send(string To,string Body,int type)

the implementation is as follows

RemoteServer:
void Send(string To,string Body,int type)
{
IMessageProcessor processor=CreareMessageProcessor(this,to,body,type)
processor.Execute();
}

all messages placed in a shared Queue and a thread is than popping the
messages and send them.

I wonder what should I do in order to adjust the server to be used by a web
site with 2-3 thousand users per day

as I understand the Send method will be run in a different thread for each
remote invocation.
How many threads available for remoting?

should I register the processor as a polled COM+ remote object so a request
will not be streamed throw the singleton
rather it will directly create the processor?


from ASP.NET instead of


SrvActObj = (RemoteServer)Activator.GetObject(.....
SrvActObj.Send(...

i will do

processorObject=new MessageProcessor(...)
processorObject.Execute(...)
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi Julia,

I'd rather have the Send method put the notifications to be sent to a MSMQ
queue (or any other kind of queue with sufficient reliability), and then I'd
have a ThreadPool-based message processor picking notification requests from
the queue and sending them out.
 
J

Julia

Haaaaa.....i didn't think about it,good idea.





Dmitriy Lapshin said:
Hi Julia,

I'd rather have the Send method put the notifications to be sent to a MSMQ
queue (or any other kind of queue with sufficient reliability), and then I'd
have a ThreadPool-based message processor picking notification requests from
the queue and sending them out.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

Julia said:
Hi,

My RemoteServer is a singleton remote object hosted by windows service and
accessed by ASP.NET application
using remoting,server activated

Basically my RemoteServer need to send several email message types,and it
have a single method

Send(string To,string Body,int type)

the implementation is as follows

RemoteServer:
void Send(string To,string Body,int type)
{
IMessageProcessor processor=CreareMessageProcessor(this,to,body,type)
processor.Execute();
}

all messages placed in a shared Queue and a thread is than popping the
messages and send them.

I wonder what should I do in order to adjust the server to be used by a
web
site with 2-3 thousand users per day

as I understand the Send method will be run in a different thread for each
remote invocation.
How many threads available for remoting?

should I register the processor as a polled COM+ remote object so a
request
will not be streamed throw the singleton
rather it will directly create the processor?


from ASP.NET instead of


SrvActObj = (RemoteServer)Activator.GetObject(.....
SrvActObj.Send(...

i will do

processorObject=new MessageProcessor(...)
processorObject.Execute(...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top