[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Common CPP Classes for EventHandler Classes
From: |
Andrey Kulikov |
Subject: |
Re: Common CPP Classes for EventHandler Classes |
Date: |
Thu, 25 Sep 2003 14:52:32 +0400 |
Hello Mike,
MP> I have been looking at Common CPP for use in scaling our distributed system.
MP> I want to use what is termed an "EventHandler" (from the SEDA project at
MP> http://www.eecs.harvard.edu/~mdw/proj/seda/ ). The event handler is a Queue
MP> and some number of threads that process items from the queue. It is used as
a
MP> component for event handling/message passing in a server.
MP> I would like to create 2 types of "event handlers" and was wondering
MP> someone with CommonCPP experience could give me feedback on what CPP classes
MP> would be appropriate to combine together?
We have the same needs. And we have develop some framework for simple
writing 'client', which can connect to a 'server' and a server, which
can communicate with may 'clients' at the same time.
This framework contains mechanism for managing connections and
messages between clients and server. Of course, this based on
CommonC++ classes.
In the near future I'll prepare this for comfortable using by othe
peoples and put it in public access.
MP> 1) Message Processing Handler: input queue of Message objects and a pool of
MP> threads that process the messages. Threads wait on the queue and when a
queue
MP> item is added, one thread wakes up and processes the message. Then the
thread
MP> goes back to waiting on the queue.
MP> 2) Socket Class: we have 1500 HTTP connections to this server. We will have
a
MP> 3) I could have one thread per socket to read the data, process
MP> all the messages, send data back and then keep reading (using keep-alive on
MP> the socket).
--
Best regards,
Andrey mailto:address@hidden