Re: [Cppcms-users] non-greedy moint points
Brought to you by:
artyom-beilis
|
From: Petr J. <ele...@ex...> - 2013-07-15 00:03:42
|
If you are dead-set on making WebAPI asynchronous, why not rewrite your
mapping like this:
booster::intrusive_ptr<WebAPI> bgworker(new WebAPI(srv));
srv.applications_pool().mount(bgworker,
cppcms::mount_point("/webapi(/(.*))", 1));
srv.applications_pool().mount(cppcms::applications_factory<Dispatcher>());
Specify your mapping for Dispatcher class in the constructor of
Dispatcher as:
mapper().root(settings().get<string>("myapp.root"));
dispatcher().assign("^/somefunction$", &Dispatcher::index, this);
mapper().assign("somefunction", "/somefunction")
dispatcher().assign("^(.*)$", &Dispatcher::index, this); //catch all regexp
mapper().assign("")
On 15/07/2013 9:24 AM, Petr Janda wrote:
> What is your specific reason to run RPC server as an async app?
>
>
>>
>> On 15/07/2013 8:58 AM, Marcel Hellwig wrote:
>>> On 15.07.2013 00:43, Petr Janda wrote:
>>>> Do you really need an asynchronous application?
>>> I WANT an rpc server in background ;)
>>>> Does WebAPI deviate from
>>>> the normal working scenario of request -> response ?
>>>>
>>>> I'm trying to understand your problem.
>>>>
>>> webAPI is a class, derived from cppcms::rpc::json_rpc_server, as
>>> mentioned before.
>>> There is no problem running both, sync and async apps, afaik, but my
>>> problem is the mount_point. In dispatching the order of "attach" is
>>> relevant, that means /webapi before / is legal and webapi will be
>>> called, mounts in appliation_pool does not follow this rule :/
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> See everything from the browser to the database with AppDynamics
>>> Get end-to-end visibility with application monitoring from AppDynamics
>>> Isolate bottlenecks and diagnose root cause in seconds.
>>> Start your free trial of AppDynamics Pro today!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>>>
>>>
>>>
>>> _______________________________________________
>>> Cppcms-users mailing list
>>> Cpp...@li...
>>> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> See everything from the browser to the database with AppDynamics
>> Get end-to-end visibility with application monitoring from AppDynamics
>> Isolate bottlenecks and diagnose root cause in seconds.
>> Start your free trial of AppDynamics Pro today!
>> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>>
>>
>>
>> _______________________________________________
>> Cppcms-users mailing list
>> Cpp...@li...
>> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>>
>
>
>
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
--
Please use PGP to encrypt your email to ensure our privacy is respected.
|