Boost logo

Boost :

Subject: Re: [boost] [http] Design ideas for a request router
From: Vinícius dos Santos Oliveira (vini.ipsmaker_at_[hidden])
Date: 2016-03-21 16:41:28


2016-03-17 14:00 GMT-03:00 Sorin Fetche <sorin.fetche_at_[hidden]>:

> This is also the style we used in an in house server side library
> meant to be used mainly for REST and WebSocket connections.
>

Thanks for sharing your experience, Sorin.

The routing is inspired from Python Flask and Python aiohttp [1] with
> these features:
> - the routes can be added and removed at runtime (and from other route
> handlers)
>

I wasn't considering changing the routes within a handler. Indeed it needs
to be explicitly taken into account. It reminds me of the Boost.Signals
library.

- we needed dynamic routes - moreover the dynamic part needed to match
> multiple path segments and more "specific" route handlers needed to
> take precedence over the more "generic" ones (example below)
>

I'd use the term overlapping rules in this case instead dynamic.

- support for asynchronous (deferred) route handlers - to support the
> cases when handling a request requires a lengthy operation.
> - full access to request / response objects to offload as much logic
> as possible from the core server library.
>

These don't seem hard to support/implement.

-- 
Vinícius dos Santos Oliveira
https://vinipsmaker.github.io/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk