Upload
tothtamas
View
435
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Citation preview
A service oriented application developed in a model driven approach
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)
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
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
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
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
Example: Customer use cases
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
Domain specific language
business service
technological detailsREST
service
service parameter
general data type
entity
reference between entities
business component
attribute of an entity
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
Domain specific architecture model
REST interface REST
serviceBusiness service
Business component
Business process modeling● Modeling in BPMN● Specified processes:
● Quality management● Application purchase (example)
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
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;
}
//...
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");}
//...
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;}
//...
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
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
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
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
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
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/