c++ - Async Socket IO -
to refresh , expand c++ knowledge trying implement fcgi application , implement fcgi interface myself. however, have no expierience using sockets. research has lead me boost.asio, lack of socket knowledge find hard use library tutorials, code examples, , browsing apireference when not know looking difficult.
questions:
- which tutorial(other 1 coming wiht boost.asio)/book recommend read on sockets/asynchronus io?
- for fcgi find hard understand benefits of asyncio, header has decode first , data can received, how 1 benefits asynchronus i/o?
- is there heuristic know parameters (number of threads, sockets per thread, socket multiplexing(yes(how many connections?)/no, async io, buffersize) yield thebest performance fcgi interface?
i recommend (for free) beejs networking guide or (for pay) w richard stevens book on sockets.
aio (in case) method of multiplexing multiple connections. if don't have multiple connections won't see benefit. it's fastest though hardest method doing task. idea individual read or write connection may take time waiting resources available. aio allows application move on connection , service whilst waits resources. in short, app spends more time working , less time waiting, on multiple connections.
no. depends on architecture , expected load. clever web servers adjust of based on configuration , on measured usage.
Comments
Post a Comment