Node, Go, Java, C # or Elixir
?You want to make a web application and wonder which platform is better suited if it should ever have a large number of users...
You can often see how a developer post appears explaining why he abandons the X language and rewrites his web application into the Y language. For another, it is the opposite, he rewrites his application from Y to X. This rarely happens for local or mobile applications. The choice of development language is more important on the Web, so it seemed useful to me to conduct this research on various platforms in fashion, with the advantages and disadvantages of each and for what type of application they are best suited. This should help avoid rewriting the code after several months of development...
For what type of application?
- It's a platform for creativity. JavaScript dynamism provides unique capabilities for creating new features.
- An application that responds to events is easier to implement in JavaScript (simulation, robotics ).
- Real-time applications use asynchronous mode. For example, an Internet site for discussion.
- Applications with a large number of exchanges, inputs/outputs .
- It is not suitable for a site that users turn to with great demand for a server processor, for example, for image or sound processing.
Advantages
- Most programmers know the JavaScript language, so launching a project is immediate and simplified, since the interface language is the same. This eliminates different reasoning about the backend and frontend.
- Many languages compile in JavaScript and therefore can work on Node if you have another predisposition language.
- It is easy to include NPM modules that other platforms like ROR may envy.
- Using a framework like Express, you can develop and upload an application online in a few minutes...
- You can write BD queries in JavaScript, not SQL (easier) without depaization .
- The same goes for JSON data, which is often found on the web.
- Multi-core processors are available via a cluster module.
Inconveniences
- The environment is constantly changing, the favorite framework today will be replaced by another in a few months... But nothing prevents you from continuing with the same tools .
- The event-oriented mode with a processing cycle is a problem for the site, since the entire site slows down when clients are abused. However, these excess loads can be controlled with specialized tools.
- We reproach the spaghetti code with kalbacks... They have nothing mandatory, the code is easy to write differently with the named functions, this is a matter of style. However, the problem persists when using third-party code.
- Heavy load behaviour can be difficult to assess.
Which well-known sites use Node.js?
- MySpace с Express. This allows him to easily create new features.
- Yahoo uses it where it fits alongside other languages.
- Paipal replaced Java with Node.js, showing a better result .
- Ancestry.com is built entirely on Node (100M req/day).
- Netflix.com. His blog tells how he solved the problem of significant workload.
- Groupon ported its Ruby, Java and PHP sites to a unique Node.js solution, plus the Gofer and Node cached APIs.
- Twitter in 2017 moved its mobile business to Node Express React PWA (Progressive Web App).
- Uber manages driver and customer availability with Node.
For what type of application?
- For regular web services or applications.
- When you want to recruit developers without experience .
- When performance is the first factor.
- When the source code is very important and needs to be changed often .
- Especially suitable for cloud software or related software.
Advantages
- A complete and efficient set of development tools.
- Simple language for collaboration and code maintenance.
- Very fast compilation.
- Little memory .
- Competition is built on language.
- You do not need to set a time like Java, only a program is enough.
- The language site is very convenient. She has nothing to do with others.
Inconveniences
- The language is quite limited, you should expect to enter more code than with others. It makes it boring .
- There may be no libraries for the application.
What well-known sites use it?
- Google is the first user.
- Docker.
For what type of application?
- All traditional applications that use databases and communicate with many clients.
- When you want to be sure that you have all the useful libraries and server frameworks, such as those provided by Apache.
- To get more chances to find experienced developers .
Advantages
- Many open tools have been developed for large websites, including the Apache Foundation, to run on Java.
- Profiling and debugging tools even in a cluster of machines.
- Huge library.
- Multithreading makes sessions independent and avoids blocking each other. However, this requires more resources.
- Can work in distributed mode (for example, Erlang).
- It can work in asynchronous mode (for example, Node) using the Vert.x module.
Inconveniences
- Perhaps it is this platform that requires the most material resources. Java cannot be installed on any server.
- Getting to know Scala is harder than other languages. As for Java, it is very verbose and it is more difficult to move from idea to implementation.
What well-known sites use it?
- Twitter uses Scala.
- All sites that use Apache's Hadoop, including Facebook, also use Java.
- Java extra is distributed as a backend of websites, using Apache tools or not.
For what type of application?
- The language site recommends this for e-commerce, banks, telecommunications, instant messengers and similar applications .
- Suitable for regular web applications when you are sure that you have a lot of users.
- When a lot of users are connected at the same time and interact indirectly (on the same objects).
Advantages
- Knows how to manage a very large number of users.
- Also specializes in distributed systems with fault tolerance. Fault tolerance is one of the basic principles.
- Collector's garage without breaks for ongoing applications.
- Integrated Mnesia database for complex circuits (not for documents).
Inconveniences
- Fewer libraries than the rest.
- Erlang's language is slow - but the platform as a whole makes up for that shortcoming.
- The community is reduced. This leads to a lack of documentation and support.
What well-known sites use it?
- Whatsapp was written in erlang. The number of users is approaching a billion.
For what type of application?
- Initially, the Windows platform was made wearable to work in the cloud with any OS. Therefore, it is suitable for online applications of any type running in the cloud.
- .NET Native compiles AOT applications that are suitable for mobile applications.
Advantages
- The Roslyn compiler and CoreCLR runtime are open source.
- Execution interpreted by JIT or compiled by AOT.
- Visual Studio provides a very complete development environment and can produce Windows, Linux, or Mac applications on the same station.
- You can install different versions of .NET on the same server, in containers, and thus test the new version before replacing the previous one.
Inconveniences
- For applications already developed for the .NET Framework, migration to .NET Core is not immediate, some of the code must be rewritten.
- Many non-.NET libraries and development tools are missing (in 2016).
What well-known sites use it?
- StackOverflow, a developer question site based on .NET and Dapper.
For what type of application?
- Few startups use PHP to run a web application. It's more the language of amateur sites. But the typical version of the language, Hack, could handle a large audience and PHP 7 too .
- This is the most economical when hosted, and therefore it is suitable for a site with limited goals .
Advantages
- PHP is easy to install using the Apache server.
- It is available to all hosting.
- Its functional library is almost universal, and frameworks like Laravel provide ready-made application environments.
- It is designed to interact with databases and data.
- It doesn't need a template to build pages, language is a template.
Inconveniences
- Language derived from old command line tools is rustic and inconsistent.
- PHP was very insecure, up to version 7, which now requires using mysqli instead of mysql.
What well-known sites use it?
- Facebook was built on PHP, but now uses Hack, a derivative language. In addition, Facebook also uses many tools to manage significant workloads.
- Wikipedia is based on PHP, but it is less of an application than a page server. The same goes for Wordpress.com .
- Dailymotion ported its 10-year-old PHP code to PHP 7 after the HHVM trial. PHP 7 provides the same performance and easier migration.
- Tumblr migrated from PHP 5 to PHP 7 in 2015.
Conclusion
You can see that the largest sites can easily use one of the five solutions. Sometimes they abandon one platform in favor of another and this is not always in favor of the same one. This shows that the best platform depends primarily on the application you want to implement.
Note: Ruby On Rails is described on the Ruby page. There are other platforms that I did not quote because of their inconvenience (scalability, slowness, difficulty debugging, insecurity.