This is not original question on the Internet, but all the answers there are not really helpful. I'm interested in other people opinions. So, what do you think, which tech stack is most appropriate for building such feature rich application that serves more than billion users?
Some of the things to consider are that backend languge should be fast and efficient. Which data storage paradigm and/or specific tech would you recommend? Cache technologies and techniques?
Also, there are a lot of real time capabilities such as chat, notifications, feed updates, comments (now you can even see when somebody is writing reply, before he/she even posted). Should real time stuff work via web sockets or classic AJAX with polling? Can web sockets scale to hundreds of millions scale without major downsides?
For the frontend stuff, should it be "one website fits all" regarding fitting content for all screen sizes, or to have separate versions for various screen sizes? What about UI, should it use some library or framework like Vue, React or Angular? Or maybe something else? What about rendering, should it be rendered on client or server rendered first?
What about image processing, video processing, live streaming?
You don't have to comment on everything, but explanation why would you pick something would be appreciated. I really want to see what people think and maybe focus on learning some of the stuff from the answers.
j
stuff ;)
api/database layer : I might go with nodejs + aws services or elixir/erlangVM.
Database : I might go with mongodb/sql . And elastic search for fulltext searching
application Layer : i might go with python or GO.
web frontend : React js or phoenix elixir
mobile : react native or traditional ios/android devlopemnt
It was and always will be built with PHP. Forever. And ever.
Backend Language(s)
I guess, that they might think about using Go for their front-end facing backend, since it is highly concurrent and better suited for the job than other languages. They might use Python for other tasks, like data mining, data analysis and artificial intelligence, though. Some of those calculations will definitely be offloaded to GPGPUs, which adds in OpenCL or Cuda.
Client-Server Communication
Concerning the polling, I they'd probably go for sockets from the start, which allows them real-time notifications, updates and chat while having close to zero overhead (no HTTP request with headers, TLS handshake, etc.), meaning a better performance and less CPU-costs for handling said overhead.
Front-End
Facebook's philosophy is "Move Fast, Break Things", so I guess even if all of the tech which exists today (React included) would still be available, they would do their own things. I mean, it's a company which literally welcomes you with the word "HACK". Headquarters is located in "Hacker Way". What else can you expect? But it would be quite close to React, because that's what they need. I guess they would do backend-rendering (taken from cache) for the initial page, then offloaded rendering to the client (client capacity is free, after all)
Image/Video Processing
If I had to create something like that today, I would probably go for C or C++ with OpenCV, because of the performance per resource usage and ease of development. Since we are talking about FaceBook, they might, however, do their own thing, again, which is more tailored to their specific needs. Again, GPGPU here, so OpenCL or Cuda will also be used.
Python. I think I heard they were increasingly big on Python.
Nicolas Danelon
Full Stack Developer
Definitely they would use rust. I'm not just a Rust fun boy, I found this in twitter: https://onesignal.com/blog/rust-at-onesignal/