Hello,

I'd want to add 2 more API hooks, TS_HTTP_POST_REMAP_HOOK &
TS_HTTP_PRE_REMAP_HOOK, into state diagram based on Heitor's great
contribution.

TS_HTTP_PRE_REMAP_HOOK is new name of TS_HTTP_READ_REQUEST_PRE_REMAP_HOOK
since v2.1.5

New state diagram can be found
here<https://issues.apache.org/jira/secure/attachment/12616663/http_state.png>
.

Jira ticket <https://issues.apache.org/jira/browse/TS-2397> also update.


Thanks,
-Ethan


2013/12/3 Igor Galić <[email protected]>

>
> A couple of comments,
>
> +  TS_HTTP_OS_DNS_HOOK -> TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK;
>
> +
> +  TS_HTTP_TXN_START_HOOK [shape=box];
>
>
> +  TS_HTTP_READ_RESPONSE_HDR_HOOK [shape = box];
>
>
> +}
> +
>
>
> These line has a trailing space, please remove it
> ------------------------------
>
>  ok, git request pulled
>
>  *From:* IgorGalić <[email protected]>
> *Sent:* Monday, December 02, 2013 1:20 PM
> *To:* [email protected] <[email protected]>
> *Subject:* Re: HTTP Transaction State Diagram updated?
>
>  sweeet!
>
> Would you mind putting that into a patch in 
> Jira<https://issues.apache.org/jira/browse/TS>
> or otherwise create pull request on 
> GitHub<https://github.com/apache/trafficserver/>
>
>
> Thank you very very much!!
>
> ------------------------------
>
>  Hi,
>
> I`ve created the folloing graphviz code to update that diagram (the result
> is attached).
>
> Hope it helps.
>
> Heitor
>
> digraph g{
>   accept -> TS_HTTP_TXN_START_HOOK;
>   TS_HTTP_TXN_START_HOOK -> "read req hdrs";
>   "read req hdrs" -> TS_HTTP_READ_REQUEST_HDR_HOOK;
>   TS_HTTP_READ_REQUEST_HDR_HOOK -> "cache lookup";
>   "cache lookup" -> DNS [label = "miss"];
>   DNS -> TS_HTTP_OS_DNS_HOOK;
>   TS_HTTP_OS_DNS_HOOK -> TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK;
>   "cache lookup" -> TS_HTTP_SELECT_ALT_HOOK [label = "hit"];
>   TS_HTTP_SELECT_ALT_HOOK -> "cache match";
>   "cache match" -> TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK [label="no match"];
>   "cache match" -> TS_HTTP_READ_CACHE_HDR_HOOK [label = "cache fresh"];
>   TS_HTTP_READ_CACHE_HDR_HOOK -> "cache fresh";
>   "cache fresh" -> TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK;
>   TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK -> "lock URL in cache" [label =
> "miss"];
>   TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK -> "lock URL in cache" [label = "no
> match  "];
>   TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK -> "lock URL in cache" [label =
> "stale"];
>   TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK -> "send cached hdrs" [label =
> "fresh"];
>   "send cached hdrs" -> "set up transform";
>   "lock URL in cache" -> "pick address";
>   "pick address" -> "try connect" [label = "       "];
>   "try connect" -> "pick address" [label = "fail"];
>   "try connect" -> TS_HTTP_SEND_REQUEST_HDR_HOOK [label = "success"];
>   TS_HTTP_SEND_REQUEST_HDR_HOOK -> "send req hdrs";
>   "send req hdrs" -> "set up POST/PUT read" [label = "POST/PUT"];
>   "send req hdrs" -> "read reply hdrs" [label = "GET"];
>   "set up POST/PUT read" -> "set up req transform";
>   "set up req transform" -> "tunnel req body";
>   "tunnel req body" -> "read reply hdrs";
>   "read reply hdrs" -> TS_HTTP_READ_RESPONSE_HDR_HOOK;
>   TS_HTTP_READ_RESPONSE_HDR_HOOK -> "check valid";
>   "check valid" -> "setup server read" [label = "yes"];
>   "check valid" -> "pick address" [label = "no"];
>   "setup server read" -> "set up cache write" [label = "cacheable"];
>   "setup server read" -> "set up transform" [label = "uncacheable"];
>   "set up cache write" -> "set up transform";
>   "set up transform" -> TS_HTTP_SEND_RESPONSE_HDR_HOOK;
>   TS_HTTP_SEND_RESPONSE_HDR_HOOK -> "send reply hdrs";
>   "send reply hdrs" -> "tunnel response";
>   "tunnel response" -> TS_HTTP_TXN_CLOSE_HOOK;
>   TS_HTTP_TXN_CLOSE_HOOK -> accept;
>
>   TS_HTTP_TXN_START_HOOK [shape=box];
>   TS_HTTP_READ_REQUEST_HDR_HOOK [shape = box];
>   TS_HTTP_OS_DNS_HOOK [shape = box];
>   TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK[shape = box];
>   TS_HTTP_SELECT_ALT_HOOK [shape = box];
>   TS_HTTP_READ_CACHE_HDR_HOOK [shape = box];
>   TS_HTTP_SEND_REQUEST_HDR_HOOK [shape = box];
>   "set up req transform" [tooltip = "req transform takes place here"];
>   TS_HTTP_READ_RESPONSE_HDR_HOOK [shape = box];
>   "set up transform" [tooltip = "response transform takes place here"];
>   TS_HTTP_SEND_RESPONSE_HDR_HOOK [shape = box];
>   TS_HTTP_TXN_CLOSE_HOOK [shape = box];
> }
>
>
>  *From:* IgorGalić <[email protected]>
> *Sent:* Tuesday, November 26, 2013 1:59 PM
> *To:* mailto:[email protected]<[email protected]>;
> [email protected]
> *Subject:* Re: HTTP Transaction State Diagram updated?
>
>
>
> ------------------------------
>
>  Hi,
>
> I've found that the State transition in HTTP Transaction State 
> Diagram<http://trafficserver.readthedocs.org/en/latest/sdk/http-hooks-and-transactions.en.html>may
>  be incorrect.
>
> Per my http.* debug log,
>
>> (http) [0] State Transition: STATE_UNDEFINED -> API_READ_REQUEST_HDR
>> (http) [0] State Transition: API_READ_REQUEST_HDR -> HTTP_API_PRE_REMAP
>> (http) [0] State Transition: HTTP_API_PRE_REMAP -> HTTP_REMAP_REQUEST
>> (http) [0] State Transition: HTTP_REMAP_REQUEST -> HTTP_API_POST_REMAP
>>
>> *(http) [0] State Transition: HTTP_API_POST_REMAP -> CACHE_LOOKUP(http)
>> [0] State Transition: CACHE_LOOKUP -> DNS_LOOKUP*
>> (http) [0] State Transition: DNS_LOOKUP -> API_OS_DNS
>
> CACHE_LOOKUP is just after POST_REMAP and is ahead of DNS_LOOKUP.
>
> But in the State Diagram, CACHE_LOOKUP is after OS_DNS_HOOK.
>
> I'm using ats-4.0.1, it would be great if some body can correct the
> diagram.  :)
> Many Thanks!
>
> -Ethan
>
>
> It would be really awesome if someone could update that.
> it would be even more awesome if that update it such that it's
> generated from "code", see
>
> http://www.opsschool.org/en/latest/meta/conventions.html and
> its code:
> https://raw.github.com/opsschool/curriculum/master/meta/conventions.rst
> as an example.
>
> I have also created a Jira issue on for this: 
> TS-2397<https://issues.apache.org/jira/browse/TS-2397>
>
> ++ i
> Igor Galić
>
> Tel: +43 (0) 664 886 22 883
> Mail: [email protected]
> URL: http://brainsware.org/
> GPG: 8716 7A9F 989B ABD5 100F  4008 F266 55D6 2998 1641
>
>
>
> ------------------------------
>    <http://www.avast.com/>
>
> This email is free from viruses and malware because avast! 
> Antivirus<http://www.avast.com/>protection is active.
>
>
>
>
> --
> Igor Galić
>
> Tel: +43 (0) 664 886 22 883
> Mail: [email protected]
> URL: http://brainsware.org/
> GPG: 8716 7A9F 989B ABD5 100F  4008 F266 55D6 2998 1641
>
>
>
> ------------------------------
>    <http://www.avast.com/>
>
> This email is free from viruses and malware because avast! 
> Antivirus<http://www.avast.com/>protection is active.
>
>
>
>
> --
> Igor Galić
>
> Tel: +43 (0) 664 886 22 883
> Mail: [email protected]
> URL: http://brainsware.org/
> GPG: 8716 7A9F 989B ABD5 100F  4008 F266 55D6 2998 1641
>
>

Reply via email to