Quick demo of Zero’s new background queries.
@aboodman9974 位关注者
18,837 次观看
11 条评论
评论来自 X (Twitter) 上的原帖

@schickling
Dope tech, dope video demo, dope music choice! 🔥
5 个赞

@typeofalex
„background queries“ SPAs like they always should have been 🎉
2 个赞

@thekitze
is a cloud version coming soon?
2 个赞

@aboodman
Yep
3 个赞

@khagesh17
Looks like GraphQL bundled with backend code to access db. Won't it have same problems as GraphQL?
1 个赞

@aboodman
It’s not very much like graphql at all. GraphQL is about abstracting query description from implementation: you describe queries in an abstract syntax and impl can vary. Zero is like the opposite: query language and inpl are coupled (zero provides the only impl). Also Zero is streaming socket based and incremental vs GraphQL which is request/response. So no, it has entirely different problems 😆(and some benefits too). Is there a specific GraphQL problem you’re worried about?

@davide_segullo
the only thing I do not understand about zero is whether it is possible to integrate it with an existing backend (already having REST services) or if you have to migrate to a specific architecture
1 个赞

@ditorodev
so wait, using zero i would just not need a backend api?

@aboodman
Not in the normal sense. You still have the option* to put code on server for auth, custom validation, etc., but the basic read/write model is you specify queries on the client directly against the backend db and they sync continuously. It feels like having direct access to program against backend db from client.
2 个赞

@zachrip_
What are the perf implications? Would it be unwise to set a ttl in days? And what happens if I hit the back button without this ttl?

@aboodman
The expectation is to set ttls of days or even years. Our dogfood app zbugs uses ttl “forever” for some base queries that we expect the user to always need, and ttl “1d” for other queries. We also use ttl “none” for some queries that don’t need to be maintained. This is possible because Zero uses a custom built incremental query engine. “ZQL” can maintain queries far more efficiently than simply re-running them over and over. Like any query it’s definitely possible to write slow zql queries - not least because it’s in alpha. But the intent is to keep these queries running for long periods and we’ve designed the whole system to make this possible.
2 个赞