So, we had to make a decision to either keep going in Python or port to Scala (Scala seemed apt for many reasons).
What would you have done in this case?
1–10 of 15 posts
So, we had to make a decision to either keep going in Python or port to Scala (Scala seemed apt for many reasons).
What would you have done in this case?
First profile the Python app - is it being slow in Python or is it waiting on something else? If it is being slow in Python, can you rewrite the critical section in C? And speaking of which, is there a C API to your DB that you can use from Python? The Python mentality has always been that it is easy to interface Python and C where necessary for performance.
Your code would spend most of its time fetching stuff from DB, external web services etc and rendering HTML. Does your framework allow you to easily incorporate database caches? Does it allow to to cache frequently rendered HTML segments ? Can you offload certain tasks ( such as sending email etc.) to a secondary process via a job queue ?
You could write a web application in C that could still suck big time unless you get the application architecture right.
First profile the Python app - is it being slow in Python or is it waiting on something else? If it is being slow in Python, can you rewrite the critical section in C? And speaking of which, is there a C API to your DB that you can use from Python? The Python mentality has always been that it is easy to interface Python and C where necessary for performance.
If you are comfortable with Scala and think it fits well for your project go for it. There are some frameworks like Lift or Play with which you can start quickly a web app.
Its not the language but your framework and architecture and your own proficiency in the language ( whatever that might be) that matters most for a fast web application. Your code would spend most of its time fetching stuff from DB, external web services etc and rendering HTML. Does your framework allow you to easily incorporate database caches? Does it allow to to cache frequently rendered HTML segments ? Can you of…
As we were newbies to web development (although we have a lot of experience in development), we had put in our best knowledge while designing the architecture. We kept independent things independent. That's why we chose flask, it gave us the flexibility we wanted. We were free to choose the extensions we wanted to integrate.
Did you have any experience doing web development with Scala? I am now choosing stack for my new project and considered Scala/Play as an option. There are some problems both with Play2 framework atm(no Wax deployment support, long rebuilding after small changes, work with actions is confusing) and the language of Scala (complexity, version migration, SBT etc.) The situation is promised to get better in future but mos…