Facebook’s New Spam-Killer Hints at the Future of Coding

by Cade Metz, Wired.Com

Facebook’s software engineers have spent the last two years rebuilding the system that removes spam—malicious, offensive, or otherwise unwanted messages—from the world’s largest social network. That’s no small task—Facebook juggles messages from more than 1.5 billion people worldwide—and to tackle the problem, Louis Brandy and team of software engineers made an unusual choice: they used a programming language called Haskell.

In the early ’90s, a committee of academics built Haskell as a kind of experiment in language design, and all these years later, it remains on the fringes of mainstream programming. At GitHub—the primary repository for software code on the ‘net—Haskell ranks 23rd on the list of the most popular languages. Even so, Facebook chose it as the basis for its enormously complex anti-spam system, which went live earlier this year.

Brandy says Haskell is a perfect choice because it is extremely proficient at multiple and simultaneous task execution as well as providing engineers tools for coding the various tasks on the fly. “We want to run as many checks in the shortest amount of time, and that’s where Haskell helps us,” he notes.

Haskell’s prowess at concurrency is rooted in its nature as a “purely functional programming language,” in which programs are built around a series of functions, with each function running independently of all the others. Haskell fulfilled Facebook’s need for a language to help engineers craft “rules” for spotting spam on the social network, without being too concerned about their manner of execution. “If we’re working in a purely functional language that we know doesn’t have side effects, the faster we’re able to move,” says Instagram’s John Edstrom.

Facebook’s strategy could point to the future of programming, as newer languages follow Haskell’s design in that they enable developers to build massively parallel code at speed. Newer languages such as Google Go and Mozilla’s Rust are designed so that developers can build massively parallel code and build it at speed. And as Brandy points out, other projects are building Haskell-like software libraries for additional languages, including “reactive” programming projects like RxJava.   Read the Wired Article

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.