More Related Content
Similar to How Danga::Socket handles asynchronous processing and how to write asynchronous Perlbal plugins
Similar to How Danga::Socket handles asynchronous processing and how to write asynchronous Perlbal plugins (20)
More from Gosuke Miyashita
More from Gosuke Miyashita (16)
How Danga::Socket handles asynchronous processing and how to write asynchronous Perlbal plugins
- 10. Eaxmple of main loop Process timers Wait I/O events Process I/O events Post main loop process
- 21. Perlbal mechanism(as reverse proxy) BackendHTTP ClientProxy TCPListener Client Server ClientProxy Client BackendHTTP Danga::Socket based objects
- 22. Perlbal with a plugin (on start_proxy_request hook) BackendHTTP ClientProxy TCPListener Client Server Plugin::Hoge Target of this session
- 25. In case of a synchronous plugin ClientProxy TCPListener Client Server Plugin::Sync Client
- 26. In case of an asynchronous plugin ClientProxy TCPListener Client Server Plugin::Async Client ClientProxy
- 33. In case of “return 0” BackendHTTP ClientProxy TCPListener Client Server Plugin::Async Go to next step even if Plugin::Async is not finished
- 34. “ return 1” & “call back” BackendHTTP ClientProxy TCPListener Client Plugin::Async Stop the process and go to main loop Server return 1 call back