27 comments

[ 3.9 ms ] story [ 72.7 ms ] thread
An awesome-cpp framework.
Will definitely check this out; looks good.
Looks very nice to use, but curious, is there anything here that isn't in the Java stdlib + something like the Spark web framework?
The first thing that comes to mind is its c++ implementation, which sets it far far apart from the java project you mentioned
C++ impl of what? It has like four different things.
Spark? You probably meant Spring, Spark is for Big data and such, usually ephemeral.
There is also a SparkJava web framework

https://sparkjava.com/

Tbh, I don't think it is comparable to this project. A better alternative for Java would be Quarkus or Micronaut, ones that can compile to native using GraalVM.

Thanks!

I really do need to play with GraalVM.

The reason I did this comparison was to try to better understand what is in this project as I may consider using it, not to compare to Java performance wise.
(comment deleted)
Hmm, seeing Parallel computing, I wonder why the difference tosay, HPX, is.
We try to solve problem very complex relationship between computing and networking. In an efficient way.
What are the advantages of this engine over Boost Beast (and Asio)?
No template in user interfaces.
How is that an advantage ? either you have N overloads doing manually what templates do automatically, or you have indirection and the implied performance loss
Have you ever compiled a project using ASIO? The template crap everywhere makes build times miserable.
I use asio in all my network-using projects. It doesn't particularly bother me, the files that use asio take a few seconds to build ?
Those few seconds can add up very quickly when you’re making incremental changes and have to keep recompiling. I ended up having to write non-template wrappers for all my ASIO stuff and compile them as a separate object file, in order to keep my workflow manageable. Building that one object file would double my total build time.
I've actually done that all day long, at most it takes 3-4 seconds between code editing and the app / test running, I'd definitely not trade faster build times for something else in that case, especially when my IDE highlights errors when I type which greatly reduces the need for constant rebuilds.
Why do you use sometimes pthread primitives from <pthread.h> instead of standard <thread>, <mutex>, ... objects?

For example src/manager/DNSCache.h use std::mutex but src/kernel/Executor.h use pthread_mutex_t?

maybe age of the project?
At first we used pthread only. But after the windows branch was added, we have to make it compatible with windows and standard <mutex> was used in the some shared codes. Codes in the "kernel" folder are for Linux only, and some of them are C.
As a multifunctional asynchronous client, it currently supports HTTP, Redis, MySQL and Kafka protocols.

That's an interesting selection. Do you have particular problem spaces in mind?

Yes. We have applications that use all this clients. This framework supports the backend development of a pretty big industrial search engine, and we tend to build very large backend applications. And as a very light-weighted library, it's also used as a simple asynchronous MySQL client, or a kafka client. And the most often, an http server or client.