doi: 10.4304/jsw.9.10.2579-2585
Event-Driven Extraction of HTTP Payload From Concurrent Streams
- 1 National Network New Media Engineering Research Center, Institute of Acoustics, Chinese Academy of Sciences, Beijing 100190, China
- 2 University of Chinese Academy of Sciences, Beijing 100190, China
Abstract
Many network devices undertake tasks that involveextracting HTTP payload from a large number of datastreams. In order to model such tasks and thus developfeasible approaches, this paper analyzes action characteristicsof network byte stream reading and grammar ofHTTP response message encoding. Based on this analysis, wepropose a parsing algorithm for concurrent HTTP responsestreams, built upon stack buffer peeking operations and theextended finite state machine model. Implementation issueson parallel platforms are also studied in this paper. Ourscheme is event-driven, does not require full buffering of thewhole HTTP message, and saves one memory copy comparedto naive static parsing method. Test results show that ourmethod achieves better performance in terms of CPU andmemory consumption.
Keywords
- HTTP response
- chunked encoding
- extende
How to Cite
Mingzhe Li, Jinlin Wang, Xiao Chen, and Jun Chen, "Event-Driven Extraction of HTTP Payload From Concurrent Streams," Journal of Software, vol. 9, no. 10, pp. 2579-2585, 2014. https://doi.org/ 10.4304/jsw.9.10.2579-2585
Copyright & License
Copyright © 2014 by the authors. This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited (CC BY 4.0).
