Your SlideShare is downloading. ×
  • Like
Scaling down CouchDB - Meet TouchDB
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Scaling down CouchDB - Meet TouchDB

  • 1,443 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,443
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
8
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. TouchDB –scaling down CouchDB Stefan Baggström 20th Nov 2012
  • 2. Background• We are a research team ”Felix” in TUT/BME developing new ICT solutions in the area of health and wellness technology• We have built a system prototype with CouchDB technologies – to iterate the product concept rapidly – to pilot with potential customers 2
  • 3. Prototyping a wellnessapplication with CouchDB• Goals for prototype: – Can be used with any Internet devices – Good offline functionality• Being agile: – Data model evolves across increments• There is a schedule to meet: – Consider tech learning curves and development time 3
  • 4. System to be builtCustomer Wellness Professional 4
  • 5. CouchDB http://couchdb.apache.org/• CouchDB has some interesting features – JSON document storage – Distributed architecture – Eventual consistency – Bi-directional replication – Serving applications directly from database• Scaling up - see e.g. BigCouch 5
  • 6. CouchDB – scaling down• There is CouchDB port for iOS and Android (Couchbase Mobile), but the project is dead – Erlang implementation as in CouchDB – Issues: size (~4MB) and slow startup (5-10s) Source: http://www.funny-potato.com/ 6
  • 7. Meet TouchDB• TouchDB is a lightweight CouchDB-compatible database engine with similar REST API to CouchDB• Replicates with CouchDB• iOS and Android ports implemented with Objective-C / Java on top of SQLite• Native language access via CouchCocoa / Ektorp https://github.com/couchbaselabs/TouchDB-iOS/wiki 7
  • 8. Personal Wellness App –What is needed and what not?• Good enough performance for – Relatively small data sets (may have large attachments) – A few relatively simple data queries – Good functionality when offline or with intermittent connectivity• Support for multi-device-ownership – Use with any device that suits your task and context 20.11.2012 8
  • 9. Wellness Android app –Abstract architecture Application UI – HTML5 with JQuery Mobile WebView with Java-JavaScript IF TouchDB – http listener TouchDB - Application Core TouchDB library Ektorp Android – Android –Android – Java VM Android - SQLite MM APIs BT API 9
  • 10. Time for scaled down demo? 10
  • 11. How do we use TouchDB? (1/2)• All documents defined with ”type” property – Database schema emerging• Using Java Ektorp API for document CRUD• Using HTTP API for application resources and views – Implemented home brewn access control• Database provides changes feed – Used to trigger notifications and other actions 11
  • 12. How do we use TouchDB? (2/2)• Single responsive HTML5 application for desktops, tablets, and smart phones – CouchApp used for deployment to CouchDB• Initial replication in foreground during first time use, and then continuous replication in background• Data model evolves all the time 12
  • 13. TouchDB for wellness appPros Cons• Offline functionality • Immature at the moment – All transactions are always – iOS port just got v1.0 status, fast & predictable as they Android port is behind iOS are local transactions – Small development community• Replication • Fragile security – Data – HTTP API is accessible by – Applications other Android applications – Supports filtered replication within device - better control if• NoSQL is supports used only via Java/Ektorp incremental development • Lack of C/TouchDB• Meets performance professionals out there requirements of a personal database• JavaScript in server and clients 13