meteor ddp
TRANSCRIPT
Meteor/DDP
김경렬
Why the Future is not RESTful
http://z.caudate.me/why-the-future-is-not-restful/
• Open source platform for building Modern Web Apps.
• EJSON instead of HTML
• Run most of their code inside the browser.
• Single language.
• Reactivity, Pub/Sub, Latency Compensation
http://www.meteor.com/screencast
javascript code (client/server)
node.js / database (mongodb)
DDP(EJSON)
presentations(templates, binding)
install
• $ curl https://install.meteor.com | /bin/sh
• $ meteor create myapp
• $ cd myapp$ meteor=> Meteor server running on: http://localhost:3000/
• $ meteor deploy myapp.meteor.com
Document
• http://docs.meteor.com/ (english)http://docs-ko.meteor.com/ (번역)
Sample - LeaderBoard
DDP (Distributed Data Protocol)
• Remote procedure calls by the client to the server.
• The client subscribing to a set of documents, and the server keeping the client informed about the contents of those documents as they change over time.
https://github.com/meteor/meteor/blob/master/packages/livedata/DDP.md
SockJS / WebSocketsNative Socket
EJSON (msg type, other field)
EstablishingManaging Data
Remote Procedure Calls
Establishing
client server
connect
sessionversionsupport
Establishing
client server
connected
session
Establishing
client server
failed
version
Managing Data
client server
sub unsub
id(name
params)
C(R)UD
client server
addedchanged removedcollection
id (fields, cleared)
Ordered Collection C(R)UD
client server
addedBeforemovedBefore
collection id
fields, before
RPC
client server
method
methodparams
id
RPC
client server
result
id error result
RPC
client server
update
methods
The futures of RESTful
Data storage of the client
RealTime