The historic issue with JSON is that it doesn’t update to real time figures. Of course, a huge consideration when we apply this to financial services is that the stock prices change throughout the day which means that the JSON graph nodes are out of date within moments. Because of this we may end up returning an array of stock IDs along with the price that the stock was bought at. The issue with this is that it leads to a very chatty system with data that is difficult to cache, which is even trickier if the source of the live prices is different from the trader’s details.
But that is now all set to change after Netflix’s recent announcement of
In terms of the usability of Falcor, users are now able to express their domain model as a single virtual JSON graph comprising of multiple data sources. Falcor optimizes communication between your clients and your server by caching, bulking and intelligently traversing your JSON graph. It provides a very simple API with very few methods such as get, set and call which allow you to send and receive just the relevant data.
And best of all Falcor is framework agnostic!
Returning to our previous issue with the historic information being used in graphs, Falcor now offers us a solution to this issue. With Falcor the data is the essentially the API and we can traverse the JSON graph as if it was all present on the client.
The coding below shows the Falcor graph model used to model the same paradigm as before.
Falcor can now understand the graph and the connections between the nodes so that when we try to query then the correct data will be returned.
The beauty of using Falcor’s asynchronous API is that it no longer matters if the data is cached locally or remotely as Falcor can handle both for us.
In terms of its future, we believe that with data becoming more and more interconnected and remote that this will effectively allow the unification of data across different data sources. We see this playing extremely well with frameworks such as Angular 2.0 that provide asynchronous data binding. Through allowing Model View Controller (MVC) views to retrieve data from your applications will finally be achieve true MVC decoupling as the view will no longer need to ask the controller for data but instead request it directly from the model. This pattern is commonly referred to as Async MVC and detailed with use in Falcor during Jafar Husain’s appearance on the Angular Air YouTube channel.