? 2013 Websense, Inc. Page 1 Proprietary and Confidential TRITON STOPS MORE THREATS. WE CAN PROVE IT. Async Framework Hand-off ? 2013 Websense, Inc. Page 2 Proprietary and Confidential History ? Group wanted a new Filtering Server to improve performance - Fusion – Avoid all blocking calls – Minimal internal locking – Put tasks on working queues to maximize CPU usage – Avoid using any existing libraries, including WIFFLE ? Developed by several developers over a year period ? 2013 Websense, Inc. Page 3 Proprietary and Confidential ? Async IO ? Resources ? Tasks ? Task Pool ? Foundation Classes – Many taken from WFC Base ? Callback driven or wait on an event Basic Concepts ? 2013 Websense, Inc. Page 4 Proprietary and Confidential Async IO ? Multiple requests to be sent on one connection without blocking ? Requires each message to be complete – Can not have half a message mixed with the other half of a message ? Multiple responses returned without blocking ? Each message has a Unique ID – so the caller can match the sent request with the received response ? 2013 Websense, Inc. Page 5 Proprietary and Confidential TCP / UDP Message ? Requires message to have distinct begin and end – Wisp msg have length field as first element – State Server msg have length field as first element too – Currently using unsigned short so 65535 byte limit on msg ? Requires msg type – if more than one type of msg can be sent on a single connection – WISP msg types ? 0xAE = Dynamic Log EX ? 0xAF = URL category Lookup V6 EX ? 2013 Websense, Inc. Page 6 Proprietary and Confidential Cycle of life ? Tell system you want to add/delete an event ? Pipe signals poll to wake up ? New event added ? Poll (Unix) / pletion Ports (Windows) ? System waits on event ? Event is triggered and callbacks called ? System puts all events back on poll and waits again ? 2013 Websense, Inc. Page 7 Proprietary and Confidential State Diagram of Async ? 2013 Websense,
async framework 来自淘豆网www.taodocs.com转载请标明出处.