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=865
Project: http://knoesis.wright.edu/research/srl/projects/mobi-cloud/
Web & Social Media Analytics Previous Year Question Paper.pdf
MobiCloud: Towards Cloud Mobile Hybrid Application Generation using Semantically Enriched Domain Specific Languages
1. MobiCloudTowards Cloud Mobile Hybrid ApplicationGeneration using Semantically Enriched DomainSpecific Languages 1 Ajith H. Ranabahu, Amit Sheth, AshwinManjunatha, KrishnaprasadThirunarayanThe Ohio Center of Excellence in Knowledge-enabled Computing -Kno.e.sis Wright State University AjithRanabahu, Amit Sheth, AshwinManjunatha, and KrishnaprasadThirunarayan, '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 http://knoesis.org/library/resource.php?id=865
2. 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
4. Portability Computing Power Scalable On-demand Economical Portable Ubiquitous Connected Spectrum of Computing Power 4
5. 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
6. 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
7. 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, EvimariaTerzi Ninth IEEE International Conference on Data Mining, 2009
8. 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
10. 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
11. 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
12. 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
13. A birds-eye view of what we do DSL Script Compiler/Generator Cloud Mobile Hybrid Application 13
14. 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
16. DSL design principle Based on Model-View-Controller (MVC) design pattern 16 Model View Controller
17. A very simple “Hello World” 17 Metadata – details that need to be attached to the whole application 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 Linking the model using its unique name Views Linking the controller using its unique name
18. Mapping of Hello World to Cloud and Mobile Spaces Model View Controller Persistent Storage UI Server side handler RESTful Service Client RESTful Service Implementation Greeting Data Structures Greeting Data Structure Mobile Device Cloud
19. 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
20. 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
21. 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
22. Current MobiCloud Architecture 22 Android Platform Generator 1 (Android) Text Editor Object Model Blackberry Platform Generator 2 (Blackberry) Domain Specific Language (DSL) Script Parser Web Based Graphical User Interface GAE Platform Generator 3 (GAE) Integrated Development Environment (IDE) based Graphical User Interface Amazon EC2 Platform Generator 4 (Amazon EC2)
23. Current MobiCloudWizard Interface Step 3 : Download the code Step 1 : Write your code The downloaded code can be compiled to create an executable application using relevant development kit Step 2 : Select the targets
24. 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, seeLhttp://knoesis.org/library) 24
26. 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
27.
28. Enables a clear separation of issuesTypically in both server and client representing Data structures. Described In Models Associated with the application, typically via the metadata tags 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 “Semantic Web Process Lifecycle: Role of Semantics in Annotation, Discovery, Composition and Orchestration,” AmitSheth 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’”, AbhijitPatil, SwapnaOundhakar,AmitSheth, and KunalVerma, in proceedings, 13th International Conference on World Wide Web (WWW 2004), New York, NY, 2004.
29. Partitioning of the Modeling space Current MobiCloud DSL Planned coverage of MobiCloud
30. 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”}
31. 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 insertthe 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
32. 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
35. 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
42. Time for Questions ?More at http://knoesis.orghttp://knoesis.wright.edu/research/srl/projects/mobi-cloud/The Ohio Center of Excellence in Knowledge-enabled Computing - Kno.e.sis 40
This is our agenda – first a brief overview of what are cloud mobile hybrids and why they are hard to build. Then we discuss a Domain specific language based system of developing these hybrid applications. Later we introduce semantics and finish with a discussion of what we have envisioned for the future.
The spectrum of computing power has portability increasing in one direction and computing power increasing in the other direction. At the portable end ubiquitous mobile devices are present with ever increasing processing power and mobility. On the other end there is a boom in high end data centers where cheap computing power is available for extreme scaling and offered as pay-as-you-go resources.
In the light of these changes we see a new breed of applications which we name “Cloud mobile hybrid” applications. These applications span over multiple devices , the back-end on a Cloud and front-end typically provided as a mobile device application. Both these components make up the application as a whole. Note that the state-of-the-art is to provide a native application that takes advantage over the device capabilities. Mobile enabled web pages are no longer considered to have sufficient sophistication.
Here’s a naïve example. Think of the facebook app in your smart phone. This app is a mobile front-end for Facebook. Any action you do – say marking a post as a ‘like’ triggers a heavy process in the cloud based (?) back-end. Without both pieces Facebook is not Facebook !
Moving to a new, somewhat fictitious example, consider privacy score, that measures relative exposure of private data on a social network. This is an experimental measure introduced by IBM researchers. It takes a large number of computations to find this score although the final result is small and ideally presented through a mobile device (the current interactions of the social networks is primarily through mobile devices). This is a perfect example of a CMH application.
The question is “are these things hard to build ?” The answer is indeed yes. This difficulty is in two frontsThe clouds are heterogeneous and vendor locked. Hence the back-end is expensive to port.The same is true for the mobile end since almost all mobile development platforms are different and vendorlocked
GAE = Google AppEngine
The modeling space is created by the need to consider multiple, independent considerations that exist when developing applications. When taken into consideration, these create a space and we can place each modeling effort in an area in this space.
This is the high level vision of Cirrocumulus. The development happens via DSLs and then an ‘assembly’ containing all details is passed to the middleware layer for Cloud deployment. MobiCloud fits in the DSL based design and development component.