4 ms·
I like my FAM stack; Flask - run on Pypy for extra speed and great for rapid development of APIs; AngularJS - client side Javascript templating for great singl
by kisamoto 13y ago
I like my FAM stack;
Flask - run on Pypy for extra speed and great for rapid development of APIs;
AngularJS - client side Javascript templating for great single page app;
MongoDB - Fast. Schemaless. Returns almost straight JSON to Angular from Flask.
Nginx sits in front, initially serving the HTML page to load the Angular page which pulls its data from the backend API.
Easy to drop in a Memcache/Varnish caching layer and everything can scale effectively.
The isolated nature of VirtualEnvs allows this to be installed on almost any Linux server and to have many different websites running on the same machine.
- Goranek 13y agoDid you benchmark pypy + flask? Any numbers compared to cpython? And whats your whole setup? flask -> pypy -> ?? -> nginx ?
- kisamoto 13y agoI'm yet to benchmark it but I'll run some ApacheBench and post them up in the next week. And sorry - the missing link there is uWSGI. Found it to be much more stable and configurable than Gunicorn. Also did some load testing which required a lot of Async stuff (waiting for unreliable external APIs to respond...) and Gunicorn just fell over.
- Goranek 13y agoAsync with pypy? I though pypy still doesn't support greenlets? What did you use for async calls?