[ace-users] ACE_Reactor question

Mihai Bucica misu200 at yahoo.com
Tue Oct 2 08:21:18 CDT 2007


Ok.It's my fault because I didn't detailed enough the
problem.

The HTTP server must deal with one client at a time.
While I'm serving one client I don't want the Acceptor
to handle new connections by creating new
service-handling object(RequestResponse_Handler
objects  in my case).

I have
class RequestResponse_Handler : public
ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH> { ..}

1)This means that when a client connects
RequestResponse_Handler::open() is called
2) When I receive the query string
RequestResponse_Handler::handle_input() is called and
the request is passed to thread #2 to do the hard
work.
3)At one moment in future thread #2 ends its work and
puts the response in the sync queue of
service-handling object with
RequestResponse_Handler::putq(mb)
4)After that ::handle_output() & handle_close() is
called.


ONLY NOW(after step 4) I want the Acceptor to serve
the next (buffered) TCP connection request by creating
a new service-handling object(RequestResponse_Handler)


Thanks,
Valentin












--- "Douglas C. Schmidt" <schmidt at dre.vanderbilt.edu>
wrote:

> Hi Valenin,
> 
> Thanks for using the PRF.
> 
> >ACE VERSION: 5.5.7
> 
> Please upgrade to ACE+TAO+CIAO x.6.1 (i.e., ACE
> 5.6.1, TAO 1.6.1, and
> CIAO 0.6.1), which you can download from
> 
> http://download.dre.vanderbilt.edu
> 
> under the heading: "Latest Beta Kit."
> 
> The DOC groups at Washington University, UC Irvine,
> and Vanderbilt
> University only provide "best effort" support for
> non-sponsors for the
> latest release, as described in
> 
>
http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/docs/ACE-bug-process.html
> 
> Thus, if you need more "predictable" help for
> earlier versions of
> ACE+TAO, I recommend that you check out
> 
> http://www.dre.vanderbilt.edu/support.html
> 
> for a list of companies that will provide you with
> ACE+TAO commercial
> support.
> 
> >HOST MACHINE and OPERATING SYSTEM:
> >x86, Win XP
> >
> >AREA/CLASS/EXAMPLE AFFECTED:
> >ACE_Strategy_Acceptor/ACE_Reactor
> >
> >DOES THE PROBLEM AFFECT:
> >
> >      COMPILATION? NO
> >      LINKING? NO
> >      EXECUTION? NO
> >      OTHER (please specify)? Need info on how to
> use
> >ACE_Reactor
> >
> >SYNOPSIS:
> >I've some kind of HTTP server made with
> >ACE_Strategy_Acceptor/ACE_Reactor.
> >
> >I'm trying to buffer incoming connections while the
> >HTTP server is responding to the current request.
> This
> >means I dont want that a new connection to cause
> >handle_input() to be called while performing work
> with
> >another connection.
> 
> Since the ACE_Reactor is single-threaded by default
> then a new
> connection won't cause handle_input() to called
> while performing work
> on another connection.  Please see Chapter 3 and 4
> of C++NPv2
> <www.cs.wustl.edu/~schmidt/ACE/book2/> for details.
> 
> Thanks,
> 
>         Doug
> -- 
> Dr. Douglas C. Schmidt                      
> Professor and Associate Chair
> Electrical Engineering and Computer Science  TEL:
> (615) 343-8197
> Vanderbilt University                        WEB:
> www.dre.vanderbilt.edu/~schmidt
> Nashville, TN 37203                          NET:
> d.schmidt at vanderbilt.edu
> 



      ____________________________________________________________________________________
Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV.
http://tv.yahoo.com/ 



More information about the Ace-users mailing list