[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] Thread Pooling
From: |
Richard Alimi |
Subject: |
[libmicrohttpd] Thread Pooling |
Date: |
Wed, 4 Mar 2009 19:46:44 -0500 |
User-agent: |
KMail/1.11.0 (Linux/2.6.25.9; KDE/4.2.0; x86_64; ; ) |
Hi All,
First of all, thank you for a wonderful library! We're currently using this in
our implementation of P4P, which is a way for ISPs to provide network
information to help applications optimize network usage (e.g., peer selection
in BitTorrent).
You can probably imagine in this use case that we need the ability to scale to
a large number of users. Thus, I'm quite interested in the epoll()
enhancement that has been proposed. I've currently got a patch (currently
against SVN Revision 7728) to implement thread pooling. It basically operates
by spawning a fixed (configurable) number of threads at startup, and each
thread handles a single connection at a time. Thus, it is basically
THREAD_PER_CONNECTION mode without the overhead of spawning new threads upon
accepting a new connection.
Ideally, this would be extended to be able to spawn multiple threads, and
within each thread use select() (or epoll()) to handle multiple connections
simultaneously.
So, there are basically two questions:
1) Is there interest in merging a patch for the current thread pooling
implementation? If so, I'll be more than happy to clean it up, update to the
current SVN revision, and submit.
2) Is there interest in extending it to support multiple connections within
each thread? If so, I can see about additionally implementing this behavior.
Thanks!
--
Richard Alimi
Department of Computer Science
Yale University
- [libmicrohttpd] Thread Pooling,
Richard Alimi <=