You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Jon Leighton <le...@cis.udel.edu> on 2013/06/18 23:18:10 UTC

Can a module control the socket transport protocol?

I've been looking into the possibility of writing a module to support 
using SCTP as an alternative to TCP. After spending some time reading 
"The Apache Modules Book" and looking through the code, I have the 
impression that the module architecture doesn't support controlling the 
types of sockets that are opened. I'm hoping someone can either confirm 
or correct my impression. Thanks very much.

- Jon

Re: Can a module control the socket transport protocol?

Posted by Jon Leighton <le...@cis.udel.edu>.
On 6/19/13 10:46 AM, Matthew Steele wrote:
> On Tue, Jun 18, 2013 at 8:19 PM, Jon Leighton <le...@cis.udel.edu> wrote:
>
>> I don't think simply swapping SCTP for TCP has anything to offer HTTP -
>> that's just a starting point for me. I'm more interested in putting SCTP's
>> streams to good use, such as possibly tying it into mod-spdy. I've hacked
>> older versions of httpd to support HTTP over SCTP streams, but I was hoping
>> to do something much cleaner, like a module. My main concern is that I
>> don't see a way for a module to touch ap_listeners in listen.c, nor a way
>> to create my own list of listeners that I could somehow pass off to httpd.
>> I'll check out mod_ftp and mod_smtp as you suggested. Thanks very much.
>>
> By the way, if you do have any luck with supporting SCTP as a module, and
> especially if you end up integrating at all with mod_spdy, I'd be very
> interested to hear more about it!
>
> Cheers,
> -Matthew (mod_spdy author)
>
Glad to hear that - I won't keep it secret!

Re: Can a module control the socket transport protocol?

Posted by Matthew Steele <md...@google.com>.
On Tue, Jun 18, 2013 at 8:19 PM, Jon Leighton <le...@cis.udel.edu> wrote:

> I don't think simply swapping SCTP for TCP has anything to offer HTTP -
> that's just a starting point for me. I'm more interested in putting SCTP's
> streams to good use, such as possibly tying it into mod-spdy. I've hacked
> older versions of httpd to support HTTP over SCTP streams, but I was hoping
> to do something much cleaner, like a module. My main concern is that I
> don't see a way for a module to touch ap_listeners in listen.c, nor a way
> to create my own list of listeners that I could somehow pass off to httpd.
> I'll check out mod_ftp and mod_smtp as you suggested. Thanks very much.
>

By the way, if you do have any luck with supporting SCTP as a module, and
especially if you end up integrating at all with mod_spdy, I'd be very
interested to hear more about it!

Cheers,
-Matthew (mod_spdy author)

Re: Can a module control the socket transport protocol?

Posted by Jon Leighton <le...@cis.udel.edu>.
On 6/18/13 5:46 PM, Nick Kew wrote:
> On 18 Jun 2013, at 22:18, Jon Leighton wrote:
>
>> I've been looking into the possibility of writing a module to support using SCTP as an alternative to TCP. After spending some time reading "The Apache Modules Book" and looking through the code, I have the impression that the module architecture doesn't support controlling the types of sockets that are opened. I'm hoping someone can either confirm or correct my impression. Thanks very much.
> It's not covered by the book, and I'd need to tackle pretty much
> the same learning curve as you to hack it.
>
> Your startingpoint would probably be APR's network_io module.
> If you're thinking HTTP-over-SCTP (if indeed that makes any sense)
> then that may be most of what you need to do.  If not, or if you want
> to do everything as a module, you could start by looking at protocol
> modules like mod_ftp or mod_smtp.

I don't think simply swapping SCTP for TCP has anything to offer HTTP - 
that's just a starting point for me. I'm more interested in putting 
SCTP's streams to good use, such as possibly tying it into mod-spdy. 
I've hacked older versions of httpd to support HTTP over SCTP streams, 
but I was hoping to do something much cleaner, like a module. My main 
concern is that I don't see a way for a module to touch ap_listeners in 
listen.c, nor a way to create my own list of listeners that I could 
somehow pass off to httpd. I'll check out mod_ftp and mod_smtp as you 
suggested. Thanks very much.

Re: Can a module control the socket transport protocol?

Posted by Nick Kew <ni...@apache.org>.
On 18 Jun 2013, at 22:18, Jon Leighton wrote:

> I've been looking into the possibility of writing a module to support using SCTP as an alternative to TCP. After spending some time reading "The Apache Modules Book" and looking through the code, I have the impression that the module architecture doesn't support controlling the types of sockets that are opened. I'm hoping someone can either confirm or correct my impression. Thanks very much.

It's not covered by the book, and I'd need to tackle pretty much
the same learning curve as you to hack it.

Your startingpoint would probably be APR's network_io module.
If you're thinking HTTP-over-SCTP (if indeed that makes any sense)
then that may be most of what you need to do.  If not, or if you want
to do everything as a module, you could start by looking at protocol
modules like mod_ftp or mod_smtp.

-- 
Nick Kew