trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Protocol plugin
Date Wed, 09 Jan 2013 02:32:02 GMT
On 08/01/2013, at 4:02 PM, Leif Hedstrom <zwoop@apache.org> wrote:

> On 1/8/13 2:11 PM, kgardenia42 wrote:
>> Hi,
>> 
>> I have a requirement for a simple plugin between a user and TS whereby
>> the protocol between the user an TS is a simple binary protocol (for
>> the purposes of discussion lets say it is 4 byte length, followed by a
>> block data of the stated length).
>> 
>> I have looked at the docs for protocol plugins and also the the sample
>> "protocol plugin", and SPDY plugin.
>> 
>> My issue with the sample protocol plugin is that it involves custom
>> request parsing and cache lookup logic.  In my case it is simpler, I
>> just want to unframe the data and then pass it on to the normal TS
>> engine (i.e. I don't want to write code to do request parsing and
>> cache lookups).
> 
> If the "framing" is over HTTP requests, then simply extract it and use TSHttpConnect()
to fetch that request. That will go through normal request parsing, cache lookups, use origin
session pools etc. It's sort of the equivalent to connecting to localhost:80 and do the request.

Yep, this is exactly what the SPDY plugin does, and it sounds like your protocol plugin would
be almost the same (sans SPDY framing).

J
Mime
View raw message