Facebook fights spam with own programming language

By

Lightweight and extremely efficient, coder says.

Facebook has built an in-house programming language to fight the scourge of spam.

Facebook fights spam with own programming language

Software engineer Louis Brandy detailed the Feature eXtraction Language (FXL) in a post on the social networking site.

He said FXL was a fast, flexible and safe means for Facebook site integrity engineers to write rules to identify spam before it hits users.

"Spam threats to Facebook's site integrity change on a daily, or even hourly, basis," Brandy said.

"Attackers peddling a 'free iPad 5' scam one day might tempt users with false promises of various gift certificates the next. Fortunately, FXL provides us with the capabilities to keep pace with constantly evolving threats.

"We crafted FXL to … expressively codify the business logic of fighting spam and [to] fetch data as efficiently as possible."

Despite the simplicity of the language, it is "ruthless[ly] efficient" at fetching large amounts of data from many sources, a task from which the FXL name is derived.

The language was described as "a narrowly-optimised implementation of a well-chosen subset of Standard ML" with customised syntax that sought to optimise FXL rather than require an expansion of the language.

If (Reputation(SharedUrl) < 0) Then [LogRequest] Else []

If (Reputation(SharedUrl) == MALWARE) Then [BlockAction, LogRequest] Else []

If (Average(Map(Reputation, PreviousSharedUrls(User, 5))) < 0) Then [WarnUser, LogRequest] Else [] 

The rules (above) expressed in FXL sought out malicious URLs by tapping a users' link sharing history and data held by URL reputation services; they were coherent in terms of business logic, but poor expressions of data fetching logic. 

Such a problem was common to large computing systems but was solved with FXL which would automate batching the data fetches in a single network round trip.

"A conventional implementation would evaluate this code top to bottom, left to right. We would fetch data sequentially, conducting an excessive number of network round trips between the machine executing FXL and the reputation service."

Brandy listed more details about FXL on the facebook page.

Got a news tip for our journalists? Share it with us anonymously here.

Copyright © SC Magazine, Australia

Tags:

Most Read Articles

Rio Tinto AI tool aids defect elimination in rail operations

Rio Tinto AI tool aids defect elimination in rail operations

Curtin University makes headway on 'radical' tech shakeup

Curtin University makes headway on 'radical' tech shakeup

ANZ consolidates operational risk into ServiceNow

ANZ consolidates operational risk into ServiceNow

Salesforce blocks AI rivals from using Slack data

Salesforce blocks AI rivals from using Slack data

Log In

  |  Forgot your password?