3 ms·
Curiously, VKontakte also started from PHP+MySQL but went another way. PHP is compiled ahead of time with something called KittenPHP. It's open-source. For data
by grishka 3y ago
Curiously, VKontakte also started from PHP+MySQL but went another way. PHP is compiled ahead of time with something called KittenPHP. It's open-source. For databases they switched some parts to their own bespoke solutions in C that talk with PHP over the memcached protocol. These are called KittenDB (or "engines") for the simple single-purpose ones, and there was also a more generic MySQL replacement in development when I left in 2016, MeowDB.
- jonhohle 3y agoI’m not sure why someone of facebook’s scale would want JIT instead of AOT. That’s a lot of servers all JITing the same thing that could be done once at build time.
- jeffffff 3y agoJIT compilation has the opportunity to do profile-guided optimization at runtime. JIT compilation is also simpler when distributing an application to non-identical servers, as it can optimize for the exact hardware it is running on.
- yuliyp 3y agoFacebook actually does some compile-time optimizations, but also ships some of the profiling data for JITing between early deploy phases and the rest of the fleet: https://engineering.fb.com/2021/03/03/developer-tools/hhvm-jump-start/ https://engineering.fb.com/2021/03/03/developer-tools/hhvm-j... Also, Facebook used to do ahead of time compilation (HPHPc) but eventually HHVM managed to outperform it.
- woadwarrior01 3y agoHHVM's predecessor at FB was an AOT PHP to C++ transpiler called HPHPc. There are a lot more optimization opportunities with JIT compilation when dealing with dynamically typed languages like PHP.
- pjmlp 3y agoBecause they first tried to AOT, and a 2nd project with a JIT managed to get better performance out of it, with improved development workflow.