i have an existing ( a little incomplete ) api that allows to send asynchronous calls to a remote resource ( a mysql server over raw sockets without any of the php extensions should that matter ) which allows to send multiple parallel queries to the sql server over regular selectable streams. i know some mysql extensions allow that. i need a regular stream because i want to use other stream resources in the same select loop.
i was thinking i might derive one or several tcp wrapper(s), partly because i'd like a simpler api, and partly because i just happen to like the idea of fopen()ing an sql query to a server
unfortunately, it does not seem that any mechanism would allow a stream_select() call to work properly with such custom wrappers and there is zero use for my api unless it is stream_select()able. it is currently. but not through a wrapper.
nevertheless, some of php's builtin wrappers are properly selectable
is that somehow feasible with some builtin php mechanics i am unaware of ?
do these wrappers simply push data to descrete files or descriptors in separate threads and let the kernel handle the select, epoll, or whatever mechanism ? ( which is what i would guess )
thanks for sharing your knowlege.
please do not discuss how usefull/useless that is : this is besides the point unless you know of a way to miraculously grab the derived stream resource from mysqli, pdo, or whatever resource
i am obviously also interested in an existing sql extension that could work with libevent, libev, stream_select ... properly without forking or spawning external processes
thanks a bunch for your time