Micro Focus is now part of OpenText. Learn more >

You are here

You are here

Is Netflix's open source model something enterprises should strive for?

John P. Mello Jr. Freelance writer

Big companies are known for keeping their development tools under tight wraps, but that's changing and developers are better off because of it. A case in point is the recent release of Falcor, a tool that Netflix has been using for several years to improve the performance of its mobile, TV, and desktop applications.

Falcor, named after the flying luck dragon in the film The NeverEnding Story, is an open source project that's good news for developers working on user interfaces that depend on data from a variety of sources for their performance.

The tool lets a developer represent all of their remote data sources as a single domain model via a JavaScript Object Notation (JSON) graph. It makes it easy for a developer to access as much or as little of their model as they want, when they want. Data can be retrieved using common JavaScript operations such as get, set, and call.

Setting data free

With Falcor, a developer doesn't need to worry about tailoring code to the data source. "You code the same way no matter where the data is, whether in memory, on the client, or over the network on the server," Jafar Husain, Paul Taylor, and Michael Paulson explained in a post on the Netflix Tech Blog.

They noted that Falcor keeps data in a single, coherent cache and manages stale data and cache pruning for the developer. It automatically traverses references in a JSON graph and makes requests as needed, as well as handling all network communications and opportunistically batching and de-duplicating requests.

Forrester analyst Randy Heffner says that knowing how to use it is key, as it's oriented at a front-end user experience development problem. "It's an interesting tool to have in your tool box, but you have to decide which of your applications that you're developing it will help you with. It's a way of making access to data—no matter where it resides—transparent to a user interface," he says. "You have to understand what it's good for, and what it's good for is manipulating data for viewing purposes on the client side."

It's common to break up services at the back end of a system. It makes the data easier to work with in modules and the services more resilient. However, it makes the data more difficult to work with for interface designers.

"When you have data, you usually don't have it all in the same place," explains Alex Handy, a senior editor at the Software Development Times. "What Falcor does for developers is allow them to unify their data source structures. No matter where or how your data is stored, you can access them with the same code instead of writing separate code for every single database and data store."

Book your data massage today

Falcor solves a common problem—massaging multiple data sources—in a common way: unified caching. In the past, caching was done ad hoc. Caches were created as needed. Falcor removes the need to do that, and that can save a developer time. "Every time you have to write a caching or mocking layer, it's time you're wasting not developing the app," says Taylor, a former Falcor team member who is now an independent developer.

That's not the only way Falcor can help a code warrior reduce development time. It can allow developers to speed up the process of creating a user interface when the back end of a project is incomplete. When the back end of a project isn't ready, Taylor explains, "you want to use mock data and pretend the back-end server is there, even if it isn't. Without Falcor, you have to mock each service individually."

Not only is that a lot of work to create, but once the server is running, it's a lot of code to remove. Falcor masks to a client where the data is coming from, so as long as a developer structures their data in a way the server will understand, then a developer can start developing their UI as if the back end of the system were finished. "I'm using that on a project right now, and it's really, really useful," Taylor says.

User interface coders may not be the only developers to find value in Falcor. It could have some applications for the Internet of Things (IoT), too. "I don't see any reason why Falcor couldn't be used on IoT devices," Taylor says. "It was written to run on low-powered devices and to be efficient."

Falcor's ability to unify local storage with network storage could be useful to an IoT device such as a smart TV. "If you were streaming information to a TV, some of that information would be stored on the television and some would be accessed on a network," the SDT's Handy explains. "The same code works on the local data store as works on a network store."

Open source it and they will come?

Open sourcing a powerful tool like Falcor might be a bold move for some companies, but not for Netflix. "They've contributed to 50-odd open source projects and they've gained a lot of market mindshare for Netflix as a business because of it," Forrester's Heffner says.

In turn, that mindshare can be turned into talent for Netflix. "When people see that a company is doing cool things, they want to work there," says Taylor.

Open sourcing tools used by an organization is also a way to cut down on on-the-job training by giving developers a chance to tinker with the tools before they fill out a job application. "If you're hiring developers and they have to learn something that they've never seen before, that could create friction onboarding people," Taylor notes.

At this point in Falcor's lifecycle, though, open sourcing the tool may be the best direction for Netflix to go with the program. "It's good engineering," Handy says. "If you take a tool like this and it's not part of your core intellectual property, just something you built to help you along the way, putting it out as open source is a good way to get it to expand and grow on its own without having to commit resources to it at the rate you did when you created it."

Netflix's willingness to contribute open source tools to the development community is characteristic of new-breed companies. "This is the modern way to do software," Handy says. "This is not the Oracle way of developing software."

"For Old World companies, this is new, but for New World and dot-com start-ups, it's table stakes," Handy adds. "It's the way you get stuff done."

Who's in?

As much as developers would like to see more power tools like Falcor make it to the ranks of open source software, a land rush to do so is unlikely. "You aren't going to see Citibank, American Airlines, Ford Motor Company or someone else sponsoring and releasing major open source projects," Forrester's Heffner says. "You might see one here and there, but there aren't enough data points to call it a trend."

Image credit: Flickr

Keep learning

Read more articles about: App Dev & TestingApp Dev