appscale @ la.rb

29
The AppScale Project Presented by Chris Bunch (on behalf of the AppScale team) April 14, 2011 @ LA.rb

Upload: chris-bunch

Post on 10-Nov-2014

1.333 views

Category:

Technology


1 download

DESCRIPTION

These are my slides from my talk at LA.rb, covering research at UCSB on the AppScale project. This is a condensed version of the talk I gave at SBonRails - see that talk for about twice as much material on these topics.

TRANSCRIPT

Page 1: AppScale @ LA.rb

The AppScale ProjectPresented by Chris Bunch

(on behalf of the AppScale team)April 14, 2011 @ LA.rb

Page 2: AppScale @ LA.rb
Page 3: AppScale @ LA.rb

Overview

• Google App Engine

• AppScale - now with 50% Ruby!

• Neptune - A Ruby DSL for the cloud

Page 4: AppScale @ LA.rb

Google App Engine

• A web framework introduced in 2008

• Python and Java supported

• Offers a Platform-as-a-Service: Use Google’s APIs to achieve scale

• Upload your app to Google

Page 5: AppScale @ LA.rb

Quotas

Page 6: AppScale @ LA.rb

Data Model

• Not relational - semi-structured schema

• Compared to models in Rails

• Exposes a get / put / delete / query interface

Page 7: AppScale @ LA.rb

Storing Data

• Datastore API - Persistent storage

• Memcache API - Transient storage

• User can set expiration times

• Blobstore API - Store large files

• need to enable billing to use it

Page 8: AppScale @ LA.rb

Be Social!

• Mail API - Send and receive e-mail

• XMPP API - Send and receive IMs

• Channel API - Creating persistent connections via XMPP

• Use for chat rooms, games, etc.

Page 9: AppScale @ LA.rb

Background Tasks

• Cron API - Access a URL periodically

• Descriptive language: “every 5 minutes”, “every 1st Sun of Jan, Mar, Dec”, etc.

• Uses a separate cron.yaml file

• TaskQueue API - Within your app, fire off tasks to be done later

Page 10: AppScale @ LA.rb

Dealing with Users

• Users API: Uses Google Accounts

• Don’t write that ‘forgot password’ page ever again!

• Authorization: via app.yaml:

• anyone, must login, or admin only

Page 11: AppScale @ LA.rb

When Services Fail

• Originally: failures throw exceptions

• Just catch them all!

• Capabilities API: Check if a service is available

• Datastore, Memcache, and so on

Page 12: AppScale @ LA.rb

Deploying Your App

• Develop locally on SDK

• Stub implementations of most APIs

• Then deploy to Google

Page 13: AppScale @ LA.rb

How to Scale

• Limitations on the programming model:

• No filesystem interaction

• 30 second limit per web request

• Language libraries must be on whitelist

• Sandboxed execution

Page 14: AppScale @ LA.rb

Enter AppScale

• App Engine is easy to use

• but we really want to tinker with the internals!

• Need an open platform to experiment on

• test API implementations

• add new APIs

Page 15: AppScale @ LA.rb

Enter AppScale

• Lots of NoSQL DBs out there

• Hard to compare DBs

• Configuration and deployment can be complex

• Need one-button deployment

Page 16: AppScale @ LA.rb

Deploying Your App

• run-instances: Start AppScale

• describe-instances: View cloud metadata

• upload-app: Deploy an App Engine app

• remove-app: Un-deploy an App Engine app

• terminate-instances: Stop AppScale

Page 17: AppScale @ LA.rb

Deployment Models

• Cloud deployment: Amazon EC2 or Eucalyptus (the open source implementation of the EC2 APIs)

• Just specify how many machines you need

• Non-cloud deployment via Xen or KVM

Page 18: AppScale @ LA.rb
Page 19: AppScale @ LA.rb

AppController

• The brains of the outfit

• Runs on every node

• Handles configuration and deployment of all services (including other AppControllers)

• Written in Ruby

Page 20: AppScale @ LA.rb

Load balancer

• Routes users to their app via nginx

• haproxy makes sure app servers are live

• Can’t assume the user has DNS:

• Thus we wrote the AppLoadBalancer

• Rails app that routes users to apps

• Performs authentication as well

Page 21: AppScale @ LA.rb
Page 22: AppScale @ LA.rb

App Server

• We modified the App Engine SDK

• Easier for Python (source included)

• Harder for Java (had to decompile)

• Removed non-scalable API implementations

• Goal: Use open source whenever possible

Page 23: AppScale @ LA.rb

A Common Feature Request

Page 24: AppScale @ LA.rb

Database Options

• Open source / open APIs / proprietary

• Master / slave v. peer-to-peer

• Differences in query languages

• Data model (key/val, semi-structured)

• In-memory or persistent

• Data consistency model

• Interfaces - REST / Thrift / libraries

Page 25: AppScale @ LA.rb

Neptune

• Need a simple way to run compute-intensive jobs

• We have the code from the ‘net

• We have the resources - the cloud

• But the average user does not have the know how

• Our solution: create a domain specific language for configuring cloud apps

• Based on Ruby

Page 26: AppScale @ LA.rb

Syntax

• It’s as easy as:

neptune :type => “mpi”,

:code => “MpiNQueens”,

:nodes_to_use => 8,

:output => “/mpi/output-1.txt”

Page 27: AppScale @ LA.rb

Neptune Supports:

• Message Passing Interface (MPI)

• MapReduce

• Unified Parallel C (UPC)

• X10

• Erlang

Page 28: AppScale @ LA.rb

Extensibility

• Experts can add support for other computational jobs

• Biochemists can run simulations via DFSP and dwSSA

• Embarassingly parallel Monte Carlo simulations

Page 29: AppScale @ LA.rb

Wrapping It Up

• Thanks to the AppScale team, especially:

• Co-lead Navraj Chohan and advisor Chandra Krintz

• Check us out on the web:

• http://appscale.cs.ucsb.edu

• http://neptune-lang.org