Codestrong 2012 breakout session building your own custom cloud services

  • View

  • Download

Embed Size (px)

Text of Codestrong 2012 breakout session building your own custom cloud services

  • 1.Node.ACSAppcelerator Custom Cloud Services Wei KongDirector of Engineering, Cloud ServicesAppcelerator

2. AppceleratorCloud Services (ACS)as Instant MobileBackend 3. The Good Easy to use Cross Platform (REST Api based) Predefined object models Custom Objects and Fields No Server Code Needed 4. Whats Missing Custom Code Web Hosting Support of Custom URLs Can have extra overhead with the network and battery consumption 5. Introducing CustomCloud Services(Node.ACS) 6. Node.js + ACS Complete Solution to yourMobile Backend JavaScript for both Clientand Server Fully Integrated with ACS JS 7. Node.js in a Nutshell Use JavaScript to writeWeb Servers Based on Googles V8 Engine Event-driven/None-blocking IO Lightweight and efficient More at 8. Why Node.js Performance and Scalability Easy to Integrate NetworkComponents JavaScript 9. Node.ACSArchitecture 10. ACS Network LayerACS 11. The Development FlowCreate a app Test Locally Publish to Node.ACS CloudUnpublishSet Custom Cname Ex. 12. Multiple Versionsyour app Device(v1) V1 Device(v2) V2 V3 Device(v3)Latest 13. Demo andSample Code 14. Web Server Sample web server to display your app data stored in ACS 15. Whats wrong?var user = {session:"",};api.login = function(req, res) { if(user.session === ""){ACS.Users.login({login: req.body.un,password:},function(e) {if(e.success && e.success === true){user.session = e.meta.session_id;}else{res.redirect(version+/index?msg=+e.message);} }, req, res); }else{res.redirect(version+/show); }} 16. WebsocketA group chat appbased on websocket 17. Group ChatServer Codewebsocket.message = function(data, socket) { socket.broadcast.emit(message, data);};Client Code// Received a messageiosocket.on(message, function(message) { // Display the message});// User types a message$(#outgoingChatMessage).keypress(function(event) {iosocket.emit(message, $(#outgoingChatMessage).val());} 18. Roadmap 19. Whats in Preview One free Node.js Worker/app 100M Free disk space/app Unlimited API calls 20. Coming Soon Background job workers Node.js Monitoring More 3rd party servicesintegrations Web Console Flexible free tier Auto sleep and reactivation 21. Wei Kong