Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[offtopic] How should one compare C++ frameworks? #63

Open
SamuelMarks opened this issue Mar 22, 2021 · 2 comments
Open

[offtopic] How should one compare C++ frameworks? #63

SamuelMarks opened this issue Mar 22, 2021 · 2 comments

Comments

@SamuelMarks
Copy link

For the database layer, I am currently weighing up ODB, Oat++, SOCI, cppdb, and sqlpp11 [if sqlpp adds support for CREATE TABLE]. Also drogon seem to have its own ORM layer, but with only PostgreSQL and MySQL support I'm a little worried from a testing and server-less perspective (really would be nice to see support for an embedded database like SQLite). lithium (here) looks good, but the lack of Windows support is a turnoff (you mention you're waiting for a bugfix in MSVC, link? - Maybe I'll try fixing?).

For the REST API layer I haven't started investigating, although I do remember actix being dethroned and the drogon C++ framework taking its place. Lithium (here) winning overall.


I am planning to use LLVM (clang, libclang, libtooling) to synchronise [bidirectionally] OpenAPI with C++ code. I've done the same in Python, and WiP for Rust, Swift, Java, Kotlin, and TypeScript.

With my compiler driven approach, I expect people to be able to rapidly produce REST API + db backends with full test and doc coverage, and be able to immediately translate the interfaces across language boundaries (e.g., to frontends, or to rewrite a slow-performing Python backend in C++ or Rust).

Currently focussing on the non-Turing-complete as aspect of this, translating just the interfaces, tests, docs, defaults, and types.


I am writing tools to allow engineers to develop faster, and with higher quality. Will only target one ORM and one REST API layer for C++, at least in the short-term.

So my question is, and I understand that posting here will provide a heavily biased answer, how do I decide between the various C++ frameworks?

Thanks

@matt-42
Copy link
Owner

matt-42 commented Mar 23, 2021

Hi @SamuelMarks ,

Here a my answers/questions:

  • I'll add windows support pretty soon since we have now a workaround: Support Windows #30 (comment) ,
  • I don't a a good knowledge about other libraries. What features do you want ? I you want the best performances you need an asynchronous driver, and for postres there is also a pipelining mode comming up in the next version that you may want to use. (all the best performing frameworks on techempower use both). Note that lithium's pipelining branch has not been merged yet in master because the postgres API was not stable. Now that is is, it's on my todo-list. Finally, to my knowledge, only drogon and lithium are using postgres pipelining.
  • Do you need an ORM ?

Hope this help.

Cheers,
Matthieu

@SamuelMarks
Copy link
Author

Hi @matt-42,

Thanks for responding so quickly.

  • Windows support: WOOT!
  • Performance is more of a nice-to-have then a must, but since C++ frameworks are finally winning the benchmark competitions I might as well target the fastest I guess?! - Portability is a must though.
  • ORM is needed, well to be more specific: I need a way of defining database table schemas in C++ code, so that my LLVM-based tooling can bidirectionally create/generate-from JSON-schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants