TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Falcor – A JavaScript library for efficient data fetching

232 点作者 Nimsical超过 8 年前

16 条评论

gamesbrainiac超过 8 年前
In my company, we recently had a discussion about falcor and graphql. There were benefits to both sides, but at the end of it, Graphql won out.<p>Here are some of the reasons why:<p>- Falcor is not a standard or a language, its a large javascript library with conventions for manipulating data.<p>- GraphQL on the other hand, is a full blown query language, that is _standardized_. This means, that implementations in other languages (other than JS) will have to follow standards<p>- GraphQL has a very high rate of adoption, and has many libraries in other languages.<p>- GraphQL is backed by FB, which has a track record of releasing only things that have been tried and tested.
评论 #13612383 未加载
评论 #13612571 未加载
评论 #13614268 未加载
lsjroberts超过 8 年前
Falcor is a very interesting approach, and as others have mentioned GraphQL is very similar. I can&#x27;t go into any details, but we have been using Falcor on my team as the basis for our own work. We are gradually moving away from it though as it has become clear it is great for Netflix&#x27;s use-case but less so for a more generalised solution. Particularly when you throw in streaming data.<p>I have a sneaking suspicion that the open sourced version of Falcor also isn&#x27;t the version used internally. This is certainly true of their Prana (a sidecar used to allow a node app to talk to the rest of the Netflix stack). And the repo has had a massive slowdown and basically ground to a halt in the past year - <a href="https:&#x2F;&#x2F;github.com&#x2F;Netflix&#x2F;falcor&#x2F;graphs&#x2F;contributors" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Netflix&#x2F;falcor&#x2F;graphs&#x2F;contributors</a>.<p>So saying that, I&#x27;d have reservations about recommending it for other developers to use. The concepts are great, but GraphQL is more widely supported and discussed. Also the Falcor docs could use some serious work for clarity.<p>Though I also believe there are better ways to declaratively describe your data requirements against a graph than either Falcor or GraphQL.
评论 #13613613 未加载
评论 #13612427 未加载
评论 #13613422 未加载
评论 #13612370 未加载
lmeyerov超过 8 年前
Over at Graphistry, we&#x27;ve been contributing to a lot of core Falcor development over the last year, e.g., Falcor+React integration and, quite recently, streaming data support. It brought a lot of sanity to our single page app workflow, and as a GPU&lt;-&gt;GPU client&#x2F;cloud visual analytics company, it has been one of our trusted tools for letting our small team deliver technology experiences that even the big companies cannot. Examples below :) At this point, we believe we&#x27;ve gone firmly past what we could have done with Falcor alternatives. We have not been vocal about it, but it&#x27;s been unlocking a lot for us, and we&#x27;ve been in turn making sure it helps build out enterprise-level features (e.g., api-first) while still delivering our beyond-native experiences.<p>If any of this sounds cool, and especially if you are in the bay area, we have ~3 immediate developer openings -- build@graphistry.com :) Come work with one of the Falcor and Rx leads, one of the original reactive web framework developers, and more :)<p>==<p>Client+cloud GPU acceleration of visual analytics -- <a href="https:&#x2F;&#x2F;giphy.com&#x2F;gifs&#x2F;26gsjaFVRGMwO4Yp2" rel="nofollow">https:&#x2F;&#x2F;giphy.com&#x2F;gifs&#x2F;26gsjaFVRGMwO4Yp2</a><p>Visual investigation workflow programming -- <a href="https:&#x2F;&#x2F;giphy.com&#x2F;gifs&#x2F;l0ExittUyY3hjugso" rel="nofollow">https:&#x2F;&#x2F;giphy.com&#x2F;gifs&#x2F;l0ExittUyY3hjugso</a><p>graphistry.com
avitzurel超过 8 年前
I&#x27;ve watched Jafar talk about Falcor. Didn&#x27;t know about it before since GraphQL is so dominant in the space.<p>If you&#x27;re just getting into these, the major difference is the verbosity and the learning curve.<p>With GraphQL you need to know a lot about the schema and the types (which can be a good thing as well), with Falcor you don&#x27;t and there&#x27;s no easy way to code types (at least that I know of).<p>Whatever you choose though, I do encourage you to choose one. I have seen many APIs fail on performance because they send too much data down the wire just because one of the consumer needs it.
评论 #13611787 未加载
qaq超过 8 年前
It&#x27;s being in developer preview forever issues seat there with no response for long time. Unlike FB Netflix is dedicating 0 resources to help with its adoption. I think majority of people who originally wrote the thing left too.
评论 #13612079 未加载
评论 #13612207 未加载
marknadal超过 8 年前
Falcor, conceptually, is a really great and exciting idea. However it seems either too disconnected from existing tooling &#x2F; too theoretical. Meanwhile, I&#x27;ve been working on an Open Source Firebase alternative for a few years now, and I decided to go ahead and implement (what, in obviously IMHO) is a better version of the idea.<p>Recently somebody combined it with webcomponents&#x2F;polymer, which is pretty awesome. Here is an example they use for realtime IoT temperature data viz, you drop in `&lt;gun-ui-lcd parent=&quot;livingroom&quot; prop=&quot;temperature&quot;&gt;&lt;&#x2F;gun-ui-lib&gt;` and it automatically tells the system to ONLY load `temperature` from the `livingroom` database. More info, along with a cool animated gif showing the example off in action, is here: <a href="https:&#x2F;&#x2F;github.com&#x2F;Stefdv&#x2F;gun-ui-lcd#syncing" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Stefdv&#x2F;gun-ui-lcd#syncing</a> .<p>More generally, the way it works is this:<p>Imagine we have some document, like<p>``` { name: &quot;Alice&quot;, age: 27, pet: { name: &quot;Fluffy&quot;, age: 4 } } ```<p>all we have to do is<p>``` Gun(serverURL).get(&#x27;alice&#x27;).path(&#x27;pet.name&#x27;).on(age =&gt; ui.show(&#x27;#pet-age&#x27;, age)) ```<p>This makes it easy to bind with React, or Angular, or VueJS, or others. The important thing to note is, like Falcor, it <i></i>only<i></i> loads the 1 property, not the full document. If you want to show another item, it is trivial to just add `...get(&#x27;alice&#x27;).path(&#x27;age&#x27;).on(age =&gt; ui.show(&#x27;#age&#x27;, age))`.<p>I&#x27;ve already made a prototype which automatically generates the loading the properties based off of a plain HTML template. Hopefully I&#x27;ll have it published in the next couple months. Meaning all you have to do is add a property to your HTML, and it automatically binds realtime updates of data to that view! (No writing JS).
评论 #13613478 未加载
alexmuro超过 8 年前
I wrote a pretty big app in falcor, using react-redux-falcor for the client. Overall its was a good experience.<p>I haven&#x27;t really gone back to check out graphql thoroughly, although I will say since I started my falcor project the community around graphql has grown a good deal faster than the falcor community.<p>I haven&#x27;t worked on my falcor backed app in a couple months but last I worked there were still some rough edges and small bugs with falcor and it hadn&#x27;t made it to a 0.1.0 release yet and there wasn&#x27;t a lot of info from netflix about when it would get there.<p>If I was going to start a new app right now I&#x27;d take a longer look at graphql, despite really liking the development experience of falcor because of the community &#x2F; long term outlook.
ggregoire超过 8 年前
For those wondering:<p>Falcor is not another &quot;new&quot; JS framework. It has been released in 2015.<p><a href="http:&#x2F;&#x2F;techblog.netflix.com&#x2F;2015&#x2F;08&#x2F;falcor-developer-preview.html" rel="nofollow">http:&#x2F;&#x2F;techblog.netflix.com&#x2F;2015&#x2F;08&#x2F;falcor-developer-preview...</a>
base698超过 8 年前
The GraphQL site is way better in terms of getting across what it is and how you&#x27;d use it. The only reason I finally realized that Falcor was a parallel tech was I had recently implemented a GraphQL service and ran through the tutorials.
_greim_超过 8 年前
I spun up a Falcor system at my last startup. We had this legacy REST API where the payloads had gotten quite large. A user contains a follower list, which in turn contains other users, which in turn contain other entities, etc. It was a mess, and quite slow.<p>The plan was to have a new REST API without these nested entities. Yes, that means you have to make lots of little calls to the REST API, but since a payload now represented one thing only, server-side caching was vastly simplified. And, we had a Falcor router which essentially batched these calls between the client and server.<p>So the the client hits the Falcor router, which in turns calls the REST API over localhost, in parallel, several times. As the front-end evolved, the REST API no longer had to try to restructure its responses to cater to the new views. The incoming batch calls would just change. This in my view was the true win of the whole deal.<p>It worked beautifully! The fly in the ointment was that there were&#x2F;are no Java or Swift clients for Falcor, so while our Angular app was humming along happily in Falcor La-La land, our mobile clients were still talking to the legacy REST endpoints. We tried standing up some clever Falcor-like batching endpoints for the mobile folks, but they understandably wanted to stick to their fat endpoints.<p>Meanwhile, Netflix has repeatedly stated that iOS and Android client software is not on the horizon. They&#x27;ve actually gotten really quiet on the Falcor front in the last year. I think the team is under-resourced at the moment, unfortunately.
EdSharkey超过 8 年前
I notice sometimes that interestingly-connected, yet tangential topics can appear on the front page of Hacker News at the same time from time-to-time - often right next to one another at my viewing. In this case, I see Falcor and Microsoft&#x27;s Graph Engine next to one another at this point in time. Is there serendipity there?<p>I&#x27;ve been enamored with Falcor since it was introduced, but I couldn&#x27;t fathom how the server side would work to produce the JSON Graphs without a lot of painful data reshaping of relational data. It always seemed to me that a graph database would best serve as the backing store for Falcor.<p>Does anyone have experience backing a Falcor-driven app with a graph database? What was that like? Would Microsoft Graph Engine pair nicely with Falcor for building a user-facing web app? I&#x27;m scared of graph databases because I fear they&#x27;d necessarily be slow or not scale horizontally compared with NoSQL.
sebringj超过 8 年前
What about fine grain permissions such as a certain user can only see public fields of other users or you can only change your vote after 10 minutes? Opening up the data model may work in many cases but seems like it just brings up other paradigms in its place.
评论 #13613021 未加载
评论 #13611986 未加载
评论 #13619542 未加载
amelius超过 8 年前
&gt; Falcor lets you represent all your remote data sources as a single domain model [...] You code the same way no matter where the data is, whether in memory on the client or over the network on the server.<p>Wasn&#x27;t this the basic premise of URLs?
davesque超过 8 年前
I guess someone has to write a data compression algorithm now called Atreyu.
评论 #13612929 未加载
gurubavan超过 8 年前
So does Netflix not actually use GraphQL?
评论 #13611559 未加载
jsierragarcia超过 8 年前
this is neat