imap, send/recv_io, etc: Working on a problem...
Hal Fulton <[email protected]>
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
Hello, all.
I'm re-learning mod_ruby, as I will have to use it seriously soon.
What I'm working on is an IMAP connection cache for a webmail client.
The basic problem is this:
1. IMAP connections are fairly "expensive" because of the complexity
of the protocol.
2. In a webmail client, we don't want to re-establish the connection
each time.
3. So the idea is to establish the connection once and keep it until
a certain timeout period. When the same request appears again, the
client will get the cached value rather than a new connection.
So I have some questions:
1. Is it possible to use the "parent" Apache process to run this code?
If it's possible, is there any reason not to do so?
2. Can I use send_io and recv_io to pass the connection between
processes? Or if the cache is owned by the parent, should I try
some other method?
3. Is send_fd relevant here? I don't yet understand how it works.
Thanks for any assistance...
Hal Fulton