an-tao
Re:Show HN: Drogon becomes one of the fastest web frameworks
on Sunday August 18, 2019 @09:00PM (#20734056)
Show HN: Drogon becomes one of the fastest web frameworks
Re:Show HN: Drogon – A C++14/17 based high performance HTTP applicatio...
on Wednesday March 20, 2019 @05:46AM (#19440453)
About 5M bytes in size, considering that the drogon application is statically linked, I am afraid it has no advantage in binary size.
Re:Show HN: Drogon – A C++14/17 based high performance HTTP applicatio...
on Tuesday March 19, 2019 @01:00PM (#19432775)
It's an embarrassing mistake, thank you for your reminder, but it seems that it's too late to change the name.
Re:Show HN: Drogon – A C++14/17 based high performance HTTP applicatio...
on Tuesday March 19, 2019 @10:58AM (#19431379)
You can register handler like this in Drogon:
drogon::app.registerHttpMethod("/test",
[=](const HttpRequestPtr& req,
const std::function<void (const HttpResponsePtr &)> & callback)
{
Json::Value json;
json["result"]="ok";
auto resp=HttpResponse::newHttpJsonResponse(json);
callback(resp);
},
{Get,"LoginFilter"});
The method in the readme file is for decoupling. Imagine a scene with dozens of path handlers. Isn't it better to disperse them in their respective classes?Of course, for very simple logic, the interface you are talking about is really more intuitive, I will consider adding such an interface. Thank you for your comment.
Re:Show HN: Drogon – A C++14/17 based high performance HTTP applicatio...
on Tuesday March 19, 2019 @09:15AM (#19430451)
For benchmarking I have submitted it to the famous TFB and I am waiting for the result of testing round 18.
https://github.com/TechEmpower/FrameworkBenchmarks/tree/mast...
Re:Show HN: Drogon – A C++14/17 based high performance HTTP applicatio...
on Tuesday March 19, 2019 @09:11AM (#19430414)
Good question!
If the type of the parameter of callback is an r-reference, users must move resp into the callback. Note that the resp is a shared_ptr, which means callback can reuse the buffer or do anything to the resp object and copying smart pointers does not require too much cost.
Re:Show HN: Drogon – A C++14/17 based high performance HTTP applicatio...
on Tuesday March 19, 2019 @06:54AM (#19429677)
Maybe I misused the proper nouns, what I mean is 'non-blocking I/O'. Thanks for your reminder.
Re:Show HN: Drogon – A C++14/17 based high performance HTTP applicatio...
on Tuesday March 19, 2019 @06:44AM (#19429633)
Your suggestion is very good, I have made some modifications.
Re:Show HN: Drogon – A C++14/17 based high performance HTTP applicatio...
on Tuesday March 19, 2019 @06:38AM (#19429589)
It has recently been submitted to TFB.
https://github.com/TechEmpower/FrameworkBenchmarks/tree/mast...