You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by shirish <sh...@gmail.com> on 2010/04/21 14:10:55 UTC

Documentation / SDK correction

Hello,

I was going through the documentation of traffic server sdk
http://incubator.apache.org/trafficserver/docs/v2/sdk/ASimplePlugin.html

the source code example of hello-world has deprecated name ( I suppose ) if
InkAPI.h which has been renamed in the issue
https://issues.apache.org/jira/browse/TS-9 ,
 InkAPI.h and RemapPlugin.h are missing from /usr/local/include
to ts.h in and the #include of hello-world.c should be modified as #include
"ts/ts.h" and also after replacing it. There is a small logical flaw in the
program compilation using gcc


gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c


actually raises error
/usr/local/include/ts/ts.h:2031: error: expected declaration specifiers or
‘...’ before ‘bool’

and which is correct since 'C' Doesn't support bool type. Either an enum in
the file ts.h at the top is to be defined or change the documented example
to g++.

Thanking you,

cheers
shirish

Re: Documentation / SDK correction

Posted by shirish <sh...@gmail.com>.
Thank you, but about the second post there is no
proxy.config.diags.output.note in records.config what should I set so that
the output is visible on the console for the hello world plugin.


cheers,
Shirish


On Wed, Apr 21, 2010 at 5:50 PM, shirish <sh...@gmail.com> wrote:

> Hello,
>
> One more thing how do I output traffic server notes to console. Its given
> that "N*ote:* in the example above, Traffic Server notes are directed to
> the console by specifying E for proxy.config.diags.output.note in
> records.config. The second note shows Traffic Server attempting to load
> the hello-world plugin. The third line of Traffic Server output is from
> your plugin."
>
> But there is no field proxy.config.diags.output.note. Can any one point me
> out on how to do this. I successfully got the .so file generated and linked.
>
> thanks
>
> cheers
> Shirish Reddy P
> (Student)
> Indian Institute Of Information Technology, Allahabad
> Mob No. +919987398253
>
>
>
>
> On Wed, Apr 21, 2010 at 5:40 PM, shirish <sh...@gmail.com> wrote:
>
>> Hello,
>>
>> I was going through the documentation of traffic server sdk
>> http://incubator.apache.org/trafficserver/docs/v2/sdk/ASimplePlugin.html
>>
>> the source code example of hello-world has deprecated name ( I suppose )
>> if InkAPI.h which has been renamed in the issue
>> https://issues.apache.org/jira/browse/TS-9 ,
>>  InkAPI.h and RemapPlugin.h are missing from /usr/local/include
>> to ts.h in and the #include of hello-world.c should be modified as
>> #include "ts/ts.h" and also after replacing it. There is a small logical
>> flaw in the program compilation using gcc
>>
>>
>> gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c
>>
>>
>> actually raises error
>> /usr/local/include/ts/ts.h:2031: error: expected declaration specifiers or
>> ‘...’ before ‘bool’
>>
>> and which is correct since 'C' Doesn't support bool type. Either an enum
>> in the file ts.h at the top is to be defined or change the documented
>> example to g++.
>>
>> Thanking you,
>>
>> cheers
>> shirish
>>
>
>

Re: Documentation / SDK correction

Posted by shirish <sh...@gmail.com>.
Hello,

One more thing how do I output traffic server notes to console. Its given
that "N*ote:* in the example above, Traffic Server notes are directed to the
console by specifying E for proxy.config.diags.output.note in records.config.
The second note shows Traffic Server attempting to load the hello-world plugin.
The third line of Traffic Server output is from your plugin."

But there is no field proxy.config.diags.output.note. Can any one point me
out on how to do this. I successfully got the .so file generated and linked.

thanks

cheers
Shirish Reddy P
(Student)
Indian Institute Of Information Technology, Allahabad
Mob No. +919987398253



On Wed, Apr 21, 2010 at 5:40 PM, shirish <sh...@gmail.com> wrote:

> Hello,
>
> I was going through the documentation of traffic server sdk
> http://incubator.apache.org/trafficserver/docs/v2/sdk/ASimplePlugin.html
>
> the source code example of hello-world has deprecated name ( I suppose ) if
> InkAPI.h which has been renamed in the issue
> https://issues.apache.org/jira/browse/TS-9 ,
>  InkAPI.h and RemapPlugin.h are missing from /usr/local/include
> to ts.h in and the #include of hello-world.c should be modified as #include
> "ts/ts.h" and also after replacing it. There is a small logical flaw in the
> program compilation using gcc
>
>
> gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c
>
>
> actually raises error
> /usr/local/include/ts/ts.h:2031: error: expected declaration specifiers or
> ‘...’ before ‘bool’
>
> and which is correct since 'C' Doesn't support bool type. Either an enum in
> the file ts.h at the top is to be defined or change the documented example
> to g++.
>
> Thanking you,
>
> cheers
> shirish
>

Re: Documentation / SDK correction

Posted by Leif Hedstrom <zw...@apache.org>.
On 04/26/2010 08:19 AM, Sandeep Kalidindi at PaGaLGuY.com wrote:
> @Leif - My bad should have been more clear with my query.  Re-phrasing 
> my question.
>
> The current functionality of the cache is quiet awesome. Most of our 
> needs are being taken care of. Thank you guys for open sourcing the 
> traffic server.
>
> because the object store is quiet fast we are planning to use it as 
> our image server. We want to write a plugin which accepts an image, do 
> certain modifications etc to the plugin and then store it in the 
> cache. Although it is quiet clear you can do this easily by reading 
> the current documentation and the state-machine diagram (regarding 
> where to hook your image processing c code.) The aspect which we are 
> having trouble is what is the best way to handle the cache store from 
> the plugins. Regarding that we couldn't find proper documentation (i 
> guess one of you is in the process of writing).

It sounds like what you are doing is a "transform" plugin, right?  You 
shouldn't use the cache plugin APIs for that, after checking with Steve, 
the primary APIs to use related to transforms and cache is to control 
whether the data should be cached pre- or post-transformation. I think 
you want to look at these APIs for some details, maybe in:

       
http://incubator.apache.org/trafficserver/docs/v2/sdk/HTTPTransactionFunctions.html


The Cache Plugin APIs are intended for writing  a complete cache 
replacement. It's a new API, which is why the documentation is still not 
updated (Diane and Miles are working hard on getting everything up to 
speed). There are no examples released for these APIs yet, but we have 
two cache replacements that we will (hopefully) OpenSource soon, one is 
a RAM-only cache, and the other is a file system based cache (one file 
per cached object).

Cheers,


-- Leif

Re: Documentation / SDK correction

Posted by "Sandeep Kalidindi at PaGaLGuY.com" <sa...@pagalguy.com>.
@Leif - My bad should have been more clear with my query.  Re-phrasing my
question.

The current functionality of the cache is quiet awesome. Most of our needs
are being taken care of. Thank you guys for open sourcing the traffic
server.

because the object store is quiet fast we are planning to use it as our
image server. We want to write a plugin which accepts an image, do certain
modifications etc to the plugin and then store it in the cache. Although it
is quiet clear you can do this easily by reading the current documentation
and the state-machine diagram (regarding where to hook your image processing
c code.) The aspect which we are having trouble is what is the best way to
handle the cache store from the plugins. Regarding that we couldn't find
proper documentation (i guess one of you is in the process of writing).

Chance is that we have missed the docs which discussed how to deal with
cache store from plugins in which case i apologize but please point me to
appropriate files.

Else one of you guys can help us out and once we are done with the plugin we
will document it and will look to contribute to the documentation of cache
plugins.

Cheers,
Deepu.

On Mon, Apr 26, 2010 at 7:31 PM, Leif Hedstrom <zw...@apache.org> wrote:

> On 04/26/2010 04:10 AM, Sandeep Kalidindi at PaGaLGuY.com wrote:
>
>> shirish and i work at the same place.
>>
>> we are planning to use traffic server in production. Need to write couple
>> of cache plugins very soon.
>>
>
> Out of curiosity, what in the existing cache doesn't fit your needs? We are
> aware of a few shortcomings, but I'm sure John and the entire dev team would
> love to hear what else needs to be fixed, improved or added to the cache to
> suit more users.
>
> Also, why do you think you need two cache plugins? Are these two different
> apps? Note that you can only use one cache (and hence, one cache plugin) at
> a time, there is currently no way to "chain" or "selectively use" multiple
> cache implementations.
>
> Cheers,
>
> -- Leif
>
>

Re: Documentation / SDK correction

Posted by Leif Hedstrom <zw...@apache.org>.
On 04/26/2010 04:10 AM, Sandeep Kalidindi at PaGaLGuY.com wrote:
> shirish and i work at the same place.
>
> we are planning to use traffic server in production. Need to write 
> couple of cache plugins very soon.

Out of curiosity, what in the existing cache doesn't fit your needs? We 
are aware of a few shortcomings, but I'm sure John and the entire dev 
team would love to hear what else needs to be fixed, improved or added 
to the cache to suit more users.

Also, why do you think you need two cache plugins? Are these two 
different apps? Note that you can only use one cache (and hence, one 
cache plugin) at a time, there is currently no way to "chain" or 
"selectively use" multiple cache implementations.

Cheers,

-- Leif


Re: Documentation / SDK correction

Posted by "Sandeep Kalidindi at PaGaLGuY.com" <sa...@pagalguy.com>.
shirish and i work at the same place.

we are planning to use traffic server in production. Need to write couple of
cache plugins very soon.

Can someone please help us out with our problems in cache plugins. I am sure
we will play around and properly document the whole process so that it will
be helpful for the rest of the users.

Cheers,
Deepu.

On Mon, Apr 26, 2010 at 3:22 PM, shirish <sh...@gmail.com> wrote:

>
> ---------- Forwarded message ----------
> From: shirish <sh...@gmail.com>
> Date: Sat, Apr 24, 2010 at 1:42 PM
> Subject: Re: Documentation / SDK correction
> To: dianes <di...@yahoo-inc.com>
>
>
> Hello,
>
> I see that the cache plugin #7 documentation has not started yet. I would
> like to know whether there is/are any example on the same that would
> enlighten me on how to R/W the cache of TS I would like to contribute
> towards the same in the documentation.
>
> thanking you,
>
> cheers,
> shirish.
>
>
>
> On Thu, Apr 22, 2010 at 11:02 PM, dianes <di...@yahoo-inc.com> wrote:
>
>> Ditto on what Leif wrote- I'm on this today :)
>>
>> -diane
>>
>>
>>
>> Leif Hedstrom wrote:
>>
>>> On 04/21/2010 06:10 AM, shirish wrote:
>>> Hello,
>>>
>>> I was going through the documentation of traffic server sdk
>>> http://incubator.apache.org/trafficserver/docs/v2/sdk/ASimplePlugin.html
>>>
>>> the source code example of hello-world has deprecated name ( I suppose )
>>> if InkAPI.h which has been renamed in the issue
>>> https://issues.apache.org/jira/browse/TS-9 ,
>>> InkAPI.h and RemapPlugin.h are missing from /usr/local/include
>>>
>>> Diane is working on updating all the docs for these changes.
>>>
>>> to ts.h in and the #include of hello-world.c should be modified as
>>> #include "ts/ts.h" and also after replacing it. There is a small logical
>>> flaw in the program compilation using gcc
>>>
>>> gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c
>>>
>>>
>>> actually raises error
>>> /usr/local/include/ts/ts.h:2031: error: expected declaration specifiers
>>> or ‘...’ before ‘bool’
>>>
>>> This is fixed both on trunk and as of last night, on the 2.0.x branch.
>>>
>>> Cheers,
>>>
>>> - Leif
>>>
>>>
>>>
>
>

Fwd: Documentation / SDK correction

Posted by shirish <sh...@gmail.com>.
---------- Forwarded message ----------
From: shirish <sh...@gmail.com>
Date: Sat, Apr 24, 2010 at 1:42 PM
Subject: Re: Documentation / SDK correction
To: dianes <di...@yahoo-inc.com>


Hello,

I see that the cache plugin #7 documentation has not started yet. I would
like to know whether there is/are any example on the same that would
enlighten me on how to R/W the cache of TS I would like to contribute
towards the same in the documentation.

thanking you,

cheers,
shirish.



On Thu, Apr 22, 2010 at 11:02 PM, dianes <di...@yahoo-inc.com> wrote:

> Ditto on what Leif wrote- I'm on this today :)
>
> -diane
>
>
>
> Leif Hedstrom wrote:
>
>> On 04/21/2010 06:10 AM, shirish wrote:
>> Hello,
>>
>> I was going through the documentation of traffic server sdk
>> http://incubator.apache.org/trafficserver/docs/v2/sdk/ASimplePlugin.html
>>
>> the source code example of hello-world has deprecated name ( I suppose )
>> if InkAPI.h which has been renamed in the issue
>> https://issues.apache.org/jira/browse/TS-9 ,
>> InkAPI.h and RemapPlugin.h are missing from /usr/local/include
>>
>> Diane is working on updating all the docs for these changes.
>>
>> to ts.h in and the #include of hello-world.c should be modified as
>> #include "ts/ts.h" and also after replacing it. There is a small logical
>> flaw in the program compilation using gcc
>>
>> gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c
>>
>>
>> actually raises error
>> /usr/local/include/ts/ts.h:2031: error: expected declaration specifiers or
>> ‘...’ before ‘bool’
>>
>> This is fixed both on trunk and as of last night, on the 2.0.x branch.
>>
>> Cheers,
>>
>> - Leif
>>
>>
>>

Re: Documentation / SDK correction

Posted by dianes <di...@yahoo-inc.com>.
Ditto on what Leif wrote- I'm on this today :)

-diane


Leif Hedstrom wrote:
> On 04/21/2010 06:10 AM, shirish wrote:
> Hello,
> 
> I was going through the documentation of traffic server sdk
> http://incubator.apache.org/trafficserver/docs/v2/sdk/ASimplePlugin.html
> 
> the source code example of hello-world has deprecated name ( I suppose ) if InkAPI.h which has been renamed in the issue https://issues.apache.org/jira/browse/TS-9 ,
> InkAPI.h and RemapPlugin.h are missing from /usr/local/include
> 
> Diane is working on updating all the docs for these changes.
> 
> to ts.h in and the #include of hello-world.c should be modified as #include "ts/ts.h" and also after replacing it. There is a small logical flaw in the program compilation using gcc
> 
> gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c
> 
> 
> actually raises error
> /usr/local/include/ts/ts.h:2031: error: expected declaration specifiers or ‘...’ before ‘bool’
> 
> This is fixed both on trunk and as of last night, on the 2.0.x branch.
> 
> Cheers,
> 
> - Leif
> 
> 

Re: Documentation / SDK correction

Posted by Miles Libbey <ml...@apache.org>.
Fwiw, that is being tracked in
https://issues.apache.org/jira/browse/TS-276
miles

On Apr 21, 2010, at 8:05 AM, Leif Hedstrom wrote:

> On 04/21/2010 06:10 AM, shirish wrote:
>>
>> Hello,
>>
>> I was going through the documentation of traffic server sdk
>> http://incubator.apache.org/trafficserver/docs/v2/sdk/ASimplePlugin.html
>>
>> the source code example of hello-world has deprecated name ( I  
>> suppose ) if InkAPI.h which has been renamed in the issue https://issues.apache.org/jira/browse/TS-9 
>>  ,
>> InkAPI.h and RemapPlugin.h are missing from /usr/local/include
>
> Diane is working on updating all the docs for these changes.
>
>> to ts.h in and the #include of hello-world.c should be modified as  
>> #include "ts/ts.h" and also after replacing it. There is a small  
>> logical flaw in the program compilation using gcc
>> gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c
>>
>>
>> actually raises error
>> /usr/local/include/ts/ts.h:2031: error: expected declaration  
>> specifiers or ‘...’ before ‘bool’
>
> This is fixed both on trunk and as of last night, on the 2.0.x branch.
>
> Cheers,
>
> - Leif
>


Re: Documentation / SDK correction

Posted by Leif Hedstrom <zw...@apache.org>.
On 04/21/2010 06:10 AM, shirish wrote:
> Hello,
>
> I was going through the documentation of traffic server sdk
> http://incubator.apache.org/trafficserver/docs/v2/sdk/ASimplePlugin.html
>
> the source code example of hello-world has deprecated name ( I suppose 
> ) if InkAPI.h which has been renamed in the issue 
> https://issues.apache.org/jira/browse/TS-9 ,
>
>
>       InkAPI.h and RemapPlugin.h are missing from /usr/local/include
>

Diane is working on updating all the docs for these changes.

> to ts.h in and the #include of hello-world.c should be modified as 
> #include "ts/ts.h" and also after replacing it. There is a small 
> logical flaw in the program compilation using gcc
> gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c
>    
>
> actually raises error
> /usr/local/include/ts/ts.h:2031: error: expected declaration 
> specifiers or ‘...’ before ‘bool’

This is fixed both on trunk and as of last night, on the 2.0.x branch.

Cheers,

- Leif