ubikDB: an introduction
Building a real time distributed database
for the browser
2014-02-26, budapest_py

Balázs Reé
ree@...
Ubik is a book of Philip K. Dick.
Ubik is an universal product.
!

shared database = persistency + notifications
syncing JS...
Data and event flow
•

it’s a sync solution

•

networking through http

•

•
•

‘service’ could be a web
application
Datab...
Firebase
•

http://firebase.com

•

“The Realtime Application Platform”

•

database as service, commercial

•

clients: we...
Firebase raised $5,6M in 2013.
Is this possible to do
in open source?
Implementation choices
•

2013 Pyramid sprint
in Halle (a.k.a “Wasp
Base”)

•

Substance-D

•

syncing client data
with so...
Url mapping between
ubikDB and ZODB
•

both ZODB and ubikDB has traversal based url
mapping

•

/my_folder_1/my_document_1...
On the roadmap
•

reconnecting

•

optimised syncing of collections (use-case driven)

•

read-only (and writeable) databa...
Demo
https://github.com/reebalazs/ubikdb
ubikDB intro: Building a real-time distributed database for the browser
Upcoming SlideShare
Loading in …5
×

ubikDB intro: Building a real-time distributed database for the browser

427 views
280 views

Published on

Building a real-time distributed database for the browser. This presentation was held on a Python meetup in Budapest. I talked about the initial idea of ubikDB, what are my results so far, and how I plan to continue.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
427
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • beginning of a story, how did I start and what decisions I have taken
  • PKD 1928 - 1982. A scanner darkly, Blade Runner, Total Recall. (szarnyas fejv, emlekmas)
    Ubik is about shifting realities. (pronounce U-bik)
    universality: no more REST, … it encapsulates a very generic part
  • ubikDB is not really a DB :)
    Because I am thinking in connecting to web apps…
    Example: binding an input field to the title, 2 way binding all the way
  • commercial
  • is this possible - realistic - and worth to do?
  • We have no $$$ but we are smart.
    And there are simple use cases.
    Also: it can be actually improved! api is single purpose + more possibilities because we can run our own server
  • I’m not really implementing a DB, but more a syncing solution
    Substance-D: a framework for writing a Content Management Famework. It is based on Pyramid and has ZODB as batteries.
  • ubikDB intro: Building a real-time distributed database for the browser

    1. 1. ubikDB: an introduction Building a real time distributed database for the browser 2014-02-26, budapest_py Balázs Reé ree@greenfinity.hu @reebalazs Python, JavaScript web development with open source
    2. 2. Ubik is a book of Philip K. Dick. Ubik is an universal product. ! shared database = persistency + notifications syncing JSON data in the browser real-time, responsive applications
    3. 3. Data and event flow • it’s a sync solution • networking through http • • • ‘service’ could be a web application Database adapters Simplest: volatile mem storage Clients Server service JSON DB adapters mem MVC… … JSON MVC…
    4. 4. Firebase • http://firebase.com • “The Realtime Application Platform” • database as service, commercial • clients: web (JS), IOS / OS X, Java / Android • db management interface
    5. 5. Firebase raised $5,6M in 2013. Is this possible to do in open source?
    6. 6. Implementation choices • 2013 Pyramid sprint in Halle (a.k.a “Wasp Base”) • Substance-D • syncing client data with socket.io (via http) • server connects to database adapters to existing DB Clients Server web app JSON DB adapters mem ZODB http, socket.io Pyramid (Substance-D) gevent-socketio gunicorn JSON socket.io-client AngularJS
    7. 7. Url mapping between ubikDB and ZODB • both ZODB and ubikDB has traversal based url mapping • /my_folder_1/my_document_1 • /my_folder_1/my_document_1/@title • /my_folder_1/my_document_1/@body • /my_folder_1/my_document_1/@ • /my_folder_1/my_document_1/@/into/a/deep/structure
    8. 8. On the roadmap • reconnecting • optimised syncing of collections (use-case driven) • read-only (and writeable) database views • test coverage • more demos
    9. 9. Demo https://github.com/reebalazs/ubikdb

    ×