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

REST api choice #268

Open
mbnoimi opened this issue Jul 19, 2020 · 7 comments
Open

REST api choice #268

mbnoimi opened this issue Jul 19, 2020 · 7 comments

Comments

@mbnoimi
Copy link

mbnoimi commented Jul 19, 2020

Hi,

After reading some issues related to REST I just want to be sure;
Does Cutelyst is a good choice for building REST web services (just like DRF)?

@dantti
Copy link
Member

dantti commented Jul 19, 2020

Well I don't know what your requirements are, but for sure you will use way less memory and it will be a lot faster.
I use it on production for many projects from big to small I find it a clear win.

@mbnoimi
Copy link
Author

mbnoimi commented Jul 19, 2020

Well I don't know what your requirements are, but for sure you will use way less memory and it will be a lot faster.
I use it on production for many projects from big to small I find it a clear win.

Are you familiar with DFR?

@dantti
Copy link
Member

dantti commented Jul 19, 2020

No, but looking at it's web site it's built upon Django which is slower and uses a lot more memory.

@mbnoimi
Copy link
Author

mbnoimi commented Jul 19, 2020

No, but looking at it's web site it's built upon Django which is slower and uses a lot more memory.

Actually I want to balance my choice between rapid developing and performance. Cutelyst is much faster depending on the mentioned benchmark but I afraid of the small community. I can see the most replies come from you while most of the community is just like me (newcomers) so this issue really concerns me.
I could successfully build my first project after the nightmare of building Cutelyst and I feel in joy right now but I don't want to rash into without studying the consequences.

My requirements are:

  1. Framework uses C++/Qt
  2. Medium performance.
  3. Easy to build REST web services (asynchronous, serialization, routing, authorization, openapi compatible...etc )
  4. ORM
  5. Embedded HTTP server

Most of them are already available in Cutelyst which is really cool but the community issue still nagging me.

EDIT: I don't care about the front end because my main goal as you can see is using Cutelyst as a backend.

@mbnoimi
Copy link
Author

mbnoimi commented Jul 19, 2020

BTW, can I use Cutelyst-WSG in production (I usually use Apache but I prefer to use Cutelyst-WSG because of its performance)?

@dantti
Copy link
Member

dantti commented Jul 19, 2020

Well there are at least 3 more active users/developers, sadly Qt/C++ specially in Web Dev isn't the hype or trend, but that doesn't mean it isn't a good choice, the code is LGPL the same open source license of Qt, and if you know Qt you can also read the code and propose fixes.

For the cutelyst-wsgi yes you can use it on production, the other alternative is uWSGI which isn't recommended anymore.
I myself use nginx + cutelyst-wsgi because I need virtual hosts and serving files with nginx is better.

@mbnoimi
Copy link
Author

mbnoimi commented Jul 20, 2020

I myself use nginx + cutelyst-wsgi because I need virtual hosts and serving files with nginx is better.

May you please add a new wiki page guide us how to deploy Cutelyst web app to nginx?

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