Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relay is comming #59

Open
tychotatitscheff opened this issue Jul 7, 2015 · 3 comments
Open

Relay is comming #59

tychotatitscheff opened this issue Jul 7, 2015 · 3 comments

Comments

@tychotatitscheff
Copy link

After seeing this keynote from @vjeux at React Europe, I think that It could be possible to make swarm works with relay.

For the one who have never heard of it, relay is a module that allow you to declare requirement inside the components and will handle for you the unirectional data flow in a much simpler way than flux.

See the FAQ for more info.

Basically im not sure how rellay and swarm can work together since most of the feature are shared but swarm has the advantage of beeing able to do real time and persistency (cf keynote) and i never heard that rellay aims to do it.

It may be a good idea to look at rellay once it is released in order to see if it would be possible to make something with with { relay + swarmjs }.

@vjeux
Copy link

vjeux commented Jul 7, 2015

Cc @joesavona

@tychotatitscheff
Copy link
Author

The real account is @josephsavona isn't it ?

@gritzko
Copy link
Owner

gritzko commented Jul 10, 2015

Tycho, thanks for the hint.

Real-time and persistence are indeed two very hard challenges and Swarm focuses exactly on those two things. This ice-and-fire trade-off (real-time + offline-ready) is mostly motivated by collaborative/social apps and mobile devices. More on objectives: http://swarmjs.github.io/articles/1of5/

It takes a novel architecture to sort those things out. Swarm employs op-based CRDTs, automatic merge of changes, continuous sync, all-async interfaces, etc.

Technically, it syncs over WebSocket and caches data in WebStorage or IndexedDB. It has its own data sync protocol (Lamport timestamps and all that stuff).

Hence, Swarm is not something you can easily slap on an existing system.

Still, I see the obvious Swarm/Relay overlap. That is a centralized data store, unified data fetching/syncing, event flow.

Compared to Relay, Swarm is hardcore on real-time and offline/caching. But, it lacks in object graph management, GraphQL and related things. Which is definitely nice to have (and often requested).

In case Relay would allow for pluggable backends in a non-trivial way, then probably it is possible to carve something out.

So far, React integration was a breeze because basic abstractions match really well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants