Boost logo

Boost :

Subject: Re: [boost] [http] Design ideas for a request router
From: Artyom Beilis (artyom.beilis_at_[hidden])
Date: 2016-03-15 13:05:20

> Previously you mentioned the "tree style" as the majority of what people
> need and the "chained style" as just a hip from NodeJS people.
> I intend to implement the "tree style" later (and I think I'll try to
> mirror the crow design a lot).
> For now, I think you're suggesting I should revisit how I design things and
> question every of my decisions again.

I say two things:

Take a look what widely used frameworks do (Django, Rails, Struts) and
don't look at NodeJS as
major reference as it is way to new...

Tree is much more intuitive to use and understand - if you want to
start from something do it first.

You asked for an opinion? Right?

> Anyway, I have pushed new commits into the router2 branch and I'd like to
> know what you guys think about this way of declaring a message_t:

You have read way too much NodeJS code ;-)

On more serious note:

What is context of http::static_router::done() what it does?
Where is the context? What is request? What is response?

See having lambda for some router is cool but usually you need
something more heavy - some context, session, request, response
at least in general some class that does useful stuff with data.

Think of a backed that handles data, for example how do you
With multiple threads or event loop, with some stuff that actually
does useful thing?

I don't understand from you sample how stuff is connected to each other.

Don't get me wrong - you are doing nice stuff - but please Keep It Simple
and Clear. Don't force yourself to fancy paradigms that may be useful but
aren't common.



Boost list run by bdawes at, gregod at, cpdaniel at, john at