Hi , Richard I know that is not very concerned about Clearwater , Thanks for your time to answer my question .
Thank you very much . Morris 2016-09-07 0:58 GMT+08:00 Richard Whitehouse (projectclearwater.org) < [email protected]>: > Morris, > > > > Yes that is possible. You could either spawn a new thread for each > request, or dispatch it to a worker pool. What you choose to do is really > an implementation detail of the application server you write, and not > really related to how Clearwater is structured. > > > > Richard > > > > *From:* yan morris [mailto:[email protected]] > *Sent:* 06 September 2016 05:30 > *To:* Richard Whitehouse (projectclearwater.org) <richard.whitehouse@ > projectclearwater.org> > *Subject:* Re: [Project Clearwater] Is Bono a multi-thread program? > > > > Hi , Richard > > Thanks for your help . > > > I understand the architecture of modules . > > However I have a question , I want to my stateful_proxy_server can process > multiple request or response in the same time. > > Could I just create threads , and distribute incoming request to > particular thread? > > That is , without creating new module to do multi-thread . > > > > Is that possible ? > > Thank you very much. > > Morris > > > > 2016-09-02 22:31 GMT+08:00 Richard Whitehouse (projectclearwater.org) < > [email protected]>: > > Morris, > > > > The thread dispatcher calls pjsip_endpt_process_rx_data to continue > processing of the message - http://www.pjsip.org/pjsip/ > docs/html/group__PJSIP__ENDPT.htm - this passes it to the other > registered modules e.g. the stateful proxy module. > > > > If you are creating a thread and it immediately dies, then it’s possible > that it’s run out of work to do. Normally threads will programmed to run in > a loop handling events until terminated. > > > > Thanks, > > > > Richard > > > > *From:* yan morris [mailto:[email protected]] > *Sent:* 02 September 2016 07:05 > *To:* Richard Whitehouse (projectclearwater.org) <richard.whitehouse@ > projectclearwater.org> > *Subject:* Re: [Project Clearwater] Is Bono a multi-thread program? > > > > Hi , Richard > > Please forgive me that I misunderstand your reply. > > I find the thread_dispatcher.cpp file , however , I cannot understand how > the mod_thread_dispatcher communicate with stateful_proxy_module. Could you > explain it for me? > > In addition , I create the threads , but it would end immediately , do you > know the reason about this problem? > > Thank for your time ! > > Morris > > > > 2016-09-01 1:27 GMT+08:00 yan morris <[email protected]>: > > Hi , Richard > > Thank for your reply. > > Could you please tell me more detailed about implementing multi-thread on > Bono ? > > Where I can find the codes about creating thread? Because I see the > Bono.cpp , I only find the high level process > > request or response function . Does Clearwater use PJSIP API to make it > multi-threaded or "mod_stateful_proxy" > > is implemented by multi-thread already? > > I am trying to use PJSIP write my own sip server as Clearwater's > Application Server , and I want it multi-threaded . > > Therefore I think Bono's source code may help me , but I don't see the > codes about this. > > > Hope you can give me a hand. > > Thank you very much. > > Morris > > > > 2016-09-01 0:16 GMT+08:00 Richard Whitehouse (projectclearwater.org) < > [email protected]>: > > Morris, > > > > Yes, Bono is multi-threaded. It’s architected with a transport thread > which handles incoming PJSIP requests and a number of worker threads, which > SIP messages are dispatched onto. > > > > The worker threads are created by thread_dispatcher. By default bono has > one worker thread per CPU core. > > > > The threads are created using PJSIP’s pj_thread functions. > > > > Thanks, > > > > Richard > > > > *From:* Clearwater [mailto:[email protected]] > *On Behalf Of *yan morris > *Sent:* 31 August 2016 17:05 > *To:* [email protected] > *Subject:* [Project Clearwater] Is Bono a multi-thread program? > > > > Hi , > > I want to know , if Bono is a multi-thread program or not. > > I see the source code of Bono , I look at the function > "proxy_on_rx_request" > > > > which process incoming request , but I don't see any code is creating a > new thread when request income . > > > Therefore , I want to know if Bono processes request using multi-thread ? > > If it does , could you tell where I can find the codes which concerned > about? > > (or It is implemented by PJSIP , please let me know , too) > > Thank you very much > > Morris > > > > > > > > > > > _______________________________________________ > Clearwater mailing list > [email protected] > http://lists.projectclearwater.org/mailman/listinfo/clearwater_lists. > projectclearwater.org > >
_______________________________________________ Clearwater mailing list [email protected] http://lists.projectclearwater.org/mailman/listinfo/clearwater_lists.projectclearwater.org
