Netflix yesterday released a developer preview of Falcor, an open-source JavaScript library available under the Apache License 2. Falcor unifies data sources (regardless of their location), and allows developers to access and present the information inside those stores as if they were all in the same location.
Falcor, clearly named after the flying luck dragon from “The NeverEnding Story,” is currently used in production at Netflix, where it forms the data access layer for the company’s TV, mobile and desktop applications.
(Related: Netflix takes on DNS)
Developers can use Falcor to make their data access paths simpler by presenting remote data under a single domain model through a virtual JSON graph. Data can be in memory on the client, or over the network on a server, and yet the code used to access that data remains the same for both locations.
While Falcor is already in production at Netflix, the company has included portions of the library that are not yet fully operational in their system. Falcor is still under active development, but the road map for the project will be released soon, according to a Netflix blog post on the topic.
The developer preview of Falcor also includes the Node version of Netflix’s Falcor Router, a sample of what can be done with this library.
According to the GitHub page for the Falcor Router demonstration, “This project exports a Router factory for a Netflix-like Application. The Router creates a virtual JSON Graph object for a Netflix-like application, and is intended to be exposed as JSON resource on a Node Application Server. The JSON Graph object is referred to as ‘virtual,’ because it is not stored in memory anywhere. Instead the Router builds requested subsets of the JSON Graph on demand by accessing three different databases. This creates the illusion that there is a JSON resource on the application server, when in fact the application server is completely stateless and retrieves requested data on the fly from the data stores.”
Documentation and information on Falcor are available online.