Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Did you happen to write/blog anywhere about the scenario and the reasons for the move from PHP to Java? It would be an interesting case study.



Sadly no, I've chosen not to identify myself so that I can fully speak my mind. But in short, the PHP 5 interpreter (with APC) was a pig even for a scripting language, and few builtin client stacks lent themselves to making parallel requests to different backend services with timeouts in milliseconds. The rewrite was also an opportunity to jettison technical debt like support clutter for long-disused features (many forgotten after turnover in engineering). We only had to tune the GC a little; the gotchas have been minimizing exception volume (they're still extremely expensive, especially when stock Tomcat 6 handles certain bogus requests that way) and learning to avoid certain J2SE features which impose unexpected synchronization (weird stuff like creating fresh java.util.Calendar instances instead of cloning one). Nowadays we're moving from servlets towards Netty and async everything so our cores don't context switch so much.

We don't like Java, but the JVM has met our needs pretty well. I was tempted to argue for Clojure, but I'm not sure we could have taken the performance or maintainability hits for discouraging static typing.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: