building document driven applications in node.js: couchbase connect 2014

46
Full-Stack JavaScript Philipp Fehre | Developer Advocate, Couchbase

Upload: couchbase

Post on 25-May-2015

380 views

Category:

Data & Analytics


1 download

DESCRIPTION

What’s different about this generation of web applications? The approach must consider the latency, throughput and interactivity demanded by users for social interaction across both mobile devices and browsers. We will show how Node.js’s programming model makes writing systems to provide this kind of interactivity easy and how Couchbase Server and the Node.js Couchbase SDK support this with a flexible data model. Come to this session ready to read code, since a sample game platform will be the basis of a demonstration of these techniques in action. We will show a sample game server, and key aspects of how the system is constructed for simplicity of data modeling, extensibility and scale.

TRANSCRIPT

  • 1. Full-Stack JavaScriptPhilipp Fehre | Developer Advocate, Couchbase

2. Game needsusersState needsto be savedWe deal withaggregates2014 Couchbase, Inc. 2 3. Building an API with Couchbase 4. Building an APIWhat do we need to consider? Responsiveness Efficiency Scalability2014 Couchbase, Inc. 4 5. How can we support thatSelecting the technologies by support for High concurrency Share nothing architecture Fun to use!2014 Couchbase, Inc. 5 6. Technologies2014 Couchbase, Inc. 6 7. My choicesI like JavaScript so how about using it everywhere? node.js Angular.js Couchbase2014 Couchbase, Inc. 7 8. node.jsIts not just this hip thing anymore! Major companies have adopted it! Great support for Event-Driven Model Share nothing by default V8 is a fast runtime2014 Couchbase, Inc. 8 9. Angular.jsBrings best programming practices and architecture to the browser Templates are enhanced HTML MVC in the browser Very convinient approach to data binding2014 Couchbase, Inc. 9 10. CouchbaseA database that fits node.js Store JSON JavaScript as the View Query language Designed to Scale2014 Couchbase, Inc. 10 11. Couchbase { } ql::phil => { questions: }Easy to fetch lazily what is needed.2014 Couchbase, Inc. 30 31. Saving questions2014 Couchbase, Inc. 31 32. Saving the questions2014 Couchbase, Inc. 32 33. Today access is like this2014 Couchbase, Inc. 33 34. CASActor 2CAS mismatch& retryActor 1SuccessCouchbase Server2014 Couchbase, Inc. 34 35. Getting the CAS2014 Couchbase, Inc. 35 36. Optimistic LockingCouchbase is fast so potential for conflicts is lowVery low overhead on the database2014 Couchbase, Inc. 36 37. The Frontend2014 Couchbase, Inc. 37 38. Angular.jsProvide views template data bindingsEncapsulate logic in Model-View-Whatever worksTemplates are based on enhanced HTML 39. Angular App2014 Couchbase, Inc. 39 40. Templates2014 Couchbase, Inc. 40 41. Displaying the answer countUsing views2014 Couchbase, Inc. 41 42. Views in 3.0Many improvements to View EngineViews data comes straight from memoryStale.false actually means no Stale Data! 43. 2014 Couchbase, Inc. 43 44. 2014 Couchbase, Inc. 44 45. Now go out and build stuff!Visit the communitiesCheck the Couchbase Blog for Tutorials like thisCheckout the newest SDK versions2014 Couchbase, Inc. 45 46. Thank you!Questions?2014 Couchbase, Inc. 46