Dan Pascu wrote: > On Monday 10 November 2008, Bogdan-Andrei Iancu wrote: > >>> 1. I know of no asynchronous database API, so in real life this >>> cannot be applied to a database connection. Other mechanisms need to >>> be employed with them. >>> >> I totally agree - this will be one of the challenges - to transform >> all the synchronous I/Os we have now is async ones ... >> > > Apparently there are async drivers for mysql (even libmysqlclient can be > used in async mode with some limitations though). Same seems to be true > for postgres. > > >>> 2. Context switching is completely unnecessary, as long as the >>> message you process is embodied in an object/structure that contains >>> all the relevant information about that message. When an event >>> happens and you get a notification and the associated object you just >>> operate on it. The classical context switching that is necessary with >>> multithreading or system processes it not needed here. >>> >> By context switching I was refering to the switching (inside the same >> thread/process) to a different SIP message to be processed (and its >> context) - not thread/process switching. >> > > I wasn't speaking of thread context switching either. But the context > switching you speak of is unnecessary as long as the message contains all > the related data. All you need when there is data on some input is a > callback and a pointer to the message structure associated with that > input. While you can name it context switching, there is no context to > save/restore in the usual sense. > yes, it is just a matter how you say it it words - the idea is the same :).
Regards, Bogdan _______________________________________________ Devel mailing list Devel@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/devel