From: owner-a...@cse.wustl.edu
[mailto:owner-a...@cse.wustl.edu] On
Behalf Of Ephy Levy
Sent: Tuesday, May 09, 2006 9:44
AM
To: ace-...@cs.wustl.edu
Subject: [ace-users] ACE proactor
vs Reactor
Hi,
I am using ACE 5.5 on Windows platform.
I have to create a wrapper of the ACE for create the base of the servers of
the company where i work.
I read the ACE programmer's guide book.
In the book, the ACE Reactor and Proactor are explained.
our servers can listen about 1000 connections at the same time.
my questions are :
- which pattern is more adapted for my needs?
(I think to use the proactor because the reactor is limited on the number of handles that i can open - is it true ?? )
This is half true, if you use the ACE_WFMO_Reactor it is limited to 64 handles which leaves you with approximately 60 concurrent connections on a single thread.
The reason is that the ACE_WFMO_Reactor is based on the WIN32 API ::WaitForMultipleObjects.
On the other hand you can use the ACE_Select_Reactor that can be configured to work with 1000 connections and more (Clearly it is based on ::select).
I prefer using the ACE_Proactor which is not limited to number of concurrent connections and can combine Pipes, Sockets and File access on a single thread.
Also, the ACE_WIN32_Proactor is based on completion ports, which means asynchronous architecture, which is much better then the reactor pattern regarding performance and throughput.
- If i use the proactor pattern, how to take advantage of the number CPU on my computer with the completion port?
thank you for your help.
In order to use your computer full power with the Proactor pattern you can use multiple threads with the ACE_WIN32_Proactor. The downside is that you will need to use locks to avoid concurrency problems on your shared objects.
Ephy Levy
P.S.
If you like, you can phone me and I can help you take the right decision, free of charge.
You already took a very good decision choosing ACE as your communication platform ;-)
Ishay Green
Software Architect
Onigma Ltd.
O +972-3-6877315
F +972-3-6877128
C +972-54-2325090
is...@onigma.com
This message may contain confidential, privileged or other legally protected information. It is intended for the addressee only. If you are not the addressee (or someone the addressee authorized to receive this message), you are prohibited from copying, distributing or otherwise using it. Please notify the sender and return it at our cost. Thank you.
Oh… also use a PRF form next time….
Ishay Green
Software Architect
Onigma Ltd.
O +972-3-6877315
F +972-3-6877128
C +972-54-2325090
is...@onigma.com
This message may contain confidential, privileged or other legally protected information. It is intended for the addressee only. If you are not the addressee (or someone the addressee authorized to receive this message), you are prohibited from copying, distributing or otherwise using it. Please notify the sender and return it at our cost. Thank you.
Hi,
if we wants to make same kind of Scalable socket server on Linux 2.6.x kernel with ACE 5.5
and the server should handle 20,000 request per second (but here the maximum number of clients will be 5 only)
what kind of ACE_Reactor we should use and what kind of concurrency strategy we should use.
Will the TP Reactor suitable for this kind of solution?
Thanks you very much for your help.
Regards,
Ankur Saxena.
Hi Ankur Saxena,
if we wants to make same kind of Scalable socket server on Linux 2.6.x kernel with ACE 5.5
and the server should handle 20,000 request per second (but here the maximum number of clients will be 5 only)
what kind of ACE_Reactor we should use and what kind of concurrency strategy we should use.
Will the TP Reactor suitable for this kind of solution?
To ensure that we have proper version/platform/compiler information, please make sure you fill out the appropriate problem report form (PRF), which is in
$ACE_ROOT/PROBLEM-REPORT-FORM
$TAO_ROOT/PROBLEM-REPORT-FORM
or in
$ACE_ROOT/BUG-REPORT-FORM
$TAO_ROOT/BUG-REPORT-FORM
in older versions of ACE+TAO. Make sure to include this information when asking any questions about ACE+TAO since otherwise we have to "guess" what version/platform/compiler/options you've using, which is very error-prone and slows down our responsiveness. Therefore, if you don't use the PRF, it is less likely that someone will answer your question.