Upload
amit-sheth
View
1.532
Download
1
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
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
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
What are Cloud-Mobile Hybrids ?
3
PortableUbiquitousConnected
ScalableOn-demandEconomical
Computing PowerPortability
Spectrum of Computing Power
4
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
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
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
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
Our solution to this Problem…
9
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
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
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
A birds-eye view of what we do
DSL Script
Compiler/Generator
Cloud Mobile Hybrid Application
13
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
Our current DSL
15
DSL design principle
• Based on Model-View-Controller (MVC) design pattern
16
Model
View Controller
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
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
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
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
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
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
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
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
Switching Gears : The Modeling Space and the Role of Semantics
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
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
Partitioning of the Modeling space
Current MobiCloud DSLPlanned
coverage of MobiCloud
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”}
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
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
DSL with Semantics
Our Vision and the Role of MobiCloud
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
MobiCloud fits in here
The Cirrocumulus Project
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
The Cirrocumulus Project (Cont)
LibCloud / DeltaCloud can be used in building this
component
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
Researchers
39
Ajith Ranabahu
AmitSheth
Ashwin Manjunatha
KrishnaprasadThirunarayan
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
Thank you
41