41
MobiCloud Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages 1 Ajith H. Ranabahu , Amit Sheth, Ashwin Manjunatha, Krishnaprasad Thirunarayan The Ohio Center of Excellence in Knowledge-enabled Computing - Kno.e.sis Wright State University u, Amit Sheth, Ashwin Manjunatha, and Krishnaprasad Thirunarayan, d Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Lan Workshop on Mobile Computing and Clouds (MobiCloud 2010), Santa Clara, CA, October 28 s.org/library/resource.php?id= 865

MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Embed Size (px)

DESCRIPTION

Ajith Ranabahu, Amit Sheth, Ashwin Manjunatha, and Krishnaprasad Thirunarayan, 'Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages', International Workshop on Mobile Computing and Clouds (MobiCloud 2010), Santa Clara, CA,October 28, 2010.Paper: http://knoesis.org/library/resource.php?id=865Project: http://knoesis.wright.edu/research/srl/projects/mobi-cloud/

Citation preview

Page 1: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

MobiCloudTowards Cloud Mobile Hybrid Application

Generation using Semantically Enriched DomainSpecific Languages

1

Ajith H. Ranabahu , Amit Sheth, Ashwin Manjunatha, Krishnaprasad Thirunarayan

The Ohio Center of Excellence in Knowledge-enabled Computing - Kno.e.sisWright State University

Ajith Ranabahu, Amit Sheth, Ashwin Manjunatha, and Krishnaprasad Thirunarayan, 'Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages', International Workshop on Mobile Computing and Clouds (MobiCloud 2010), Santa Clara, CA, October 28, 2010http://knoesis.org/library/resource.php?id=865

Page 2: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Agenda• What are Cloud-Mobile hybrids ?– Why are they hard to build ?

• Building Cloud-Mobile hybrids with DSLs– Pros and cons– Current DSL and tooling

• Semantic Enhancements• Our vision– Cirrocumulus project and the role of MobiCloud

• Questions

2

Page 3: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

What are Cloud-Mobile Hybrids ?

3

Page 4: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

PortableUbiquitousConnected

ScalableOn-demandEconomical

Computing PowerPortability

Spectrum of Computing Power

4

Page 5: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Cloud-Mobile Hybrids (CMH) ?

• Applications that span over multiple devices– Back-end in Cloud – Front-end in a mobile device

• Both components needed for the app to function

• Front-end is not just a webpage !– A native iPhone / Android / Blackberry app

5

Page 6: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Simple Example

• The Facebook App– The Facebook client you have in your smart phone !• Mobile front-end for Facebook

– Most Facebook activity happens via Mobile devices !

• Many actions need extensive processing in the Facebook backend• Both parts (back-end and the front-end) required for

the complete experience

6

Page 7: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Another Research Oriented Example

• Privacy score1

– Introduced by IBM researchers – Measures relative exposure of private data on a social

network– Provides a similar number to “credit score”

• Requires heavy calculations in the back-end• Front-end is simply one number !– Perfect for a mobile device !

7

1. A Framework for Computing the Privacy Scores of Users in Online Social Networks, Kun Liu, Evimaria Terzi Ninth IEEE International Conference on Data Mining, 2009

Page 8: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Are CMH Apps hard to build ?

• Yes - very much !!• Clouds are heterogeneous– Write the back-end to suit Amazon – You can’t

move to Google !!• Same in mobile devices– Need to write different apps for different devices !• Android / iPhone / Blackberry are all different

8

Page 9: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Our solution to this Problem…

9

Page 10: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Use a DSL

• DSL ?– Domain Specific Language – A mini language for a special purpose• Make / Ant • Matlab• Many other examples

• Use a DSL to generate an application

10

Page 11: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

What changes by using a DSL ?

• DSLs are abstract– Reduced complexity

• No separation between front-end / back-end– No service interfaces to worry about (auto

generated)• Communication interfaces – a major source of errors

and incompatibilities

– Complexity reduced further

11

Page 12: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

What changes by using a DSL ? (Cont)

• Generators take care of multiple front-ends / back-ends– Generate apps for Amazon, Google, Android,

Blackberry using one script

12

Page 13: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

A birds-eye view of what we do

DSL Script

Compiler/Generator

Cloud Mobile Hybrid Application

13

Page 14: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Is this the silver bullet ?

• Nope !– Less control over the code• E.g. Extensive GUI customization and device integration

not possible

– Covers only the 80% case• E.g. Not suitable for games or other UI intensive

applications

14

Page 15: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Our current DSL

15

Page 16: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

DSL design principle

• Based on Model-View-Controller (MVC) design pattern

16

Model

View Controller

Page 17: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

A very simple “Hello World”

17

recipe :helloworld do metadata :id => 'helloworld-app' # models model :greeting, {:message => :string} #controllers controller :sayhello do action :retrieve,:greeting end # views view :show_greeting, {:models =>[:greeting], :controller => :sayhello, :action => :retrieve} end

Models

Controllers

Views

Metadata – details that need to be attached to the whole application

Linking the model using its unique name

Linking the controller using its unique name

Page 18: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Mapping of Hello World to Cloud and Mobile Spaces

Model

View Controller

Persistent Storage

UIRESTful Service Client

RESTful Service Implementation

Server side handler

Greeting Data Structures

Greeting Data Structure

Mobile Device Cloud

Page 19: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

A slightly complicated Example (task manger)

19

recipe(:todolist) do # specific metadata for this app metadata({:id => ‘todo-list'})

model(:todoitem, {:name=>:string, :description => :string,:time => :string, :location => :string}) model(:user, {:name=>:string, :bday => :string}) #controllers controller(:todohandler) do action :create,:todoitem action :retrieve,:todoitem action :update,:todoitem action :delete,:todoitem end # views view :todo_add, {:models >[:todoitem],:controller => :todohandler,:action => :create} view :todo_show, {:models =>[:todoitem],:controller => :todohandler,:action => :retrieve} end

Page 20: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Regular development vs DSL for CMH

Regular Development• Developed as two

applications• Different platforms need

new effort.• Significant effort in creating

code and other artifacts• Highly customizable

DSL based Development• Developed as a single

application• Generators create

functionally equivalent applications for multiple platforms

• Minimum effort in creating all required artifacts

• Limited customization

Page 21: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Other Benefits of DSL Based Development

• Convenient integration of other features– Location based services• Integration with available location sensors, e.g GPS

– Non functional features• Security

– Social Network features• Publish to Facebook, Twitter etc

Page 22: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Current MobiCloud Architecture

22

Blackberry Platform

Android Platform

GAE Platform

Amazon EC2

Platform

Generator 2(Blackberry)

Generator 1(Android)

Generator 3(GAE)

Generator 4(Amazon

EC2)

ParserDomain Specific Language (DSL)

Script

Web Based Graphical User Interface

Text Editor

Integrated Development

Environment (IDE) based Graphical User

Interface

Object Model

Page 23: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Current MobiCloud Wizard Interface

Step 1 : Write your code

Step 2 : Select the targets

Step 3 : Download the code

The downloadedcode can be compiled to create an executable application using relevantdevelopment kit

Page 24: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

MobiCloud Tools

• Web based Editor Available at http://knoesis.org/mobicloud– Free to use

• Plans to make the code available as opensource soon !

• More details in our technical report and CloudCom papers (to be published, seeL http://knoesis.org/library)

24

Page 25: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Switching Gears : The Modeling Space and the Role of Semantics

Page 26: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

The edge in Semantics

• Semantic models are capable of providing generic abstractions over data, functional, non-functional and system aspects

• Referring to these models rather than re-implementing code, significantly reduces the development effort

Page 27: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Four Types of Semantics for an Application

• Inspired by the four types of Semantics for Services1,2

• Enables a clear separation of issues

1. “Semantic Web Process Lifecycle: Role of Semantics in Annotation, Discovery, Composition and Orchestration,” Amit Sheth Workshop on E-Services and the Semantic Web (ESSW'03), 12th International World Wide Web Conference,

Budapest, Hungary, May 20, 2003.2. “METEOR-S Web service Annotation Framework’”, Abhijit Patil, Swapna Oundhakar,Amit Sheth, and Kunal Verma, in

proceedings, 13th International Conference on World Wide Web (WWW 2004), New York, NY, 2004.

Typically in both server and client representing Data structures. Described In Models

Typically defines controller logic and resides in the server side. Included in both the controller and the view

Usually aspects that are layered

such as security. May be

associated with controllers as

well as metadata

Associated with the

application, typically via

the metadata tags

Page 28: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Partitioning of the Modeling space

Current MobiCloud DSLPlanned

coverage of MobiCloud

Page 29: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Where can Semantics Help ?

• Reusable Data Definitions– RDF based Platform-neutral data definitions– Reference from the app rather than redefine• E.g. Use FOAF definition for person

model: person , {:ref => “foaf:Person”}

Page 30: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Where can Semantics Help ? (Cont)

• Non-functional Capabilities– Attach non-functional configurations (e.g.

Security) via profiles– Define abstract profiles using semantics• The generator can insert the necessary code• May need global (application-wide) configurations

– declared in the metadata section to be applicable to the whole application

– E.g. Strength of encryption for security

Page 31: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Where can Semantics Help ? (Cont)

• System Configurations– Define abstract deployment / Management

configurations using semantics– Already available in Elastras Language suite• ECML, EDML, EMML

– RDF based modeling of core system aspects

Page 32: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

DSL with Semantics

Page 33: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Our Vision and the Role of MobiCloud

Page 34: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

The Cirrocumulus Project

• End-to-End coverage for Cloud application development– Develop, deploy and manage Cloud applications without

depending on specificities of any Cloud

• Use DSLs and Middleware together– Inspired by IBM Altocumulus and IBM Sharable code

projects– Use semantics as a core binding across all stages

Page 35: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

MobiCloud fits in here

The Cirrocumulus Project

Page 36: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Comparison with Other Commercial Efforts

Libcloud (http://incubator.apache.org/libcloud/)

• Developer centric program abstraction over Infrastructure cloud operations

• Support in only Python and Java

Deltacloudhttp://deltacloud.org/

• Developer centric service abstraction over Infrastructure cloud operations

Cirrocumulus / MobiCloud

• Developer centric abstraction over applications and cloud operations

• Supports IaaS as well as PaaS Clouds

• Code can be generated in any language

Page 37: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

The Cirrocumulus Project (Cont)

LibCloud / DeltaCloud can be used in building this

component

Page 38: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

References / More details

• Technical report on MobiCloud– http://knoesis.wright.edu/library/publications/Mo

biCloud.pdf• Publicly hosted MobiCloud tool– http://knoesis.org/mobicloud

• Code repository– Coming soon !

• Privacy score paper– http://portal.acm.org/citation.cfm?id=1674659.1

67707538

Page 39: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Researchers

39

Ajith Ranabahu

AmitSheth

Ashwin Manjunatha

KrishnaprasadThirunarayan

Page 40: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Time for Questions ?

More at http://knoesis.org http://knoesis.wright.edu/research/srl/projects/mobi-cloud

/ The Ohio Center of Excellence in Knowledge-enabled Computing -

Kno.e.sis

40

Page 41: MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages

Thank you

41