3

I have a social mobile app which works with Phonegap on the client side and PHP on the server side. I chose to use these technologies (Phonegap, Framework7 (front-end framework), Apache & MySQL) because the first version is an MVP, so I wanted to make it quickly and easily using technologies I'm very familiar with. Now I'm getting a lot of traffic on the app and need to scale it to make it more efficient and less expensive to maintain. So, I need to choose a different stack to work with.

My plan is to keep using Phonegap and Framework7 (the app works flawlessly, behaves just like a native app with a very complete UI), but the server side is what I'm worried about most.

The requirements for now are:

  • File storage (images) has to be more efficient, so faster upload times
  • The server CPU and memory usage has to go down (PHP uses a lot of memory and CPU for tasks other languages use a lot less memory or CPU for).
  • DB has to be SQL, but MySQL is buggy and I need a faster DB system for faster response times to the client.
  • My server is currently in The Netherlands (Amsterdam), so a CDN is needed to distribute static files and make it available faster for people from other countries.

The app itself isn't completely focused on photos or videos or anything. Users can share text, links and photos. Other than that, the typical social app features like friendships, feed, profile etc. are included.

I'm thinking about using Python (Django) or Node JS as my server side language. Which one would you suggest I use? As for the DB, I hear very good things about PostgreSQL and MariaDB. Which one suits my needs better? Of course there has to be a Caching server, and I was thinking about using Memcached. Does anyone have experience with a combination of these technologies who can tell me how to make this project scaleable and find a perfect balance between performance and productivity (when I hire a team, I want the engineers to be able to work easily with the code I'm going to write).

Writing good code is a requirement of course. But this question is really about what technologies you would suggest I use for an app like mine.

  • 1
    Can you justify that "MySQL is buggy" statement? or at least expand on it? Obviously, if it has bugs, reporting them improves your chances of having them fixed, and it helps others. (great question, though +1 and starerd) – Mawg Jan 12 '16 at 10:07
1

DB has to be SQL, but MySQL is buggy and I need a faster DB system for faster response times to the client.

sqlite would be a good choice:

The SQLite website (https://www.sqlite.org/) uses SQLite itself, of course, and as of this writing (2015) it handles about 400K to 500K HTTP requests per day, about 15-20% of which are dynamic pages touching the database.

 

The server CPU and memory usage has to go down (PHP uses a lot of memory and CPU for tasks other languages use a lot less memory or CPU for).

web.py with the python sqlite3 API would be a simple alternative.

My server is currently in The Netherlands (Amsterdam), so a CDN is needed to distribute static files and make it available faster for people from other countries.

Cloudflare has a free plan.

File storage (images) has to be more efficient, so faster upload times

Cloudflare can swap out an original image for an equivalent image compressed using WebP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.