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.
Facebook Porting PHP To JVM
61–68 of 68 posts
Re: Facebook Porting PHP To JVM
#62Earlier 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
Re: Facebook Porting PHP To JVM
#63Earlier 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.
Re: Facebook Porting PHP To JVM
#64Earlier 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.
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
#65Earlier 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?
Re: Facebook Porting PHP To JVM
#66Earlier 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…
Come on, they created Thrift, I think we can assume they use it?
Re: Facebook Porting PHP To JVM
#67Earlier 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…
Re: Facebook Porting PHP To JVM
#68Why 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.