drborges / arbor-store

Seamless state management made with ❤️
https://github.com/drborges/arbor-store
8 stars 0 forks source link

Implement store adapters to connect to different data sources #19

Open drborges opened 6 years ago

drborges commented 6 years ago

This would allow a local store to connect with different remote data sources, such as a Rest API, GraphQL, or even another arbor store via a peer-to-peer connection.

Rest APIs

store.connect(new MyRestApiAdapter)

GraphQL

http://graphql.org/graphql-js/running-an-express-graphql-server

store.connect(new MyGraphQLServerAdapter)

Web Sockets

https://www.html5rocks.com/en/tutorials/websockets/basics

store.connect(new MyWebsocketChannel)

WebRTC

https://www.html5rocks.com/en/tutorials/webrtc/basics

store.connect(new MyWebRTCConnection)

Local Storage

store.connect(new LocalStorageAdapter)
drborges commented 6 years ago

Useful References:

  1. Ember DS.Store (@Juraci)