Live data from Hacker News

Facebook Porting PHP To JVM

nerds-central.blogspot.com

61–68 of 68 posts

Re: Facebook Porting PHP To JVM

#61
post #33

Earlier quoted context omitted.

Many JVM developers for whom programming is craft rather than a day job are definitely looking at both Scala and Haskell. Lots of excellent stuff going on with both, as you point out - concise, safer.

I'll just have to trust you on that I suppose.

That is true. As someone who thinks both ways (craft and day job) the issue with Scala (that with which I have the most experience) is the tooling.

Re: Facebook Porting PHP To JVM

#62
post #11
post #5

Earlier quoted context omitted.

Just like nine women can have a baby in one month?

exactly. One makes the head, two make each arm, etc... of course, you can't do that with computer software

In this case a team could work across the project. One on the parser/lexer one on AST translation, one of code generation, Two on the runtime and 1 on build/ci. I think that makes 6.

Re: Facebook Porting PHP To JVM

#63
post #31

Earlier quoted context omitted.

try reading The Mythical Man Month http://en.wikipedia.org/wiki/The_Mythical_Man-Month unfortunately my boss thinks as you do..

Errmm, if you actually read the book properly you'll realise that the baby/mothers analogy applies to synchronous sets of work and workloads that cannot be broken down into parallel running tasks. Once architected to a suitable degree I'd imagine that there are at least a few streams of work that could be carried out concurrently.

Yes! Someone gets it!

Re: Facebook Porting PHP To JVM

#64
post #44

Earlier quoted context omitted.

I'd say it's on par with the CLR, similar corner cases, similar annoyances. The biggest problem I've had with the CLR is threads bouncing between CPUs but I'd attribute that to Windows as I worked around it with some Win32 calls to pin threads to processors. Can't really compare to LLVM, I haven't personally encountered any of the known llvm bugs (clang to be fair) with Obj-C.

The JVM has a huge advantage over the CLR in that Mono is nothing like as well supported as Oracle supports the JVM and Microsoft's CLR is Windows only - which makes it far to expensive for cloud computing.

If you're looking to stretch a budget I'd look to companies like Hetzner rather than looking to the cloud.

I'd try to increase the revenue my server generates rather than decrease the cost of servers, but I'm the kind of guy who thinks it's possible to pull more than 5 cents an hour in revenue from a server, but if you only get 5 cents per hour then it would be important to use linux so you maintain your 2 cent per hour profit margin.

Re: Facebook Porting PHP To JVM

#65

Earlier quoted context omitted.

Yes. http://shootout.alioth.debian.org/u64q/which-programming-lan... Note that Java compares very favorably with C. (Of course, the real thing to take away from that chart is: why don't all the JVM users switch to Haskell? It's more concise, safer, and has a better community.)

The JVM can be bootstrapped relatively easily compared to Haskell. It's just C++ code. If I gave you a computer with a C and C++ compilers, and the ghc source, what would you do?

I'd make a snide comment about receiving a phone call from 1980 asking for their computer back.

Re: Facebook Porting PHP To JVM

#66
post #21
post #16

Earlier quoted context omitted.

Because there are millions of man hours of PHP from FB and it will cost less than one hundred thousand to port that work to the JVM. Yes the code will have to retested, but if you rewrite then you rewrite AND retest. Working code makes a great test suite, something you lose in a rewrite.

Yes, that sounds fine (and I'm aware of the Spolsky article posted in another comment.) But the fact is that a system of that size simply must already be split up into discrete services or components. (If it's not, then that should be their first priority. But I can't imagine Facebook is running everything they do out of one process). So they could port each service/component one at a time, rigorously testing and imp…

> But the fact is that a system of that size simply must already be split up into discrete services or components.

Come on, they created Thrift, I think we can assume they use it?

Re: Facebook Porting PHP To JVM

#67
post #64

Earlier quoted context omitted.

The JVM has a huge advantage over the CLR in that Mono is nothing like as well supported as Oracle supports the JVM and Microsoft's CLR is Windows only - which makes it far to expensive for cloud computing.

If you're looking to stretch a budget I'd look to companies like Hetzner rather than looking to the cloud. I'd try to increase the revenue my server generates rather than decrease the cost of servers, but I'm the kind of guy who thinks it's possible to pull more than 5 cents an hour in revenue from a server, but if you only get 5 cents per hour then it would be important to use linux so you maintain your 2 cent per h…

I see your point, but then money is money. So, why pay MS anything? Why is computing treated in this unique way where minimizing cost is not standard practice?

Re: Facebook Porting PHP To JVM

#68

Why do these companies like the JVM so much? Twitter, and now Facebook. Does it have that great of performance?

It's one of the most scalable, robust, secure, proven mainstream web platforms available. And at almost any server-side scale it performs better than PHP, Ruby, and Python. As far as mainstream languages go, only C and C++ have a performance and scalability edge, but C++ at least comes with more complexity. JVM seems to hit the performance:complexity sweet spot.

... and you have to work really hard to make C or C++ run any faster than the JVM. For all normal levels of programmer effort there is no difference or the JVM is faster.
Post reply on HN