P
P
prizrak392015-07-15 16:42:59
Java
prizrak39, 2015-07-15 16:42:59

Choice of tools for developing a high-load web application?

Hello.
Today, at the zero level, I started developing a system (web service), which must withstand high loads and be scalable. At the initial stage, the loads will be small, since the project will be launched with minimal functionality, but the functionality and, consequently, attendance will increase quickly enough (according to forecasts - I am not responsible for this, I am simply given such a task) will increase.
Now, based on the requirements, there is a choice of tools for development.
Note - about 3 years of Java development experience. On PHP year.
Options:
1) Using Drupal. At the initial level, with minimal functionality and load, it can be a good solution, but then, in my opinion, there may be problems with expanding the functionality. And the time spent on finalizing to suit your requirements is not sure that it will be less than writing from scratch.
2) From scratch. PHP+Laravel+Bootsrap+jQuery. MySQL database (possible to use PostgreSQL). There will be no rapid development, but there is no limitation on functionality.
3) From scratch. The basis should be a web service written in JAVA - it will give the service all the information. Will it be possible to get by with a little PHP in the client side? That is, most of it will be in mind the AJAX request and building the page with JavaScript. To what extent will such an option withstand high loads? The web service will then be universal and work in the future with a mobile application.
4) From scratch. A more exotic option is Grails + Groovy. The question is how fast it will work, given the dynamic typing.....
Please help me choose the best option based on your experience.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Viktor Vsk, 2015-07-15
@viktorvsk

system (web service), which must withstand high loads and be scalable.

This is called premature optimization
. You can't be asked to "make a performant and scalable system". They can tell you the ratio of reading / writing to the database, the expected RPS (stable and peak), the maximum response time to a request ...
To find out what will be productive and what will not - you need to use a profiler, in extreme cases - by benchmarks. But without asking questions on the forums - just no one has the physical ability to give an objective answer to an abstract question.
All your fears are groundless - you can build a good system on anything. Indeed, there are very rare cases where it is better to use one stack instead of another. But this is clearly not your case.
If you have experience with java on the web, do it in java.
There is experience with javascript - do it based on web services.
Each approach has pros and cons, and they are usually subjective.
It's better to spend 2 months on a prototype and then a month on rewriting than at first 3 months of thinking and doing - and then realizing that it was necessary to move in a different direction.
~80% of cases are described and yours with a probability of > 90% falls into this area.

L
Lesha Kiselev, 2015-07-15
@Yakud

The main feature of highly loaded applications is not in the choice of technologies, but in the architecture. Often, the bottleneck of the application is the database. The first thing to do is learn how to scale the data. We are looking for the keywords "sharding", "replication".
After the data is scaled, you can think about including a caching layer. We are looking for "memcached", "redis".
If the frontend (backend frontend) starts to fail, we connect the load balancer. Both at the DNS level and at the level of individual frontend instances.
Handing out a lot of static? CDN is here to help.
A lot of complex and resource-intensive calculations, the result of which does not require instant display to the client? We expand the task queues and consider it in the background.
And what technology to choose java or php is better for you. What you know best and can support.
I advise you to read ruhighload.com/scale

P
Philipp, 2015-07-15
@zoonman

From the information you provided, I would recommend a Java application capable of horizontal scaling. In the general case, the architecture will look something like this: requests are sent to a balancer, which will distribute them to several servers running a Java application.
Since your project is mostly a web service, there is no need to generate many SEO-optimized pages. So it is most reasonable to use the approach typical for web applications. Those. build a JavaScript application that will interact with the API. True, one factor must be taken into account - the business logic must still be stored inside the API.
As a database, I would recommend using modern NoSQL solutions like MongoDB. They are easily scalable, which is extremely important when developing systems with a high load.
Plus, when scaling, you need to take into account one interesting factor that is little mentioned or generally considered controversial. But the correct scaling looks something like this - first vertical, then horizontal. Those. in the beginning it is better to scale by choosing a faster machine, but when it comes to special solutions like a cluster, then start scaling out. But here again it all depends on the type of plugs in your system.
In your place, I would choose the following stack: Java + MongoDB + AngularJS. As a balancer, you can either use nginx (budget option), or host everything inside AWS and use ELB. To deliver the client side, you need to use a CDN. For example Cloudflare.

S
Super User, 2015-07-15
@sergeystepanov1988

Using Drupal. At the initial level, with minimal functionality and load, it can be a good solution, but then, in my opinion, there may be problems with expanding the functionality.

There will be performance issues rather than functionality issues. Don't even think about any Drupal, Joomla and WordPress. They are not designed for high loads. In general, PHP is a bad choice for a high-load project due to the specifics of its work on the server side. We'll have to cache everything and buy powerful hardware.
Java also eats RAM pretty well, but in terms of performance, of course, it's faster than PHP.

B
bromzh, 2015-07-17
@bromzh

Groovy brake, Grails' fate is unknown. Then Scala + some kind of framework is better. Java and its servers are fast, but all sorts of ORMs, EJBs and other things absorb this speed.
Just learning to develop the web in Java is not easy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question