You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by James Peach <jp...@apache.org> on 2014/05/29 06:12:59 UTC

[API REVIEW] TSHttpIsInternalSession

Hi all,

I'd like to add a session-oriented counterpart to TSHttpIsInternalRequest, named TSHttpIsInternalSession:

	TSReturnCode TSHttpIsInternalSession(TSHttpSsn ssnp);

This API has identical semantics to TSHttpIsInternalRequest, except that it operates on a TSHttpSsn instead of a TSHttpTxn. The use case for this is the tcpinfo plugin; I want to avoid sampling TCP statistics for internal sessions, because they are not going to give meaningful data. The tcpinfo plugin samples at session start time, where the transaction is not available yet.

https://issues.apache.org/jira/browse/TS-2855

cheers,
James

Re: [API REVIEW] TSHttpIsInternalSession

Posted by Leif Hedstrom <zw...@apache.org>.
+1

> On May 28, 2014, at 10:12 PM, James Peach <jp...@apache.org> wrote:
> 
> Hi all,
> 
> I'd like to add a session-oriented counterpart to TSHttpIsInternalRequest, named TSHttpIsInternalSession:
> 
>    TSReturnCode TSHttpIsInternalSession(TSHttpSsn ssnp);
> 
> This API has identical semantics to TSHttpIsInternalRequest, except that it operates on a TSHttpSsn instead of a TSHttpTxn. The use case for this is the tcpinfo plugin; I want to avoid sampling TCP statistics for internal sessions, because they are not going to give meaningful data. The tcpinfo plugin samples at session start time, where the transaction is not available yet.
> 
> https://issues.apache.org/jira/browse/TS-2855
> 
> cheers,
> James

Re: [API REVIEW] TSHttpIsInternalSession

Posted by James Peach <jp...@apache.org>.
On May 29, 2014, at 12:02 PM, Leif Hedstrom <zw...@apache.org> wrote:

> 
> On May 28, 2014, at 10:12 PM, James Peach <jp...@apache.org> wrote:
> 
>> Hi all,
>> 
>> I'd like to add a session-oriented counterpart to TSHttpIsInternalRequest, named TSHttpIsInternalSession:
>> 
>> 	TSReturnCode TSHttpIsInternalSession(TSHttpSsn ssnp);
> 
> 
> After reviewing another bug, I’m wondering if we should maybe name this
> 
> 	TSHttpIsInternalSsn()
> 
> 
> I don’t feel strongly either way, Ssn / Txn seems used fairly frequently.
> 
> 
> I’m also filing a separate Jira on naming convention for the existing API, I think it should be either
> 
> 	TSHttpIsInternalTransaction()
> 
> or
> 
> 	TSHttpIsInternalTxn()

I'm not going to change the names as part of this proposal, and I think that whatever the names are, they should match. If you want to change them, you should use the standard naming conventions TSHttpTxnIsInternal, TSHttpSsnIsInternal. That said, if you change them you are going to break a lot of plugins.

J

Re: [API REVIEW] TSHttpIsInternalSession

Posted by Leif Hedstrom <zw...@apache.org>.
On May 28, 2014, at 10:12 PM, James Peach <jp...@apache.org> wrote:

> Hi all,
> 
> I'd like to add a session-oriented counterpart to TSHttpIsInternalRequest, named TSHttpIsInternalSession:
> 
> 	TSReturnCode TSHttpIsInternalSession(TSHttpSsn ssnp);


After reviewing another bug, I’m wondering if we should maybe name this

	TSHttpIsInternalSsn()


I don’t feel strongly either way, Ssn / Txn seems used fairly frequently.


I’m also filing a separate Jira on naming convention for the existing API, I think it should be either

	TSHttpIsInternalTransaction()

or

	TSHttpIsInternalTxn()


See https://issues.apache.org/jira/browse/TS-2862

Cheers,

— Leif


Re: [API REVIEW] TSHttpIsInternalSession

Posted by Brian Geffon <br...@apache.org>.
Makes sense +1.

Brian


On Wed, May 28, 2014 at 9:12 PM, James Peach <jp...@apache.org> wrote:

> Hi all,
>
> I'd like to add a session-oriented counterpart to TSHttpIsInternalRequest,
> named TSHttpIsInternalSession:
>
>         TSReturnCode TSHttpIsInternalSession(TSHttpSsn ssnp);
>
> This API has identical semantics to TSHttpIsInternalRequest, except that
> it operates on a TSHttpSsn instead of a TSHttpTxn. The use case for this is
> the tcpinfo plugin; I want to avoid sampling TCP statistics for internal
> sessions, because they are not going to give meaningful data. The tcpinfo
> plugin samples at session start time, where the transaction is not
> available yet.
>
> https://issues.apache.org/jira/browse/TS-2855
>
> cheers,
> James
>