Answer the question
In order to leave comments, you need to log in
Why do backend in different languages?
Good hour.
Tell me why they write backend in several languages? I understand that in large java and c++ projects this is a replacement for classic php, but is it possible to implement, for example, backend only in java or c++? Why write in two languages?
For example backend
MSN.com is written only in ASP.NET
YouTube.com is written in C, C++, Python, Java, Go
What is C++, JAVA and GO responsible for on YouTube?
I understand, the question is general, but still, at least in theory, explain.
Thank you!
Answer the question
In order to leave comments, you need to log in
Let's take Dropbox for example.
It was originally written in Python - it's faster for prototyping.
Then it was converted to Go - for predictability and speed. But why completely redo it? Many pieces in Python are still there today. And they work.
And the smallest piece was redone in Rust - to speed up the bottleneck.
Here you have 3 languages working simultaneously in Dropbox on the back.
Or there is one or another specialist who knows this or that language better at the moment. He was instructed - he did what he knows best, in order to do it faster and better.
Or that was the nature of the problem. An example with the Rust/Go combo is shown above. Somewhere one language may be better, somewhere else.
And if we remember that the project is not only written, but also ready-made components are applied, then C / C ++ are automatically added to almost any project, those that are in the database, for example, etc., etc. SQL is also a backend language. And so on and so forth.
You exaggerate the importance of language. It's just a programmer's tool. Same as the keyboard. An experienced programmer learns at least a dozen languages over the years, and some even much more. There is nothing of the kind in this.
They write, probably not from scratch, but modify some existing solution.
Yandex once said that they first write in something faster, simpler, such as python or even pearl, and when (if) the module grows to a certain threshold, they rewrite it to something more productive.
Well, different development teams can be more proficient in a particular language.
The tongue is not an idol for worship, but a tool. You can build a house with only one ax, but usually builders use dozens of tools, because they are faster and more convenient.
Tell me why they write backend in several languages?
the same contact was written in php.
when the problem of slowness of php arose, a kphp tool was written to translate php into C ++ with subsequent compilation.
The speed of work of sweat reports of admins of the contact has increased two (!!) times, for a highly loaded site this is a lot, including in terms of money.
Facebook also did a similar thing. it's about puff.
in general, each tool is convenient in the use case for which it was originally conceived.
some language simplifies / speeds up writing working code in it, takes on a bunch of subtle nuances.
some provide the functionality of high-quality code development, but require a lot of picking and a lot of knowledge.
C++, Java, Go, PHP, Python.
These are popular languages on the web, built on the principle "first the most efficient, but the most difficult to develop and maintain code, in the end - the easiest to write and edit, but the least efficient."
There is no point in writing the entire project in C ++ - the costs will be wild, and you will simply be overtaken by competitors who have concocted an analog that works a little worse from shit and sticks.
There is nothing wrong with a Python project - as long as it does not go under load, and rewriting part of the service in C ++ turns out to be cheaper than buying new servers.
This is how language mixing comes about. Fortunately, the principles of effective communication of individual services with each other have long been known, and what the service has "under the hood" does not play a role in the overall architecture at all.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question