HTML5 Italy: Back end ecosystems for your applications - Cesare Rocchi + Claudio Tesoriero
-
Upload
marcocasario -
Category
Technology
-
view
457 -
download
1
description
Transcript of HTML5 Italy: Back end ecosystems for your applications - Cesare Rocchi + Claudio Tesoriero
Cesare Rocchi
Back-end ecosystems for your applications
@baasbox
Claudio Tesoriero
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Needs when choosing a backend
• Features
• Overview of different approaches
Outline
Monday, February 25, 13
SWIPE CONFERENCE 2012
Who am I?
Monday, February 25, 13
SWIPE CONFERENCE 2012
UX designer and developer
Monday, February 25, 13
SWIPE CONFERENCE 2012
Who are you?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Quick version
Monday, February 25, 13
SWIPE CONFERENCE 2012
It’s complicated
Monday, February 25, 13
SWIPE CONFERENCE 2012
Thank you!
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Not apps where mobile is “just a view”
• Apps which are inherently mobile
• From web to app
• App needs a back-end
App Target
Monday, February 25, 13
SWIPE CONFERENCE 2012
Examples
Monday, February 25, 13
SWIPE CONFERENCE 2012
dayoneapp.com
Monday, February 25, 13
SWIPE CONFERENCE 2012
culturedcode.com/things
Monday, February 25, 13
SWIPE CONFERENCE 2012
Questions
Monday, February 25, 13
SWIPE CONFERENCE 2012
Have I to manage it?
Monday, February 25, 13
SWIPE CONFERENCE 2012
• At which level?
• Am I able to do it?
• Have I time to learn?
• Is it worth it?
Have I to manage it?
Monday, February 25, 13
SWIPE CONFERENCE 2012
What’s the synch model?
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Does it match my goals?
• Can I change it if needed?
•What about protocols?
What’s the synch model?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Have I to pay?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Have I to pay?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Who is to pay?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Impact on UX?
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Does it break any flow?
• How frequently?
• is it “ok” with that?
Impact on UX?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Lock-in?
Monday, February 25, 13
SWIPE CONFERENCE 2012
• How to migrate data?
• Switching cost?
• Effort
• Code front-end
• Data compatibility
• Cash
Lock-in?
Monday, February 25, 13
SWIPE CONFERENCE 2012
• iCloud
• Dropbox
• Custom
• Back-end as a Service (BaaS)
Options
Monday, February 25, 13
SWIPE CONFERENCE 2012
What is iCloud?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Stores and synchs stuff
Monday, February 25, 13
SWIPE CONFERENCE 2012
It just works ...
Monday, February 25, 13
SWIPE CONFERENCE 2012
... when it works.
Monday, February 25, 13
SWIPE CONFERENCE 2012
Monday, February 25, 13
SWIPE CONFERENCE 2012
Monday, February 25, 13
SWIPE CONFERENCE 2012
Monday, February 25, 13
SWIPE CONFERENCE 2012
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Have I to manage it?
•What’s the synch model?
•Who’s to pay?
• Impact on UX?
• Lock-in?
Questions
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Learn the API
• Apple takes care of
• installation
• scalability
Have I to manage it?
Monday, February 25, 13
SWIPE CONFERENCE 2012
What’s the synch model?
Monday, February 25, 13
SWIPE CONFERENCE 2012
•Monitors changes
•Works on metadata
• Shreds files
• Supports conflict resolution
Daemon
Monday, February 25, 13
SWIPE CONFERENCE 2012
Special folder, synched
Monday, February 25, 13
SWIPE CONFERENCE 2012
Synched when “appropriate”
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Key-value
• Documents
• CoreData
Types of Information
Monday, February 25, 13
SWIPE CONFERENCE 2012
• The final user
• Your app will use his quota
• 5Gb for free
Who’s to pay?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Impact on UX?
Monday, February 25, 13
SWIPE CONFERENCE 2012
• User expectation
• No control on upload
• “Why isn’t there?”
• Open the app to synch
• User turns off iCloud?
Impact on UX?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Lock-in• Huge
• Only on iOS
• No way to migrate
Monday, February 25, 13
SWIPE CONFERENCE 2012
Dropbox
Monday, February 25, 13
SWIPE CONFERENCE 2012
• File-based
• Special folder
• Synchronized across devices
• Supports other platforms
Dropbox
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Already set up
• installation
• bandwidth
• scalability
Have I to manage it?
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Desktop synchronizes continuously
•Mobile apps have to query the backend
• HTTP API
• SDKs for iOS, Android, Ruby, Python
What’s the synch model?
Monday, February 25, 13
SWIPE CONFERENCE 2012
• No conflict resolution (revision #)
• Data serialization is up to you
• No file shredding
What’s the synch model?
Monday, February 25, 13
SWIPE CONFERENCE 2012
• The final user
• Your app will use his disk quota
• 2 Gb for free
Who’s to pay?
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Authentication the first time
• User might modify files
• Control on the upload
Impact on UX?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Lock-in• None
• Each user owns his data
• Personal/team usage
• ... but nothing more
Monday, February 25, 13
SWIPE CONFERENCE 2012
• box.net
• sugarsync.com
• google drive
• amazon S3
Similar
Monday, February 25, 13
SWIPE CONFERENCE 2012
Custom
Monday, February 25, 13
SWIPE CONFERENCE 2012
Monday, February 25, 13
SWIPE CONFERENCE 2012
IaaS PaaS SaaS
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Data
• Application
IaaS PaaS SaaS• Data
• Application
• Runtime
•Middleware
• OS
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Data
• Application
IaaS PaaS SaaS• Data
• Application
• Runtime
•Middleware
• OS
AWS, Rackspace, ... Heroku, Appfog, ... Baasbox
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Data
• Application
• Data
• Application
• Runtime
•Middleware
• OS
IaaS PaaS
AWS, Rackspace, ... Heroku, Appfog, ...
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Data
• Application
PaaS
Monday, February 25, 13
SWIPE CONFERENCE 2012
•Which language?
•Which DB?
PaaS Questions
Monday, February 25, 13
SWIPE CONFERENCE 2012
Heroku
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Ruby
• Python
• Java
• Scala
• Closure
• Node.js
Languages
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Postgres
•MySQL (via addon)
•MongoDB (via addon)
DBs
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Essentially a process
•Web
•Worker
• # of dynos + db profile + addons = backend cost
Dyno
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Data
• Application
IaaS PaaS• OS
•Middleware
• Runtime
• Data
• Application
Monday, February 25, 13
SWIPE CONFERENCE 2012
• OS
•Middleware
• Runtime
• Data
• Application
IaaS
Monday, February 25, 13
SWIPE CONFERENCE 2012
•Which OS?
•Which language?
•Which DB?
• How many machines?
Questions
Monday, February 25, 13
SWIPE CONFERENCE 2012
Amazon Web Services
Monday, February 25, 13
SWIPE CONFERENCE 2012
• CDN
• Storage
• Networking
• DBs
• Services: email, queue managers
• Con: cost estimation
Amazon Web Services
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Buy a server
• pick the hardware
• install OS
• rent space/bandwidth in a farm
Good old way
Monday, February 25, 13
SWIPE CONFERENCE 2012
Server side frameworks
Monday, February 25, 13
SWIPE CONFERENCE 2012
• http://rubyonrails.org
• http://www.sinatrarb.com
• http://www.padrinorb.com
Ruby
Monday, February 25, 13
SWIPE CONFERENCE 2012
• https://www.djangoproject.com
• http://www.pylonsproject.org
• http://flask.pocoo.org
Python
Monday, February 25, 13
SWIPE CONFERENCE 2012
• http://expressjs.com
• http://geddyjs.org
• http://flatironjs.org
• http://railwayjs.com
• http://towerjs.org
Node.js
Monday, February 25, 13
SWIPE CONFERENCE 2012
• ActiveRecord
• DataMapper
• Sequel
• SQLAlchemy
ORM
Monday, February 25, 13
SWIPE CONFERENCE 2012
BaaS
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Backend for mobile apps
• Files, key-value
• API SDK
• Push notifications
Baas
Monday, February 25, 13
SWIPE CONFERENCE 2012
• User management
• account creation/verification
• Login with Twitter/Facebook
• ACL
Baas
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Time to market
• Focus on the front-end
Baas
Monday, February 25, 13
SWIPE CONFERENCE 2012
• cloudmine.me
• stackmob.com
• kinvey.com
• parse.com
• buddy.com
• sencha.io
Services
Monday, February 25, 13
SWIPE CONFERENCE 2012
Blood pact
Monday, February 25, 13
SWIPE CONFERENCE 2012
Claudio Tesoriero
Monday, February 25, 13
SWIPE CONFERENCE 2012
• No application server
• No database server
• JVM only requirement
• Runs everywhere
BaasBox
Monday, February 25, 13
SWIPE CONFERENCE 2012
• User management
• ACL
• Assets
• Collections
BaasBox
Monday, February 25, 13
SWIPE CONFERENCE 2012
• Download
•./start
BaasBox
Monday, February 25, 13
SWIPE CONFERENCE 2012
BaasBox on OpenShift
rhc app create pizzabox diy-0.1cd pizzaboxtar xvfz baasbox-openshift-xx.tar.gzgit add .git commit -m "init"git push
Monday, February 25, 13
SWIPE CONFERENCE 2012
BaasBox on CentOS
yum install java-1.7.0-openjdk
scp baasbox-xx.tar.gz user@host:remotepath
cd remotepath
./start
Monday, February 25, 13
SWIPE CONFERENCE 2012
PizzaBox
BaasBox
Pizzaiolo Clienti
Dev
Monday, February 25, 13
SWIPE CONFERENCE 2012
BaasBox Console
Monday, February 25, 13
SWIPE CONFERENCE 2012
BaasBox Web app
Monday, February 25, 13
SWIPE CONFERENCE 2012
BaasBox iPhone app
Monday, February 25, 13
SWIPE CONFERENCE 2012
Asset
curl --form [email protected] --form name=margherita --user admin:admin -H X-BAASBOX-APPCODE:1234567890 http://localhost:9000/admin/asset
Monday, February 25, 13
SWIPE CONFERENCE 2012
Menu
curl -d "name=menu&meta=[ { \"name\": \"Margherita\", \"id\" : \"margherita\", \"price\": 5, \"ingredients\": \"Pizza con pomodoro e mozzarella\" }, ... ]" --user admin:admin -H X-BAASBOX-APPCODE:1234567890 http://localhost:9000/admin/asset
Monday, February 25, 13
SWIPE CONFERENCE 2012
Orders
curl -d "" -H X-BAASBOX-APPCODE:1234567890 --user admin:admin http://localhost:9000/admin/collection/orders
Monday, February 25, 13
SWIPE CONFERENCE 2012
Create ordercurl -d "{ \"list\": {\"margherita\": 2,\"quattrostagioni\": 2}, \"user\": { \"name\": \"Cesare\", \"surname\": \"Rocchi\", \"address\": \"Via delle vie 12, Roma\", ... }, \"time\": \"2013-01-02Z14:21\", \"total\": 12.5, }"
-H X-BAASBOX-APPCODE:1234567890 --user cesare:cesare http://localhost:9000/document/orders
Monday, February 25, 13
SWIPE CONFERENCE 2012
Demo
Monday, February 25, 13
SWIPE CONFERENCE 2012
Migration
Monday, February 25, 13
SWIPE CONFERENCE 2012
Now we are working on• Push Notification
• SDK (iOS, Android, JS)
• 3rd party authentication
• Business analytics
Monday, February 25, 13
SWIPE CONFERENCE 2012
Federico PacilliCEO BaasBox
Monday, February 25, 13
SWIPE CONFERENCE 2012
How can we help each other?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Video Tutorials
Monday, February 25, 13
SWIPE CONFERENCE 2012
How can YOU
make money?
Monday, February 25, 13
SWIPE CONFERENCE 2012
Marketplace
Monday, February 25, 13
SWIPE CONFERENCE 2012
PizzaBox
BaasBox
Pizzaiolo Clienti
Dev
Monday, February 25, 13
SWIPE CONFERENCE 2012
Marketplace• Referral program (30%)
• 35% if non-exclusive
• 50%-70% if selling exclusive
Monday, February 25, 13
SWIPE CONFERENCE 2012
We have 3 ideas
Monday, February 25, 13
SWIPE CONFERENCE 2012
We provide back-end support
Monday, February 25, 13
SWIPE CONFERENCE 2012
70% for the first year(+ 30% referral)
Monday, February 25, 13
SWIPE CONFERENCE 2012
1000€ upfront
Monday, February 25, 13
SWIPE CONFERENCE 2012
Contacts• http://www.baasbox.com
• twitter.com/baasbox
• facebook.com/baasbox
• github.com/baasbox
Monday, February 25, 13
SWIPE CONFERENCE 2012
Monday, February 25, 13
SWIPE CONFERENCE 2012
youtube.com/user/LiveSeeweb
Lunedi 25 alle 18.30
Monday, February 25, 13