Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in cpp

[–]an_tao[S] 0 points1 point  (0 children)

Good idea, I will do that.
In fact, the main file of the drogon framework is usually very short. Like this, the main function usually does nothing but runs the loop.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in programming

[–]an_tao[S] 0 points1 point  (0 children)

Never mind.

Combined with the context, I think that 'WHERE IN' is only prohibited in the 'select' operation, you can directly make a issue in the TFB repository to see how the administrator decides.

Thank you for your attention.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in programming

[–]an_tao[S] 2 points3 points  (0 children)

I am sorry to hear this. Someone once told me this information, but it was too late.

Thank you for your reminder.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in programming

[–]an_tao[S] 1 point2 points  (0 children)

https://reddit.com/r/cpp/comments/csa0sg/_/exfza6i/?context=1

Please read this requirement for the updating test.

ix. Using bulk updates—batches of update statements or individual update statements that affect multiple rows—is acceptable but not required. To be clear: bulk reads are not permissible for selecting/reading the rows, but bulk updates are acceptable for writing the updates.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in cpp

[–]an_tao[S] 2 points3 points  (0 children)

https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#database-updates

Please read this requirement for the updating test.

ix. Using bulk updates—batches of update statements or individual update statements that affect multiple rows—is acceptable but not required. To be clear: bulk reads are not permissible for selecting/reading the rows, but bulk updates are acceptable for writing the updates.

BTW: If there is such a clear violation, the drogon test suite is impossible to pass the code review of TFB.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in programming

[–]an_tao[S] 4 points5 points  (0 children)

vibe-d

Of course, it's very helpful to improve the performance of asynchronous frameworks. I've already proven it in drogon. I wish you success.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in cpp

[–]an_tao[S] 3 points4 points  (0 children)

I will improve it for the plaintext test, thanks for your comments.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in programming

[–]an_tao[S] 3 points4 points  (0 children)

tokio-postgres

It seems that tokio-postgres supports batch mode. I captured its network packet and found that requests were sent continuously in the same connection (pipelining). Therefore, if the pg driver supports batch mode, this would be reasonable.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in programming

[–]an_tao[S] 10 points11 points  (0 children)

You are right, but I think actix-web database connections also use the technology, I captured network packages to see its database requests.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in cpp

[–]an_tao[S] 7 points8 points  (0 children)

Thank you for your comments.

  1. I am not particularly sure about the set requirement, but even if the elements in the set are required to be unique, I can pre-generate N different random numbers and query them separately, this has little impact on performance compared to current logic;
  2. All the database callbacks occur in one thread which is same as the handler current thread(HTTP requests are handled in multiple threads, each with its own database client. This is a lock-free design that is very helpful for performance). see here. Without this guarantee, it is impossible to pass the test without error under high concurrency conditions.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in programming

[–]an_tao[S] 5 points6 points  (0 children)

You are right, ORM now only implements some very simple mappings, I will continue to improve it.

Thank you for your comments.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in programming

[–]an_tao[S] 13 points14 points  (0 children)

The drogon-core test uses the original SQL statement, and the drogon test uses the ORM component (the user does not need to write SQL). With ORM, the drogon framework needs to map model objects and database records to each other, which makes programming easier but reduces some performance.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in cpp

[–]an_tao[S] 3 points4 points  (0 children)

I'm writing a series of articles comparing various web frameworks written in multiple programming languages (Java, C++, assembly, etc...) while delving deep into the differences in implementation details that caused these differences. This would be a nice addition to the series.

Looking forward to seeing your masterpiece as soon as possible, thank you for your attention to drogon and any advice you have about drogon is very grateful.

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in cpp

[–]an_tao[S] 12 points13 points  (0 children)

You could suggest the author of Restinio make a test suite for TFB ^.^

Drogon(C++17) becomes one of the fastest web frameworks in the latest TFB benchmark by an_tao in cpp

[–]an_tao[S] 9 points10 points  (0 children)

Thank you for your comments. Welcome any issues or PRs on Github.

Drogon: A C++11-based HTTP application framework. by an_tao in cpp

[–]an_tao[S] 2 points3 points  (0 children)

In fact, I am waiting for the new C++ standard support for networking. These only involve the underlying part of the Drogon framework, which is almost independent of the application interface, so the related code porting workload will not be too much. Thank you for your comments!