5 ms·
My two cents: to have a scalable distributed application you're ultimately going to have to build a kind of SOA with the Django/Symfony/RoR frontend talking to
by GeneralMaximus 15y ago
My two cents: to have a scalable distributed application you're ultimately going to have to build a kind of SOA with the Django/Symfony/RoR frontend talking to your backend services via API calls. So the framework just handles fetching data and laying it out nicely while the real work happens on the backend.
Once you have this, you can optimize your application to handle all kinds of workloads without getting bogged down by whatever framework you're using. Heck, write your CPU-intensive code in C++ if you're so kooky about performance, use SQL or OODBs, whatever. Distribute you application across the globe. Your application is ultimately just responding to HTTP requests.
Use Django for the frontend. Use whatever you want for your backend. Using Python for both would be nice. If you're really worried about performance, use a JVM language like Scala. Ultimately, this choice will be driven by what kind of computation you're doing on your backend. E.g, if I was doing scientific computation I'd use Python because it has NumPy and SciPy. Let the backend decision be driven by what language has the libraries you need. You absolutely _do not_ want to write code when you can avoid it.
That said, I must bring your attention to a few points:
(1) Premature optimization is bad. If you don't know whether you'll need it, then you won't need it.
(2) Just-in-time scaling, i.e, scaling right when you start facing performance problems is going to be hard. If you know you will totally definitely 100% need it, plan for it now.
(3) 99% of web applications don't need to worry about scaling. Throwing more hardware at the problem, intelligent caching, and some basic Algorithms 101 techniques go a long way towards making things fast.
(4) I'm not in the Valley, and I've never built a large scale web application ;)
- JBerlinsky 15y agoAgreed. In my projects that have scaled, we've built a Sinatra API for internal use, and had a front-end (Rails, now moving to Backbone.js) query that API.
- clockwork_189 15y agoI like your explanation sir, +1'd that :)