omgi application store

22
A service oriented application developed in a model driven approach OMGi Application Store

Upload: tothtamas

Post on 18-Jan-2015

435 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: OMGi application store

A service oriented application developed in a model driven approach

OMGi Application Store

Page 2: OMGi application store

Introduction● The project was created during a service-

oriented development course at BUTE-FTSRG.● Related open source project: OMGi Tools, an

envirionment for model base development of service oriented applications

● Participiants:● Bogsch Balázs (balaggee gmail.com)● Papp István (pappist87 gmail.com)● Tóth Tamás (tothtamas.bme gmail.com)● Tóth Zsolt (toth.zsolt.bme gmail.com)

Page 3: OMGi application store

Project scope● Developing a service-oriented application store● Features:

○ Services for managing accounts, apps, purchases, etc.

○ Business process based quality management○ Business process based application purchase○ Rule based application filter

Page 4: OMGi application store

Phases of development

● The project was created in a model driven manner.

● Main development phases:1. Analysis and design

● Requirement analysis● Architectural design● Business process modeling

2. Generative implementation of business logic

3. Enhancement with rule based functionality

Page 5: OMGi application store

Model based developement process

Generative implementation

Requirement analysis & business process

modeling

Architectural design

Enhancement with rule based

functionality

Use case model

Business process model

Domain specific language & model

Page 6: OMGi application store

Requirement analysis● UML based analysis

● Modeling functional requirements with use cases

● Modeling scenarios with activities● Main functionality

● Account management for customers and developers

● Management of applications and versions for developers

● Transactions● Automatic and manual quality

management of uploaded apps

Page 7: OMGi application store

Example: Customer use cases

Page 8: OMGi application store

Architectural design● Creation of an EMF-based domain specific

language that describes:● Business data● Business components and services● Interconnections and dependency between

them● and other aspects

● System architecture specification in the created language

Page 9: OMGi application store

Domain specific language

business service

technological detailsREST

service

service parameter

general data type

entity

reference between entities

business component

attribute of an entity

Page 10: OMGi application store

REST Service layer

System architecture

Customer services

Business layer

Database layer

Database

Implementation of the services, which provide the specified functionalities

Quality manager services Developer services

Page 11: OMGi application store

Domain specific architecture model

REST interface REST

serviceBusiness service

Business component

Page 12: OMGi application store

Business process modeling● Modeling in BPMN● Specified processes:

● Quality management● Application purchase (example)

Page 13: OMGi application store

Implementation: code generation

● Technology: Xtend● Input: the specified system model● Generates the following from the system

model:● Annotated JPA entity classes● Annotated REST interfaces of business services● Stubs for business logic with dependencies

● The generated code is runnable on OSGi platform

● For more: check OMGi Tools

Page 14: OMGi application store

Code generation example:Annotated JPA entities

@Entity

//...

public class Customer extends User {

//...

@ManyToMany

private List<App> purchasedApps = new ArrayList<App>();

public List<App> getPurchasedApps() {return purchasedApps;

}

public void setPurchasedApps(List<App> purchasedApps) {this.purchasedApps = purchasedApps;

}

//...

Page 15: OMGi application store

Code generation example:Annotated REST services

@Path("/rscustomermanager")

public class RsCustomerManager i mplements IRsCustomerManager {

private CustomerManager customerManager = new CustomerManager();

//...

@DELETE

@Path("removecustomer/{customerId}")

@Produces("text/plain")

@Override

public Response removeCustomer(@PathParam("customerId") String customerId)

throws NumberFormatException, DatabaseAccessException,NoSuchEntitytException {

System.out.println("INFO: RemoveCustomer service called....");

return Response.status(200).entity("Service called succesfully");}

//...

Page 16: OMGi application store

Code generation example:Business logic stubs

public class CustomerManager implements ICustomerManager {

private IUserAccountManager userAccountManager = new UserAccountManager();

//...

@Override

public void removeCustomer( int customerId) throws DatabaseAccessException,

NoSuchEntitytException {

//ToDo

return;}

//...

Page 17: OMGi application store

Implementation: business processes● Implementation of services, which are called from

business processes● Call REST services from WorkItem handlers

REST Service layer

Application purchase REST services

Business layer

Page 18: OMGi application store

Enhancement with rule based functionality

● Add „Genius” feature to the system● Intelligent, rule based application

recommendation● Considering user habits and business

interests● Preferred expensive and frequently purchased

applications● Preferred the works of developers from whom the

user purchased a lot● Preferred applications purchesed by user who has

similar purchasing habits● Preferred applications from category which is

popular for user

Page 19: OMGi application store

Enhancement with rule based functionality – implementation - 1

● Enlargement the system model and generate new components and services

● Implement „Genius” REST service● Request parameter customer ID and the response a list

of recommend applications● Implement necessary business services in

business logic layer● Use JBoss Drools rule engine

● Weighting applications when a rule is activated

Page 20: OMGi application store

Enhancement with rule based functionality – implementation - 2

Collect data

Genius REST Service

Business layerFire rules

RequestCollect possible applications (e.g. not purchased)

Get applicaions’ metrics:● app popularity● generated income● developer popularity● user similarity

Response

Page 21: OMGi application store

Used technolgies

Business layer: OSGi, JEE, .Net WPF

Database access layer: EclipseLink

Database: Derby

Business processes: jBPM

REST service layer: Jersey

Business rules: JBoss Drools

Page 22: OMGi application store

Links● BUTE Fault Tolerant Systems Research Group

http://www.inf.mit.bme.hu/en ● SOA course at BUTE

http://www.inf.mit.bme.hu/edu/courses/szolgint ● OMGi Tools

http://code.google.com/p/omgi-tools/