Live data from Hacker News

Netflix Releases Falcor Developer Preview

techblog.netflix.com

11–20 of 53 posts

Re: Netflix Releases Falcor Developer Preview

#12

For a much simpler solution to the json graph problem: https://github.com/jsog/jsog Implementations in Javascript, Python, Ruby, and Java.

Honest question, how is it simpler?

There are no paths to evaluate, just unique synthetic ids. The JSOG transmutation process is a simple recursive function; most of the implementations are just a handful of lines of code.

Re: Netflix Releases Falcor Developer Preview

#13

For a much simpler solution to the json graph problem: https://github.com/jsog/jsog Implementations in Javascript, Python, Ruby, and Java.

I much prefer the JSON-API approach by Yehuda Katz, et al.[1]

https://gist.github.com/21echoes/a1ca3e4376262da32297

It's definitely designed to be used in a RESTful-esque situation (the reference keys are a type/id tuples), but that's the dominant JSON use case anyway.

For an example of why you'd want type/id tuples over JSOG's plain string @id -- while in the given JSOG example, all items are People, referencing an Address object from Sally (so that Bob can deliver her gift) introduces a potential conflict between Address @id: 1 and Person @id: 1. To disambiguate, you could of course prefix all "@id" value strings with e.g. "address-" or "person-", but then you've just re-invented JSON-API's solution, while making your @id not a real id (not usable in cases like e.g. `api.example.com/resource/`, etc.).

The other solution is to say that JSOG @id's are only for use in one response parsing situation, and could be discarded afterwards. But that seems like quite a waste -- what if e.g. your API wanted to be able to send @id references over the wire without the overhead of sending the whole referenced object?

[1]http://jsonapi.org/

Re: Netflix Releases Falcor Developer Preview

#14
I have been following the falcor announcements, presentations and discussions for a few months. I am really impressed at what a good job the Netflix team has done with introducing the json graph concepts, I've learned a lot it regardless of falcor. Kudos Netflix!

I really like the concepts and client/server model. If it is performant, it will be fun to see persistent videogame worlds written through falcor. To that end, would it be possible/effective to hang parts of the graph off of WeakMap so that big, not recently used parts of the graph are allowed to fall away? (Perhaps that is how it works right now, I haven't had a chance to look at the source code, pardon my ignorance...)

Re: Netflix Releases Falcor Developer Preview

#18

For a much simpler solution to the json graph problem: https://github.com/jsog/jsog Implementations in Javascript, Python, Ruby, and Java.

I much prefer the JSON-API approach by Yehuda Katz, et al.[1] https://gist.github.com/21echoes/a1ca3e4376262da32297 It's definitely designed to be used in a RESTful-esque situation (the reference keys are a type/id tuples), but that's the dominant JSON use case anyway. For an example of why you'd want type/id tuples over JSOG's plain string @id -- while in the given JSOG example, all items are People, referencing an…

JSOG solves one particular, widespread problem - reconstituting an object graph on the other side of a wire. As you said, the information is only meaningful during the exchange. JSOG isn't trying to solve some greater notion of object identity; that's your application's business.

Re: Netflix Releases Falcor Developer Preview

#19
I really admire Netflix's ability to put together developer documentation for their open source projects. I think it reflects well on their engineering culture.

I was similarly impressed when I was reading the documentation for Hystrix, which seems to share some functionality with Falcor, like request batching and caching.

The path syntax is very readable and obviously plays to JavaScripts strengths as a dynamic language. However, I would gladly pay the cost of more cumbersome syntax to recover static analyzability through a tool like Flow or TypeScript. With Observables in particular, the ability to track the type of the value inside the Observable is really convenient.

Post reply on HN