cloud web applications: the new perspective of sproutcore

66
Bolzano - July 23, 2010 C LOUD WEB APPLICATIONS : THE NEW PERSPECTIVE OF S PROUT C ORE T HE DEVELOPMENT OF A PP A WARE A NALYTICS DAVID SAITTA Thesis Co-Supervisor: Prof. Paolo Ceravolo Thesis Supervisor: Prof. Ernesto Damiani

Upload: david-saitta

Post on 10-May-2015

2.035 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: Cloud web applications: the new perspective of sproutcore

Bolzano - July 23, 2010

Non-Invasive Personal Tracking

Andrea Girardello

Thesis supervisor: Prof. Giancarlo Succi

Bolzano, 24 July 2009

CLOUD WEB APPLICATIONS: THE NEW PERSPECTIVE OF SPROUTCORE

THE DEVELOPMENT OF APPAWARE ANALYTICS

DAVID SAITTA

Thesis Co-Supervisor:

Prof. Paolo Ceravolo

Thesis Supervisor:

Prof. Ernesto Damiani

Page 2: Cloud web applications: the new perspective of sproutcore

OVERVIEW

1. Cloud Web Applications

2. SproutCore

3. AppAware Analytics

Page 3: Cloud web applications: the new perspective of sproutcore

OVERVIEW

1. Cloud Web Applications

2. SproutCore

3. AppAware Analytics

Page 4: Cloud web applications: the new perspective of sproutcore

• Tendency to migrate from desktop applications to web applications on the Cloud;

• Software as a Service;

• Software developed using web technologies;

Migrate to the CloudCLOUD WEB APPLICATIONS

Page 5: Cloud web applications: the new perspective of sproutcore

• Tendency to migrate from desktop applications to web applications on the Cloud;

• Software as a Service;

• Software developed using web technologies;

Migrate to the CloudCLOUD WEB APPLICATIONS

Page 6: Cloud web applications: the new perspective of sproutcore

Cloud ComputingCLOUD WEB APPLICATIONS

2009 2010 20140

37,5

75

112,5

150

58,668,3

148,8

cloud services revenue (billions of $)

Gartner report “Forecast: Public Cloud Services, Worldwide and Regions, Industry Sectors, 2009-2014

↑+16.6%

↑+117.8%

Page 7: Cloud web applications: the new perspective of sproutcore

Cloud ComputingCLOUD WEB APPLICATIONS

2009 2010 20140

37,5

75

112,5

150

58,668,3

148,8

cloud services revenue (billions of $)

Gartner report “Forecast: Public Cloud Services, Worldwide and Regions, Industry Sectors, 2009-2014

↑+16.6%

↑+117.8%

Can web applications compete with desktop applications?

Page 8: Cloud web applications: the new perspective of sproutcore

Desktop vs Web ApplicationsCLOUD WEB APPLICATIONS

Desktop Application

Data BusinessLogic

Web Application

Data BusinessLogic

Page 9: Cloud web applications: the new perspective of sproutcore

Desktop vs Web ApplicationsCLOUD WEB APPLICATIONS

Desktop Application

Cloud Web Application

BusinessLogic

Web Application

Data

Page 10: Cloud web applications: the new perspective of sproutcore

Desktop vs Web ApplicationsCLOUD WEB APPLICATIONS

Desktop Application

Cloud Web ApplicationWeb Application

BusinessLogic

Data

Data BusinessLogic

Data BusinessLogic

Page 11: Cloud web applications: the new perspective of sproutcore

Main AspectsCLOUD WEB APPLICATIONS

• hybrid between traditional desktop applications and traditional web applications;

• Like desktop apps • rich user experience;• immediate response to user actions;• offline mode;

• Like web apps • universal / cross platform;• not installed on computer;• take advantage of the Cloud by storing all the data on it;• mobile access.

Page 12: Cloud web applications: the new perspective of sproutcore

Main AspectsCLOUD WEB APPLICATIONS

• hybrid between traditional desktop applications and traditional web applications;

• Like desktop apps • rich user experience;• immediate response to user actions;• offline mode;

• Like web apps • universal / cross platform;• not installed on computer;• take advantage of the Cloud by storing all the data on it;• mobile access.

Which tools? Which language? Which structure?

Page 13: Cloud web applications: the new perspective of sproutcore

OVERVIEW

1. Cloud Web Applications

2. SproutCore

3. AppAware Analytics

Page 14: Cloud web applications: the new perspective of sproutcore

• Its goal is to allow developers to create web applications

with advanced capabilities and user experiences

• moves business logic to the client;

• applications are full-fledged programs, written in JavaScript that is

executed in the browser;

• freeing up servers (and server engineers) to focus on

delivering data as quickly and reliably as possible.

In a nutshellSPROUTCORE

SproutCore is an HTML5 application framework for building responsive, desktop-like

apps in any modern web browser, without plugins.

Page 15: Cloud web applications: the new perspective of sproutcore

StructureSPROUTCORE

V

C

M

Browser

REST

Page 16: Cloud web applications: the new perspective of sproutcore

• jQuery and Prototype are utility libraries;

• SproutCore has more in common with Cocoa, .NET or Eclipse Rich Client Platform;

• The Display layer is based on jQuery DOM functionalities.

Isn’t it Ajax?SPROUTCORE

Page 17: Cloud web applications: the new perspective of sproutcore

• jQuery and Prototype are utility libraries;

• SproutCore has more in common with Cocoa, .NET or Eclipse Rich Client Platform;

• The Display layer is based on jQuery DOM functionalities.

Isn’t it Ajax?SPROUTCORE

Page 18: Cloud web applications: the new perspective of sproutcore

• Connection using REST interface;

• Server-agnostic;

• DataSource interface to be implemented

• fetch, retrieveRecord, createRecord, updateRecord, destroyRecord

Interaction with serversSPROUTCORE

REST

Browser

Page 19: Cloud web applications: the new perspective of sproutcore

• Connection using REST interface;

• Server-agnostic;

• DataSource interface to be implemented

• fetch, retrieveRecord, createRecord, updateRecord, destroyRecord

Interaction with serversSPROUTCORE

REST

Browser

Page 20: Cloud web applications: the new perspective of sproutcore

• Young Framework;• Development started in 2007;

• First stable release March 2010;• Investmens from Apple Inc.• Used to develop MobileMe

• Mature core and structure;

• Immature advanced views and documentations;

• Extensible using plugins and frameworks;• DSUI (http://github.com/d4v1d82/DSUI)

Mautre?SPROUTCORE

Page 21: Cloud web applications: the new perspective of sproutcore

OVERVIEW

1. Cloud Web Applications

2. SproutCore

3. AppAware Analytics

Page 22: Cloud web applications: the new perspective of sproutcore

AppAware ProjectAPPAWARE ANALYTICS

• Developed as a research project by Information Management group at the ETH Zürich

AppAware is a mobile application that tracksinstallations, updates, and removals

of Android programs

Page 23: Cloud web applications: the new perspective of sproutcore

AppAware ! AppAware AnalyticsAPPAWARE ANALYTICS

• poor statistics pages;

• from February 2010 collected more than 5 milions of events with about 60-70 thousand events for day.

Page 24: Cloud web applications: the new perspective of sproutcore

AppAware ! AppAware AnalyticsAPPAWARE ANALYTICS

• Prototype ! AppAware Analytics

• main requirements:

1. create a cloud web application;

2. allow users to easily interact with the system;

3. minimize the server-side computation (i.e. changing chart visualizations, user interactions, UI modifications, etc.);

4. minimize the bandwidth usage: the server provides only a collection of data information objects.

Page 25: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

Page 26: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

Page 27: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

Page 28: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

GET /apps.php

Page 29: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

JSON

[{id: 82, app_name: "Maps", package_name: "com.google.android.apps.maps", meter: 98, meter_img: "http://chart.apis.google.com/chart?chs=….", description: "Get the latest release of Google Maps. New features:n* Bicycling directions and map layer (US only)n* Navigation icon in app launchern* Share places by email, SMS, and morennAlso includes:n* Navigation (Beta)n* Search by voicen* My Locationn* Business listingsn* Directionsn* Trafficn* Street Viewn* Latituden* Google Buzz", icon: "http://AppAware.org/icons/com.google.android.apps.maps.png"
},{id: 199, app_name: "Market", ...

GET /apps.php

Page 30: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

3.select an app

load events of

current week

Page 31: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

3.select an app

load events of

current week

GET /events.php

Page 32: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

3.select an app

load events of

current week

{"events": [{ "id": 3369952, "event_type": "updated", "user_id": "2001459694d7346d", "twitter_id": null, "model": "HTC Hero", "sdk": 7, "latitude": "53.16871628", "longitude": "-1.11738948", "created": "2010-06-14 00:17:36" },{}]}

JSON

GET /events.php

Page 33: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

3.select an app

load events of

this week

4.navigate graphs

Page 34: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

3.select an app

load events of

this week

4.navigate graphs

Page 35: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

3.select an app

load events of

this week

4.navigate graphs

Page 36: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

3.select an app

load events of

this week

4.navigate graphs

Page 37: Cloud web applications: the new perspective of sproutcore

Development - Chart ViewsAPPAWARE ANALYTICS

Page 38: Cloud web applications: the new perspective of sproutcore

Development - Chart ViewsAPPAWARE ANALYTICS

Page 39: Cloud web applications: the new perspective of sproutcore

Development - Chart ViewsAPPAWARE ANALYTICS

Page 40: Cloud web applications: the new perspective of sproutcore

Development - Chart ViewsAPPAWARE ANALYTICS

Page 41: Cloud web applications: the new perspective of sproutcore

Development - Chart ViewsAPPAWARE ANALYTICS

Page 42: Cloud web applications: the new perspective of sproutcore

Development - Chart ViewsAPPAWARE ANALYTICS

Page 43: Cloud web applications: the new perspective of sproutcore

Development - Date SelectorAPPAWARE ANALYTICS

Page 44: Cloud web applications: the new perspective of sproutcore

ProblemsAPPAWARE ANALYTICS

• AppAware Analytics:

• too many events/model data!

• difficult mobile support (because of memory);

• no cache support on computed charts;

Objects

Response Size

Response Size (gzip)

Computation time

2010-7-1 / 2010-7-19

20 days

2010-4-1 / 2010-7-19

110 days

2,839 27,900

508.5KB 5MB

99.6KB (80.4%) ~1MB (80.5%)

1.8sec 25sec

Page 45: Cloud web applications: the new perspective of sproutcore

ProblemsAPPAWARE ANALYTICS

• SproutCore:

• bad documentation;

• poor examples;

• support only on newsgroup, blog, comments and IRC with developers;

• HTML5 standard still in draft

• Candidate Recommendation stage during 2012.

Page 46: Cloud web applications: the new perspective of sproutcore

ConclusionsAPPAWARE ANALYTICS

• Yes: user interaction is responsible as a desktop application;

• Yes: Advanced views;

• Yes: interaction with multiple servers;

• Yes/No: when exchanging big amount of data with the server the latency increase (but the same with desktop application);

Can web applications compete with desktop applications?

Page 47: Cloud web applications: the new perspective of sproutcore

ConclusionsAPPAWARE ANALYTICS

• Yes/No: HTML5 is not fully standardized;

• No: interaction with custom hardware;

Can web applications compete with desktop applications?

Page 48: Cloud web applications: the new perspective of sproutcore

Future WorksAPPAWARE ANALYTICS

• Increase client-server REST interface to reduce data and bandwidth usage;

• Offline support;

• Mobile Views;

• Touch Devices support;

• Advanced events filtering;

• Porting to SproutCore 1.1 as soon as released.

Page 49: Cloud web applications: the new perspective of sproutcore
Page 50: Cloud web applications: the new perspective of sproutcore

?speaker: David Saitta

Page 51: Cloud web applications: the new perspective of sproutcore
Page 52: Cloud web applications: the new perspective of sproutcore

Cloud ComputingCLOUD WEB APPLICATIONS

A style of Computing where scalable and elastic IT capabilities are provided as a service to multiple customers using Internet technologies.

Gartner

• Software as a Service;

• Software developed using web technologies;

Page 53: Cloud web applications: the new perspective of sproutcore

JavaScript EnginesEXTRA

WebKit 3.0

WebKit 3.1

SquirrelFish

SquirrelFish Extreme

0 20 40 60 80

63,6

29,9

18,8

5,4

The chart shows WebKit’s JavaScript performance in different versionsbigger bars are better

Page 54: Cloud web applications: the new perspective of sproutcore

Evolution of Web TechnologiesCLOUD WEB APPLICATIONS

Page 55: Cloud web applications: the new perspective of sproutcore

Evolution of Web TechnologiesCLOUD WEB APPLICATIONS

Static pagesof hyperlinks

HTML

1991

Page 56: Cloud web applications: the new perspective of sproutcore

Evolution of Web TechnologiesCLOUD WEB APPLICATIONS

Static pagesof hyperlinks

HTML CGI PHP ASP

HTML HTML HTML

Dynamicgenerated pages

1991 1993-1994

Page 57: Cloud web applications: the new perspective of sproutcore

Evolution of Web TechnologiesCLOUD WEB APPLICATIONS

Static pagesof hyperlinks

HTML CGI PHP ASP

HTML HTML HTML

Dynamicgenerated pages

Ruby on RailsJBoss

ASP.NET

HTML HTML HTML

Dynamic MVCgenerated pages

1991 1993-1994 2001

Page 58: Cloud web applications: the new perspective of sproutcore

Evolution of Web TechnologiesCLOUD WEB APPLICATIONS

Static pagesof hyperlinks

HTML CGI PHP ASP

HTML HTML HTML

Dynamicgenerated pages

Ruby on RailsJBoss

ASP.NET

HTML HTML HTML

Dynamic MVCgenerated pages

Dynamic/Static generated JavaScript

HTMLJavaScrip

1991 1993-1994 2001

Page 59: Cloud web applications: the new perspective of sproutcore

Evolution of Web TechnologiesCLOUD WEB APPLICATIONS

Static pagesof hyperlinks

HTML CGI PHP ASP

HTML HTML HTML

Dynamicgenerated pages

Ruby on RailsJBoss

ASP.NET

HTML HTML HTML

Dynamic MVCgenerated pages

Dynamic/Static generated JavaScript

HTMLJavaScrip

1991 1993-1994 2001

Page 60: Cloud web applications: the new perspective of sproutcore

Evolution of Web TechnologiesCLOUD WEB APPLICATIONS

Static pagesof hyperlinks

HTML CGI PHP ASP

HTML HTML HTML

Dynamicgenerated pages

Ruby on RailsJBoss

ASP.NET

HTML HTML HTML

Dynamic MVCgenerated pages

Dynamic/Static generated JavaScript

HTMLJavaScrip

Better Browser Support

HTML5/CSS3JavaScript EnginesW3C Standards

1991 1993-1994 2001

Page 61: Cloud web applications: the new perspective of sproutcore

• server-side REST interfaces

• caching system to handle thousands of single events;

• PHP based;

• JSON format;

• GZip compression;

Development - RESTAPPAWARE ANALYTICS

App

Date Range

Number of Events

Original Size

Gzipped Size

Data Savings

Google Maps

April, 18 2010 to

June, 18 2010

10,551

~2MB (1922.11 KB)

371.38 KB

80.68%

Page 62: Cloud web applications: the new perspective of sproutcore

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

3.select an app

load events of

this week

4.navigate graphs

5.select another

date range

Page 63: Cloud web applications: the new perspective of sproutcore

JSON

GET /events.php

Client-Server interactionAPPAWARE ANALYTICS

1.first access

2. load apps

3.select an app

load events of

this week

4.navigate graphs

5.select another

date range

Objects

Response Size

Response Size

(gzip)

Computation

time

2010-7-1 / 2010-7-19

20 days

2010-4-1 / 2010-7-19

110 days

2,839 27,900

508.5KB 5MB

99.6KB (80.4%) ~1MB (80.5%)

1.8sec 25sec

Page 64: Cloud web applications: the new perspective of sproutcore

Development - Google Map ViewsAPPAWARE ANALYTICS

Page 65: Cloud web applications: the new perspective of sproutcore

Development - Google Map ViewsAPPAWARE ANALYTICS

Page 66: Cloud web applications: the new perspective of sproutcore

• Full-stack MVC framework;

• Key-Value Coding (KVC);

• Key-Value Observing (KVO);

• Component Bindings;

StructureSPROUTCORE

REST

Browser

slider_valueController

22

update value

value updated