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