6. import Parse from ‘parse’
const talk = new Parse.Object(‘Talk’)
await talk.set({
presenter: ‘@flovilmart’,
title: ‘Parse, Scale to Millions’
}).save()
DF*K is Parse?
in JS?
7. $ npm install -g mongodb-runner # not required
$ sh <(curl -fsSL http://get.parseplatform.org) # bootstrap script
$ mongodb-runner —start && npm start # start the server
Prototyping with Parse
8. $ npm init && npm install —save parse-dashboard
$ vi config.json
$ vi package.json
$ npm start
Setting up the dashboard
15. Under the curtain
Life of req
auth
HTTP
req + body
parsing
Cloud Code
Functions + Jobs
Files
Controller
Files
Adapter
Objects
API
Push Controller
Push
Queue
Database Controller
Push
API
Files
API
Cloud
API
Database
Adapter
16. Under the curtain
Objects API
Database
Controller
RestWrite RestQuery
Database
Adapter
Cloud Code Hooks + Live QueryAuth Adapters
Cache
Ctrl.
Cache
Adapter
17. •
•
•
•
Scaling Objects API
it’s all about the DB
{ '$or':
[ { global: '<val>', _rperm: {"$in":["<vals>"]} },
{ location: {"$box":[["<val>"]]}}, _rperm: {"$in":["<vals>"]} } ] }
29. Scaling Live Query
Lifecycle of LiveQueries
Parse Server
Publisher
Live Query Server
Subscriber
Live Query
WebSocket Server Client
Event
Event
Subscribe
SubscribeObject
Created
Object
Created
new Parse.Object(«MyObject«)
.save()
31. Scaling Live Query
WebSockets don’t scale
Live Query Server
Subscriber
Client
Live Query Server
Subscriber
Client
Event
Subscribe
Client
Client
Parse Server
Publisher Object
Created
Parse Server
Publisher
PubSub
(Redis,
GCPS…)