Netflix builds JavaScript library to fetch data

The Falcor project, still at the preview stage, retrieves data via simple JavaScript operations

With its Falcor project, Netflix is offering a JavaScript library for efficient data-fetching, with developers able to represent remote data sources as a single domain model via the JSON Graph convention.

Netflix, which uses Falcor for the company's mobile, desktop, and TV applications, has just released a developer preview of the technology, which can be accessed on GitHub.

"You retrieve your data using familiar JavaScript operations like get, set, and call," said Netflix's Jafar Husain, Paul Taylor and Michael Paulson, in a blog post. "If you know your data, you know your API." JSON Graph, meanwhile, serves as a convention for modeling graph information as a JSON object.

Falcor provides a JavaScript-like path syntax for accessing as much or as little data as desired, according to the project's website. Data is kept in a single, coherent cache, and Falcor manages stale data and cache pruning. References are automatically traversed in a graph, requests are made as needed, and network communications are handled transparently.

Falcor is middleware and not a replacement for an application server, database, or MVC framework, Netflix said. "Instead, Falcor can be used to optimize communication between the layers of a new or existing application." Netflix plans to release a road map for Falcor soon. The developer preview features a Node version of the Falcor Router, which is not yet in production use. Falcor Router is an implementation of the DataSource interface, which can expose graph information. Netflix also is providing a working example server for a Netflix-like application, accessible at this GitHub page.

Join the TechWorld newsletter!

Error: Please check your email address.

More about DataSourceNetflix

Show Comments