Top Banner
EXPENDABLES TEAM E-APPSTORE
22

Expendables E-AppStore

Sep 11, 2014

Download

Technology

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Expendables E-AppStore

EXPENDABLES TEAM

E-APPSTORE

Page 2: Expendables E-AppStore

HOMEWORK PROJECT The project was a homework assignment at the Budapest University of Technology and Economics during the System Integration course lead by the Fault Tolerant System Research Group.

https://www.inf.mit.bme.hu/en

https://www.inf.mit.bme.hu/edu/courses/szolgint

Page 3: Expendables E-AppStore

ASSIGNMENT •  Design and implement the business logic of an app store,

where… •  Customers can:

•  Browse and view applications •  Buy applications •  Get recommendations on which apps to buy •  Manage their accounts

•  Developers can: •  Upload their applications with additional metainformation •  Manage, and update their uploaded applications •  Transfer their profit to a bank account

•  Shop managers can: •  Supervise submitted apps, accept, or reject them

Page 4: Expendables E-AppStore

DEVELOPMENT PHASES We used a model driven approach to create our App store.

Development phases: 1.  Analysis and design

•  Requirement analysis •  Domain analysis •  System design with domain specific model •  Business process modeling

2.  Implementation of business logic

•  Facilitated with code generation from system model 3.  Add rule-based app recommendation feature

Page 5: Expendables E-AppStore

DEVELOPMENT PROCESS

Requirement analysis & Business process

modeling Architectural design

Generative implementation

Analysis model

Business process model

Domain specific model

Rule based functionality

Page 6: Expendables E-AppStore

ANALYZING THE DOMAIN •  We created a domain specific meta-model using the

Eclipse Modeling Framework to help designing our system.

Required modeling elements: •  Business entities with persistence •  Services and methods with REST interfaces •  Types, attributes, references…

•  Using this domain specific language we could create an instance model of our planned system.

Page 7: Expendables E-AppStore

DOMAIN SPECIFIC MODEL

REST features

persistence features

entity

system

service

method attribute

parameter

entity reference

Page 8: Expendables E-AppStore

CODE GENERATION We extended the DSM with code generation using Xtend 2 technology.

Generated Java source artifacts from system model: •  Entity class files with JPA annotations for persistence

•  Entity manager interfaces for entity manipulation

•  Service interfaces files with JAX-RS annotations for RESTful interface

To learn more of the Expendables Web Service Modeler visit: http://code.google.com/p/expendables-ws-modeller/

Page 9: Expendables E-AppStore

GENERATED ENTITY CLASS: TRANSACTION ENTITY

Page 10: Expendables E-AppStore

GENERATED ENTITY MANAGER AND SERVICE INTERFACES

Entity Manager Interface for Transaction Entity

Service Interface for Financial Service

Page 11: Expendables E-AppStore

MySQL Server

MySQL Connector

EclipseLink (JPA)

Jersey (JAX-RS)

EclipseS

ource JAX

-RS

C

onnector Entities Entity Managers

REST Services

Eclipse – OSGi Framework

Expendables AppStore

ARCHITECTURE

Customer or

Developer

•  User Management •  Store •  Customer App

Management •  Developer •  Quality Assurance •  Financial

RE

ST interface

Developed by Expendables team

Page 12: Expendables E-AppStore

DATA STORAGE •  POJO Entity classes with JPA annotations

•  Entirely generated code from system model •  JPQL named queries •  Various relationships between entities

•  Entity Manager classes for retrieving and interacting with entities

•  OR mapping with EclipseLink (Java Persistence API 2.0 reference implementation)

•  MySQL Server for storage

•  Database schema generated by EclipseLink •  Connection with Java MySQLConnector

Page 13: Expendables E-AppStore

WEB SERVICES •  OSGi Java components with RESTful interfaces using

EclipseSource JAX-RS Connector •  Using Jersey JAX-RS reference implementation •  Generation gap pattern

•  Generated Java interfaces with JAX-RS annotations (from system model with generation tool)

•  Manually written pure Java implementation classes •  Architecture:

•  Java classes – services •  Java methods – service functions

•  Usage: •  http://appstoredomain/service/function

Page 14: Expendables E-AppStore

MySQL Server

MySQL Connector

EclipseLink (JPA)

Jersey (JAX-RS)

EclipseS

ource JAX

-RS

C

onnector Entities Entity Managers

REST Services

Eclipse – OSGi Framework

Expendables AppStore jBPM

Workflow

QUALITY ASSURANCE

Customer or

Developer

Manager

Quality Assurance Service for getting and submitting supervision information

RE

ST interface

PHP server

Auto Verify S.

Bytecode Check S.

Developed by Expendables team

jBPM workflow to drive the supervision process •  Interacts with

supervising Manager via HTML forms

•  Manager approves the values or describes problems

•  Separate PHP services •  Dummy implementations •  Result is random value:

GO/NO GO

Page 15: Expendables E-AppStore

QUALITY ASSURANCE JBPM WORKFLOW

Name Supervision

Autoverification & Bytecode check

Metadata Supervision

Human Test

Page 16: Expendables E-AppStore

.NET

MySQL Server

MySQL Connector

EclipseLink (JPA)

Jersey (JAX-RS)

EclipseS

ource JAX

-RS

C

onnector Entities Entity Managers

REST Services

Eclipse – OSGi Framework

Expendables AppStore jBPM

Workflow

BANK SYSTEM

Customer or

Developer

Manager

Bank

RE

ST interface

PHP server

Auto Verify S.

Bytecode Check S.

Developed by Expendables team

Separate ASP.NET Bank System

REST communication with AppStore

Upload Credit service for buying credits at AppStore

Transfer Money function for transferring money to Bank

Page 17: Expendables E-AppStore

GENIUS SERVICE Rule based recommendation service •  Drools rule engine

•  Applications assigned with a score •  Rule firings change the scores •  Prohibitive rules multiply the score by zero •  Recommending rules multiply the score by a greater than

one factor •  The factors initialized from a decision table

•  Variable assignment can be done from an excel sheet •  Managers don’t affect the source code

•  The service returns a list of applications with the highest scores, meaning those the most recommended apps

Page 18: Expendables E-AppStore

GENIUS SERVICE Drools rules: •  Age limit: Apps for customers above a certain age are not recommended. •  Already owned apps: Already owned apps are not recommended. •  Popular apps: Apps purchased in the last 31 days and above a certain price are recommended. •  Same developer or same category: Apps from the same developer or category of already owned apps are recommended.

Page 19: Expendables E-AppStore

GENIUS SERVICE Automatic Derivation of rules with data mining methods •  Database:

•  Transactions in adjacency matrix form (user – app dimensions)

•  Automatic update of the matrix with stored procedures •  Association:

•  Generated Association rules with Weka •  API calls •  Read directly from MySQL DB •  FP-growth algorithm

http://en.wikipedia.org/wiki/Association_rule_learning#FP-growth_algorithm

•  Recommendations from the association rules

Page 20: Expendables E-AppStore

THE GENIUS PROCESS

List of Apps

Drools Rules

Decision table

1 1 . . . 1

The initial scores

Correction factors

Add the factors to

scores

Multiply the scores with the factors

The Top 5 Apps

by scores

Fire rules

Asssociation Lift factors

Weka

Association rules

Processing XML rules with DOM

parser FP-

growth

Page 21: Expendables E-AppStore

.NET

MySQL Server

MySQL Connector

EclipseLink (JPA)

Jersey (JAX-RS)

EclipseS

ource JAX

-RS

C

onnector Entities Entity Managers

REST Services Genius Service

Weka MySQL Connector

Eclipse – OSGi Framework

Expendables AppStore

JBoss Drools

jBPM Workflow

FINAL ARCHITECTURE

Customer or

Developer

Manager

•  User Management •  Store •  Customer App

Management •  Developer •  Quality Assurance •  Financial

Bank

RE

ST interface

PHP server

Auto Verify S.

Bytecode Check S.

Developed by Expendables team

Page 22: Expendables E-AppStore

CONTACTS Members: •  Ableda Péter ([email protected]) •  Csicsely Attila ([email protected]) •  Kiss Dániel ([email protected]) •  Lóránd Bálint ([email protected]) Group e-mail address: •  [email protected] Expendables Web Service Modeler •  http://code.google.com/p/expendables-ws-modeller/ Fault Tolerant System Research Group at BUTE •  https://www.inf.mit.bme.hu/en