-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
any open source website & demo power by sanic? #292
Comments
it would be nice to have examples project in README.md |
https://github.com/HackerDom/ructfe-2016/tree/master/services/atlablog -- It is web-service based on sonic. It was developed for hacker competitions. It my be helpful for education purposes.
|
http://securitynode.com Internal APIs are powered by sanic. Public API will be released soon as this site is currently under development. DISCLAIMER: I am the developer/owner of the site. |
it seen like flask, can it use flask plugin add on? |
@decemer No unfortunately while sanic may seem similar to flask in it's outward facing api, it's internals are very different, leading to incompatibility with flask plugin add ons. |
We use sanic in our event push notification because of it's speed. And there's no UI so I can't showcase it. |
I wrote a PasteBin clone a while ago, as a Flask demo project. I might make a Sanic fork of it if there is interest, but I could use some seasoned feedback in it, given that I have not used Sanic and Edit: I just finished the bulk of the refactoring, you can see it here. It's currently broken for reasons I am currently too sleep deprived to figure out why (for some reason Sanic is not reading the contents of the form and says it didn't receive any). If this turns out better than it's Flask counterpart I might just host it under http://api.cbeam.io/ where the flask version currently lies (or have them running side by side), thus fulfilling the motif of having an open-source website operating with Sanic. Sidenote: There is still no front end in that domain, so you'll have to do requests from the command line. |
Luizberti, the link http://api.cbeam.io/ is wrong or broken and browser get 404. |
@keyjoo as I mentioned in the sidenote, there is no front end on it (yet). You can go to http://api.cbeam.io/ping to see that the Flask app is really running. And if you have
|
Update on the Demo ProjectI just finished rewriting the Flask demo in Sanic's lingo. The benchmarks against the old version are insane, beat Flask+Gunicorn by a whopping margin (did 760k requests in the same amount of time Flask took to do 16k on a single core). I have a feeling that if I switched to The whole thing is done in roughly 80 tidy lines of code and it reads nicely. Right now it's up and running at http://api.cbeam.io/ and it has replaced the Flask version entirely. I would like some feedback on it if anyone would care to take a look, if you can think of any other use cases I could add that exemplify other features of Sanic feel free to open an issue in the tracker. Hopefully this can help newcomers get goin' faster faster 😄 link: https://github.com/luizberti/codebeam-api |
FYI, I've tried this as well, and aioredis murders my performance. I have one system that does event logging to disk that runs Sanic, and it has insane performance. I tried porting my API gateway to Sanic, and it's terrible - almost all because of aioredis. I posted a question about this to the uvloop GitHub (MagicStack/uvloop#73), and they basically said the structure of aioredis will kill performance. I also considered aredis (https://github.com/NoneGG/aredis), but their benchmarks show the same thing. Having said all of that, if you can make this work at a level above Flask, that would be awesome. Just letting you know that it might be out of your control without rewriting aioredis. |
can we close this or: #396 ? |
Closed in favor of #396 |
any open source website & demo power by sanic?
The text was updated successfully, but these errors were encountered: