News for hackers. Stuff that matters.
Re:Haskell in the Datacentre by lmm on Wednesday December 14, 2016 @06:13AM (#13175176)
I think the bigger question is why they're using a C++ Thrift server. Haskell is good at transforming data - they should be able to use an OS socket and do the message decoding/encoding in pure Haskell.
Re:Haskell in the Datacentre by chongli on Wednesday December 14, 2016 @07:44AM (#13175542)
the bigger question is why they're using a C++ Thrift server

Because it's already there and it already works just fine.

It's so frustrating to see this sort of comment on nearly every post about a language outside the mainstream. It's a religious argument and not a productive one.

Re:Haskell in the Datacentre by lmm on Wednesday December 14, 2016 @07:50AM (#13175577)
> Because it's already there and it already works just fine.

Well clearly it didn't work just fine if its threading model was interacting poorly with that of their Haskell code. If there's a mismatch between those two components then that will continue to bite them in the future, and it's legitimate to ask whether moving the boundary would be a better way to solve the problem.

Re:Haskell in the Datacentre by mattnewton on Wednesday December 14, 2016 @09:20AM (#13176083)
There is an old saying: "We did what we did, not because it was easy; But because we thought it was going to be easy"

When they realized the bug the path forward probably seemed like patching and not a Haskell re-write, and that's a reasonable mistake to make.

Re:Haskell in the Datacentre by easytiger on Wednesday December 14, 2016 @08:47AM (#13175878)
your right, makes more sense to have both in c++
Re:Haskell in the Datacentre by massudaw on Wednesday December 14, 2016 @08:57AM (#13175929)
That was the last tried solution, didn't work out well. And what is holding is nothing haskell specific. Is just wasting effort re implementing good broad used code at Facebook.
Re:Haskell in the Datacentre by thinkpad20 on Wednesday December 14, 2016 @01:45PM (#13178533)
I think the "why not write it all in Haskell" argument is a bit spurious. Only the engineers on the team knew best the advantages and disadvantages of the various approaches. Presumably there were very good reasons to integrate it the way that they did, whether driven by architecture, performance, knowledge, library, smallest-effective-change, or other reasons. It's clearly worked out very well in the most basic sense (it does the job). And on top of that, we now have bug fixes and other improvements submitted to ghc. Seems like a win-win.
Re:Haskell in the Datacentre by tome on Wednesday December 14, 2016 @06:32AM (#13175248)
Re:Haskell in the Datacentre by zhte415 on Wednesday December 14, 2016 @10:15AM (#13176507)
Surely a bigger question is how a site with a basis in PHP transformed to making PHP compilers, .js frameworks, Haskell, C++ etc.

They seemed to have succeeded in creating a culture of coders/hackers that were opinionated/empowered sufficiently to use their tool of choice, and to persuade others of the advantages.

This doesn't really happen in large-cap companies (though does happen to empowered teams, but even then, only somewhat - thinking finance). And speaks to advantages.

Re:Haskell in the Datacentre by user5994461 on Wednesday December 14, 2016 @12:21PM (#13177688)
It's a big company. Thinkg just go to all directions when you've got thousands of devs.
Re:Haskell in the Datacentre by fusiongyro on Wednesday December 14, 2016 @06:44PM (#13180867)
If you hire developers at scale, you probably get quite a bit of variety.
Re:Haskell in the Datacentre by paulajohnson on Wednesday December 14, 2016 @06:28AM (#13175239)
At a guess, the server probably provides a unified front-end to services written in multiple languages.
Re:Haskell in the Datacentre by newmana on Wednesday December 14, 2016 @06:36AM (#13175266)
This was covered in a previous post: "Haskell is sandwiched between two layers of C++ in Sigma. At the top, we use the C++ thrift server. In principle, Haskell can act as a thrift server, but the C++ thrift server is more mature and performant. It also supports more features. Furthermore, it can work seamlessly with the Haskell layers below because we can call into Haskell from C++. For these reasons, it made sense to use C++ for the server layer." https://code.facebook.com/posts/745068642270222/fighting-spa...
Re:Haskell in the Datacentre by hellofunk on Wednesday December 14, 2016 @07:47AM (#13175554)
Don't confuse the features of a language with its actual run-time productivity.