This article is part of a series of articles written by Oryx Cloud and Storat.com founders to record and share their experiences launching an internet startup in the middle east. The intention is to help and encourage other entrepreneurs in the Arab world in dealing with the uncertainties of launching a new online platform or an IT business. The articles will cover a wide range of experiences including marketing, talent acquisition, financial planning, competition, technology choices, growth hacking, and many other topics. Those experiences are unique in a startup in comparison to established businesses where there is a larger maneuver for errors and much larger budgets to execute the vision
We will do our best to release 3-4 articles per month. The main motto of Oryx Cloud team and Storat.com is: “It is about the journey, not the destination”. So, this is a recording of our journey before we forget, regardless of where it leads us and we thought it is important to share it to encourage a culture of openness and collaboration among the middle east entrepreneurs.
In this article we will cover an important technical uncertainty: Which programming language and web platform to choose for your upcoming online web application?
There are many choices these days with a heated debate about which one is the best programming language to choose for an online web platform. Most of the debate is technical in nature and focus on areas like architecture, performance implications, flexibility, and extensibility of the platform. We have taken all the technical aspects into considerations, but we have bundled that with other business factors to come up with a decision on the programming language to build Storat.com with.
The choices between programming languages looks endless, but when you go into a deeper business/technical evaluation, the choices come down to a few. The list of languages we shortlisted were:
- The non-blocking I/O that produces high performance server-side applications,
- PHP: One of the early popular dynamic languages for Internet applications and websites. Php is the most widely used programming language on the web powering companies like Facebook and Wordpress. PHP has a large ecosystem of developers and tens of frameworks to choose from. PHP is a rebel rule-less language, as a result, larger projects can become difficult to maintain, a problem known as “Spaghetti Code".
- Ruby on Rails: is a popular framework and dynamic language powering the alike of twitter (although it seems twitter decided to migrate portion of their front-end to Scala because of scalability issue), Airbnb, and Groupon. Ruby is an elegant language with strong object orientation root.
- Python: is another dynamic programming language adopted by companies like Pinterest and Instagram. It is also very famous in the scientific community because of the large number of scientific libraries available.
For Storat.com, we have adopted a standard LAMP architecture. While LAMP stands for (Linux, Apache, MySQL, PHP), you can replace any of the components with your choice of language or platform based on the needs of your application. For Storat.com, we have built the platform on the following architecture:
- Operation System: Linux Ubuntu and CentOS flavors
- Web Server: we started with Apache but we migrated recently to Nginx as part of performance optimisation process.
- Database and Data-structures: We are currently running Storat.com on four different data platforms:
- MySQL Database for structured data: suited and optimized by the open source community to hold millions or records and support millions of concurrent users through a scale out architecture. It is being used heavily by Facebook and Google in such scenario. However, as part of our optimization roadmap, we have factored the code to give us the flexibility to migrate parts of our data structure to a NoSQL database in the future if there is a need for that.
- Redis: for in-memory data and caching. A critical component to provide high response time to users through caching of queries.
- ElasticSearch: to improve the performance and response time when users run a search on Storat.com, the data and results are fetched from elastic-Search that index the data on real time and provide sub-second response for users queries.
- Amazon AWS S3 Storage: for storing documents, images, and static content.
- AWS CloudFront for Content Deliver Network. we are currently using AWS CloudFront because of its price advantage and ease of use. But as part of our roadmap, we are considering local CDN for improved experience.
- Middleware: the subject of this article! Our middleware runs on Laravel and PHP.
- Mobile Platform: for the upcoming mobile platform we have selected React Native because of its portability and meeting the requirements of our mobile platform scope. Going native with our scope was going to be an overkill.
For the choice of the back-end programming language, the following were the top 6 factors that settled the debate, yet again, in favor of PHP and the Laravel framework:
- Free platform: Open source language where we will not be locked down with one vendor.
- Technical Support: wide and very large community support online to answer our questions. So far, every issue we faced, we found the answer online even without posting a question.
- Speed to Market:
- How fast can we build apps and release them in agile methodology. PHP proved the fastest so far.
- Availability of open source plugins and libraries that can save us time in writing new code.
- How easy to adopt the language and framework to new developers in the team and put them quickly in the development workforce. For a talented programmer, it takes less than 2 weeks to learn the framework join the development effort.
- Talent Acquisition: Availability of highly skilled programmers on the platform so we are not locked in a lengthy process acquiring talent.
- Availability of modern MVC framework: that can rationalize a rule-less language like PHP. In this case the framework we chose was Laravel.
- Performance: while this is the most contested issue when it comes to programming language choice. We have made the decision based on many factors but the following are the top four:
- Programming language is one out of 20 factors that decides the performance and scalability of web applications. Regardless of the middleware language. Performance optimization is a never-ending process across all the layers of the applications (in memory caching, storage, query indexing, structure database optimization, etc).
- The performance of the language is more dependent on a skilled programmer writing elegant and high performing code, than the choice of the language. It was much easier for us to find highly-skilled PHP programmers in Oryx Cloud operating locations in Eastern Europe, India, and the middle east.
- The dropping cost of hardware means that it is cheaper for us to throw more webservers to scale the application than spending a much longer time building with a static language or another dynamic language that would give few percentages of performance boost.
- The release of PHP7 that gave a major boost to the performance of PHP applications, outperforming other dynamic languages like Ruby and Python. This is based on tests we conducted in Oryx Cloud labs in India.
Regardless of our decision, we think that there is no right or wrong choice among the top and widely used web frameworks. The lesson learned for us is to map your choice not only based on technical aspect of the evaluation, but also on the business needs, cost, access to talented resources in the long terms, and the value your startup is trying to deliver.
CEO & Founder