Download - Open Source Mobile Backend on Cassandra
![Page 1: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/1.jpg)
Usergrid
Open Source Mobile Backend on Cassandra
![Page 2: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/2.jpg)
Hi I’mEd Anuff
![Page 3: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/3.jpg)
API ManagementAPI AnalyticsAPI Tools
![Page 4: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/4.jpg)
Usergrid
Backend-as-a-Service& Open Source
Mobile andRich client apps
![Page 5: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/5.jpg)
App, Cloud, & HTTP
![Page 6: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/6.jpg)
No Web Stack
Page
MVC Logic
Database
![Page 7: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/7.jpg)
Just Apps and APIs
User Management! Datastore!
Location!
Messaging!
Social Graph!
Analytics!
Activity Streams!
![Page 8: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/8.jpg)
Key Capabilities
A platform not a single appFlexible data modelEasy to use from any language
![Page 9: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/9.jpg)
Why should Cassandra developers care about Usergrid?
![Page 10: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/10.jpg)
Open Source (APLv2)Built on HectorMulti-tenant (Virtual Keyspaces)JSON and full-text indexingRich permissions modelREST API
![Page 11: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/11.jpg)
Multi-tenant data for Apps
![Page 12: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/12.jpg)
Lots of Teams...
Team Team Team
![Page 13: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/13.jpg)
Lots of Apps...
Team
App App App
![Page 14: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/14.jpg)
And App Users...
Team
App
![Page 15: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/15.jpg)
And data and devices
Team
App
![Page 16: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/16.jpg)
App
Team Team Team
App App App App App
Multi-tenancy at scale
![Page 17: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/17.jpg)
- Scalability+ Isolation+ Simple
+ Scalability- No Isolation- Complicated
- Scalability+ Isolation
+ Not Complicated
- Scalability- No Isolation- Complicated
Separate Database Shared DatabaseSe
para
teSc
hem
aSh
ared
Sche
ma
![Page 18: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/18.jpg)
CREATE DATABASE
ALTER TABLE
![Page 19: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/19.jpg)
Sharding SQL is too much work.
Oracle is too much money.
![Page 20: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/20.jpg)
What about NoSQL?
Most NoSQL works at the wrong abstraction level.
![Page 21: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/21.jpg)
Does Cassandra provide any more options?
Sort of
![Page 22: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/22.jpg)
Expensive Interesting
Very Expensive Unwieldy
Separate Keyspace Shared KeyspaceSe
para
teSc
hem
aSh
ared
Sche
ma
![Page 23: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/23.jpg)
How would Shared Schema/Shared Keyspace work?
![Page 24: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/24.jpg)
Users = { "4e3c0423-…" : { username: "edanuff", email: "[email protected]", … : … }, "e5d61f2b-…" : { username: "jdoe", email: "[email protected]", … : … }}
![Page 25: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/25.jpg)
Users = { "4e3c0423-…" : { username: "edanuff", email: "[email protected]", … : … }, "e5d61f2b-…" : { username: "jdoe", email: "[email protected]", … : … }}
![Page 26: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/26.jpg)
Conventional Row Keys In Single Keyspace
Row UUID
Row UUID
Row UUID
Row UUID
Row UUID
Row UUID
![Page 27: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/27.jpg)
Tenant ID Row UUID
Multi-tenant Row Keys In Shared Keyspace
Tenant ID Row UUID
Tenant ID Row UUID
Tenant ID Row UUID
Tenant ID Row UUID
Tenant ID Row UUID
![Page 28: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/28.jpg)
“Wonderful, more things for me to build myself in the app tier...”
Hold that thought...
![Page 29: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/29.jpg)
Shared Schema/Shared Keyspace is “Virtual Keyspaces”
Part of Hector Client
![Page 30: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/30.jpg)
public static <E> KeyspacecreateVirtualKeyspace(String keyspace,E keyPrefix,Serializer<E> kps,Cluster cluster);
![Page 31: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/31.jpg)
Hector hides the Tenant Prefixes
Hector Cassandra
Prepend Tenant UUID
Remove Tenant UUID
![Page 32: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/32.jpg)
What about indexes?
Hector doesn’t filter resultsDon’t add a tenant columnApp-tier CF indexes preferable
![Page 33: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/33.jpg)
What about CQL?See previous slide for index limitationsHector doesn’t currently support Virtual Keyspaces via CQLI don’t actually ever use CQL
![Page 34: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/34.jpg)
So what else is in there?
![Page 35: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/35.jpg)
JSON
Full JSON values, fully indexed, using Jackson and stuff from Lucene
![Page 36: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/36.jpg)
Permissions
Fine grained, per user, built on Shiro
![Page 37: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/37.jpg)
REST
Full REST API, built on Jersey
![Page 38: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/38.jpg)
Anything else?
![Page 39: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/39.jpg)
Mongo Compatible API
Experimental Mongo API emulation via Netty
Mongo binary wire protocol compatible
![Page 40: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/40.jpg)
That’s whatUsergrid is.
![Page 41: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/41.jpg)
Use the ideasUse the codeUse the cloud
![Page 42: Open Source Mobile Backend on Cassandra](https://reader033.vdocuments.us/reader033/viewer/2022052618/554fa1bcb4c9057b298b494d/html5/thumbnails/42.jpg)
usergrid.comgit.io/usergrid
Thanks!