Best way to deal with simultaneous connections usi - WeOnlyDo Discussion board

Best way to deal with simultaneous connections usi (General questions)

by Simon, Wednesday, August 05, 2009, 02:06 (5589 days ago)

Hi there,

We use VB.NET and the ActiveX control.

We have a web server that does a lot of processing for each web request, and we can get hundreds at a time. (It is in testing.)

It's hard to tell what the best way of handling this is.
Should we:
- Just set Threads to FullThreads? If so, what if on the RequestDone event we call wodSMTP with blocking=true to send a large email? If we wait until it is sent to give back HTML, would other connections or application processes be blocked?

- Or, should we immediately launch all our processing/responses in a new thread as soon as we enter RequestDone?

What's the best solution?

Re: Best way to deal with simultaneous connections

by wodDamir, Wednesday, August 05, 2009, 09:54 (5588 days ago) @ Simon

Simon,

Whichever method works better for you. However, when using FullThreads, the component will create a new thread for each connected user, and raise events from worker thread.

This means that if you do any lenghty processing, only one user (the one you are doing processing for) would be affected. The other users would continue communicating with the server.

Hope this helps.

Regards,
Damba

Re: Best way to deal with simultaneous connections

by wodcg, Sunday, August 09, 2009, 20:54 (5584 days ago) @ wodDamir

Hmm.. So just double checking...
Since the Form_RequestDone event is in separate code, there would be multiple instances of that form code created each time a request was done?

Just double checking

Re: Best way to deal with simultaneous connections

by wodDamir, Sunday, August 09, 2009, 22:20 (5584 days ago) @ wodcg

Hi,

That's correct. RequestDone would be triggered each time user submits the request.

Regards,
Damba