Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Appbase - A realtime events-based document store

Appbase - A realtime events-based document store

Redisconf '15 talk: Using Redis to build a document store with a streaming events server.

Siddharth Kothari

March 05, 2015
Tweet

More Decks by Siddharth Kothari

Other Decks in Technology

Transcript

  1. Appbase: A Realtime events-based document index store 1) Document store

    schema 2) Dynamic References 3) All JSON 4) Realtime events - Subscribe to updates
  2. Pulling a Mongo! Here’s how: Document store schema { “item”:

    “pencil”, “qty”: 500, “type”: “no.3”} Collection Document
  3. Pulling a Mongo! Here’s how: Embedded Documents { “item”: “pencil”,

    “qty”: 500, “type”: “no.3”, “foo”: { “embedded_foo”: “bar” } } Embedded Property
  4. Pulling a Mongo! Here’s how: Adding References { “item”: “pencil”,

    “qty”: 500, “type”: “no.3”, “foo”: { “embedded_foo”: “bar” }, “/ref1”: “user/item#3” } Reference user item#3
  5. Pulling a Mongo! Here’s how: Adding References { “item”: “pencil”,

    …, …, “/ref1”: { “_collection”: “user”, “_id”: “item#3”, “ref_prop#1”: “something” } } Reference Adding the doc directly
  6. Beyond Document Store! Introducing Paths { “_id”: “pencil”, “_collection”: “stationary”,

    “foo”: { “embedded_foo”: “bar” }, “/ref1”: “user/item#3” } Reference user item#3
  7. Beyond Document Store! Introducing Paths { “_id”: “pencil”, “_collection”: “stnry”,

    “foo”: { “embedded_foo”: “bar” }, “/ref1”: “user/item#3” } Reference user item#3 Two paths: 1. /user/item#3 2. /stnry/pencil/ref1
  8. Beyond Document Store! Introducing Paths a b c d 1.

    a/b/c/d, 2. z/b/c/d, 3. q/w/d 4. … z q w
  9. So far… Document store with true references a b c

    d z q w { “_id”: “d”, “_collection”: “alpha”, “depth”: “4” }
  10. { “_id”: “d”, “_collection”: “alpha”, “depth”: “4” } Taking advantage

    of true referencing a b z Event subscriptions: 1.Property updates
  11. { “_id”: “d”, “_collection”: “alpha”, “depth”: “4” } Taking advantage

    of true referencing a b z c d q w Event subscriptions: 1.Property updates 2.Reference updates
  12. Live Demo /users/user_542 Create a new document Assign some properties

    { “em”: “[email protected]”,
 “points”: 5321, “/friends”: … }
  13. Live Demo /users/user_542 Create a new document Assign some properties

    { “em”: “[email protected]”,
 “points”: 5321, “/friends”: … } Watch it Stream
  14. API Spec Comes with a HTTP API server PATCH /{collection}/{document}/[path]

    GET /{collection}/{document}/[path] ?stream=true
  15. API Spec Comes with a HTTP API server PATCH GET

    https://github.com/appbaseio/ appbase-redis/ blob/master/ index.js Entire Spec
  16. Roadmap to v1.0 1. Battle Testing Unit Tests, Better Code

    Perf Tests 2. Scaling Use Pushpin = Message Queue + Streaming
  17. Roadmap to v1.0 1. Battle Testing Unit Tests, Better Code

    Perf Tests 2. Scaling Use Pushpin = Message Queue + Streaming 3. Rich Querying More filters, aggregation queries