Re: [Cppcms-users] non-greedy moint points
Brought to you by:
artyom-beilis
|
From: Petr J. <ele...@ex...> - 2013-07-15 13:36:31
|
> This is how I do it, expect that you don't create a specific mount point > for the dispatcher. I tried it, no luck :/ Then Artyom should explain why matching ^webapi$ and "^index$" works, but ^webapi$ and ^(.*)$ doesn't. Logically, the regular expression defined first should be the one evaluated first. > Async is "better" than sync, because it does not run in the main loop > and therefore can handle more connections. I'm curious now, because synchronous application should have a higher performance than asynchronous. Synchronous application is designed to utilize multiple CPUs/cores in a non-blocking way. The 2nd link even recommends to dispatch any having lifting from an async app to a sync app. So it boils down to this - if you need long polling or process any server-side events, use an async app. I don't know what exactly your WebAPI does, but by the sounds of it, most of the work should be done synchronously. Generally APIs are synchronous (request->response cycle) but yours may be different. |