|
Home > Archive > Perlbal > May 2007 > Using epoll for blocking operations other than file I/O?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using epoll for blocking operations other than file I/O?
|
|
|
| Hello,
I am currently using both Memcached and Perlbal as part of a Perl/C
internal web application. I have also written my own non-blocking
single-process web server in PERL using epoll via Sys::Syscall.
I would like to allow my epoll web server to send emails via SMTP.
Naturally I want to do this in a manner than is non-blocking.
What is the best way for a Sys::Syscall epoll PERL script to
asynchronously send emails via SMTP? I'm not religious about SMTP
servers.
Perhaps I can open a socket to some sort of SMTP proxy server and
register epoll read/write callbacks to queue an email message? Does
anyone know of such a TCP/IP SMTP queueing proxy server?
Sorry about being off-topic, but I couldn't find a better list for
discussing Sys::Syscall.
P.S., I just noticed 'Gearman' on danga.com. Should I be using Gearman
to address this problem?
Thanks!
| |
| Ask Bjørn Hansen 2007-05-13, 7:11 am |
|
On May 12, 2007, at 10:09 PM, EKC wrote:
> P.S., I just noticed 'Gearman' on danga.com. Should I be using Gearman
> to address this problem?
That'd be an easy way to do it. Depending on the work load, queue
and reliability requirements you might want to just have the gearman
worker insert the email into a database queue (or qmail/postfix/
sendmail queue if there's very little or no processing work involved).
- ask
--
http://develooper.com/ - http://askask.com/
| |
| Brad Fitzpatrick 2007-05-14, 1:11 am |
| Yeah, I'd totally use gearman... in particular, Gearman::Client::Async
works wonderfully from Danga::Socket (epoll) loops, which perlbal uses.
On Sat, 12 May 2007, EKC wrote:
> Hello,
>
> I am currently using both Memcached and Perlbal as part of a Perl/C
> internal web application. I have also written my own non-blocking
> single-process web server in PERL using epoll via Sys::Syscall.
>
> I would like to allow my epoll web server to send emails via SMTP.
> Naturally I want to do this in a manner than is non-blocking.
>
> What is the best way for a Sys::Syscall epoll PERL script to
> asynchronously send emails via SMTP? I'm not religious about SMTP
> servers.
>
> Perhaps I can open a socket to some sort of SMTP proxy server and
> register epoll read/write callbacks to queue an email message? Does
> anyone know of such a TCP/IP SMTP queueing proxy server?
>
> Sorry about being off-topic, but I couldn't find a better list for
> discussing Sys::Syscall.
>
> P.S., I just noticed 'Gearman' on danga.com. Should I be using Gearman
> to address this problem?
>
> Thanks!
>
>
|
|
|
|
|