Re: Multi-threaded Worker Objects

Tech-Archive recommends: Fix windows errors by optimizing your registry



Robson,

Your design is exactly what I was asking about. What you've said is very
helpful. If you can elaborate how your remote object return values to
corresponding clients, I would appreciate it.

Recap: Multiple clients can call your remoted Worker singleton object, which
in turns spawn worker threads (say, 1 new thread per new client). Once the
thread(s) is complete and say, need to return some client-specific values,
how can you determine the right client to return values?

Thanks.


--
Your 2 cents are worth $milion$. Thanks.


"Robson Siqueira" wrote:

mtv.

It will depend on your design. With the details you gave, I don't think I
can be of much help.

I can explain, for instance, an application I have here and maybe you will
identify with yours. My application is basically a windows service, remoting
a singleton object. This application can receive simultaneous calls by
different clients. Within the work class I spawn all my work on different
threads. Therefore, I wait all them to finish. This means that the call from
a client perspective is synchronous but the work done within that call is
spawned in different threads for maximum performance.

Due to the way I coded the work class - and furthermore the object class
which is remoted - I can have different clients calling the same server
activated object (my singleton object). Everything I need is passed thru
parameters.

In my specific case, threading really helped. My windows service deals with
huge amount of processing. In this case, this is a distributed application
(I have more servers running the same windows service and a "master" windows
service distributing the load).

If you can provide more details, maybe I can be of help.

--
Regards,
Robson Siqueira
Enterprise Architect
"mtv" <mtv@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:15E57357-AFE3-4003-96AD-06C9605E9727@xxxxxxxxxxxxxxxx
With the multi-threading design, how does the remote object know which
client
to return the value to (for synch or asynch calls)?

And for synch calls, does threading really help? I did this test and found
threading did not help. I think it's b/c Synch call is the blocking mode;
therefore, one call, at a time, is served. Perhaps you have different way
to
make it work.

Thanks.


--
Your 2 cents are worth $milion$. Thanks.


"Robson Siqueira" wrote:

I think that a ThreadPool is your friend :)

Take a look on this framework, which extends the features of the native
.net
ThreadPool class. I use this for quite some time.

http://www.codeproject.com/cs/threads/smartthreadpool.asp

--
Regards,
Robson Siqueira
Enterprise Architect
"maheshgv" <maheshgv@xxxxxxxxx> wrote in message
news:1169594351.037963.38910@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a class exposed as a singleton using remoting. Mutliple
instances of the client application will connect to this singleton
object. After successfull authentication, I create different
workerprocess objects (tied using a unique SessionID) which actually
does the work. I want these instances to be running in different
threads so as to increase the performance. Also, all the subsequent
calls from the client will be forwarded to the associated worker
process object. Is there any way these new instances be spawned on
different threads?







.



Relevant Pages

  • Re: RWW Disconnecting
    ... I understand that remote client encounts following error message when RWW ... I strongly suggest that we rerun the Configure E-mail and Internet ... 825763 How to configure Internet access in Windows Small Business Server ...
    (microsoft.public.windows.server.sbs)
  • Re: Great SWT Program
    ... graphics; one-button mice...all while the machines have tended to be ... the internet are good enough that you can run a modern-as-of-2007 GUI ... * Remote machine has graphical app running that tells the Windows ... network to the client to display a button labeled "foo" at those ...
    (comp.lang.java.programmer)
  • Re: Redirect problems to remote client
    ... sent you a copy of the results file from the client. ... > remote client and redirecting the My Documents folder. ... > - Internet Explorer Maitenance policy processing ... Microsoft is providing this information as a convenience to you. ...
    (microsoft.public.windows.server.sbs)
  • RE: Remote connectivity problems
    ... do you mean you have added a remote client to SBS ... If you have hardware VPN tunnel setup using Linksys or others, ... In this scenario you have to configure the SBS Server computer to enable ...
    (microsoft.public.windows.server.sbs)
  • Re: Mapped Drives over VPN
    ... When the client tries to access a share on the remote machine, ... Microsoft CSS Online Newsgroup Support ... | They have generally two mapped drives. ...
    (microsoft.public.windows.server.sbs)