Updated Branches: refs/heads/master 1a2f7f448 -> 12b687f4d
transaction diagram was remade using graphviz Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/36352042 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/36352042 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/36352042 Branch: refs/heads/master Commit: 36352042726a9d9b5dc9d864673c8b923c51f4a6 Parents: 1a2f7f4 Author: heitorganzeli <heitor.ganz...@gmail.com> Authored: Mon Dec 2 15:36:03 2013 -0200 Committer: Igor GaliÄ <i.ga...@brainsware.org> Committed: Tue Dec 3 19:14:59 2013 +0100 ---------------------------------------------------------------------- doc/sdk/http-hooks-and-transactions.en.rst | 67 ++++++++++++++++++++++--- 1 file changed, 60 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/36352042/doc/sdk/http-hooks-and-transactions.en.rst ---------------------------------------------------------------------- diff --git a/doc/sdk/http-hooks-and-transactions.en.rst b/doc/sdk/http-hooks-and-transactions.en.rst index 98191cb..90cf8a8 100644 --- a/doc/sdk/http-hooks-and-transactions.en.rst +++ b/doc/sdk/http-hooks-and-transactions.en.rst @@ -72,12 +72,65 @@ it may consist of a single transaction or several transactions in succession. The session starts when the client connection opens and ends when the connection closes. -**HTTP Transaction State Diagram (*not yet updated*)** -{#HHTTPTxStateDiag} - -.. figure:: /static/images/sdk/http_state2.jpg - :alt: HTTP Transaction State Diagram - - HTTP Transaction State Diagram +**HTTP Transaction State Diagram** + + +.. graphviz:: +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]; +} +