www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
Business Rules-Driven SOA.
A Framework for Multi-Tenant Cloud Computing
Lect. Ph.D. Liviu Gabriel CREȚU
Alexandru Ioan Cuza University of Iasi, Romania
Faculty of Economics and Business Administration
Business Information Systems Department
www.feaa.uaic.ro
About Our Team
www.uaic.ron
Industry-proven skills and research in Business
Information Systems:
¡
Information Systems analysis and design
¡
Software engineering
¡
Software design
¡
Software development (Java/.Net)
¡
Databases
¡
Model Driven Architecture
¡
Event-Driven SOA
¡
Business Rules
¡
Ontologies (research only)
¡
Project Management
www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
Agenda
1.
Building software systems for (e-) business
2.
The problem of multi-tenancy
3.
Event Driven SOA – first solution
4.
Business Rules Driven SOA – the second one
5.
Real Life MDA – the way to deal with complexity
www.feaa.uaic.ro
The old (e)Business Ecosystem
www.uaic.roInteroperability
Collaboration
www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
SOA and the coupling problem
n
Multiple
peer-to-peer
direct connections between
software services in an Enterprise Information System:
¡
generated by business needs as the company grows
¡
leading to the so called “Spaghetti effect”
www.feaa.uaic.ro
Enterprise Systems
www.uaic.ron
Particularities
¡
Plethora of data
¡
Many entry channels (web forms, mobile apps, e-mail, FTP)
¡
Plethora of business rules
¡
Continuous change of business requirements
n
Main system’s requirements
¡
Highly reliable/configurable services
¡
Scalability
¡
7x24 availability
¡
Open to any entry channel
¡
Open architecture
www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
Agenda
1.
Building software systems for (e-) business
2.
The problem of multi-tenancy
3.
Event Driven SOA – first solution
4.
Business Rules Driven SOA – the second one
5.
Real Life MDA – the way to deal with complexity
www.feaa.uaic.ro
Multi-tenancy principle
www.uaic.ron
One single software instance serves them all (the
clients)
n
Prerequisites:
¡
Service Oriented Architecture
¡
Software as a Service
www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
The problem
n
What happens when one tenant have different
requirements than the other ones?
n
Example: Payroll Business Process
¡
Input: Employee’s contract, Company payment rules, the
national law
¡
Output: payroll report
¡
Process-to-Process interaction : Accounting BP
n
Input: payroll report
n
Output: accounting records
n
The problem: the payroll accounting translation
algorithm is different for two different clients
(countries)
www.feaa.uaic.ro
The First Solution – Event Driven
www.uaic.roSOA and Enterprise Service Bus
BPMN ED-SOA
Payroll Validated Business Event
Payroll Val idated Business Event
CFO - Company A - Romania
«ESB Serv ice» Route Business Ev ent «Serv ice» PATranslatorServ ice Version A «Serv ice» PATranslatorServ ice Version B Business Analyst Architect/Dev eloper
[Business Event from Com pany A]
[Business Event from Com pany B]
«im plem ents»
«im plem ents»
Detailed Spec «flow» Business Rules Business Rules
1
2
www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
The Second Solution:
Business Rules Driven SOA
n
What if one single service version could serve them all?
11
Abstract thinking of
development /
software evolution
BPMN BRD-SOA CFO - Company A - RomaniaPayroll Validated Business Event
CFO - Company B - Australia
Payroll Validated Business Event
«ESB Service» Route Business
Event
«Service»
PATranslator Business Rules Engine«Service»
Architect/Developer
BA (optional) BA (optional)
«Create/Read/Update/Delete»
«im plem ents» «Im plem ents»
«Create/Read/Update/Delete»
1
2
2
3
1
www.feaa.uaic.ro
The Enterprise System’s Architecture
www.uaic.robased on BRD-SOA
cmp Components
BusinessRulesEngine
Service
BP
ESB Model
ESB
BusinessRulesEngine
Service
BP
ESB
Client
ESB
ESB
Serv ice Model
Service
ESB
ESB
Extended Domain
Model
ESB
ESB
Business Process
Model
BusinessProcessEngine
ESB
Business Rules
Model
BusinessRulesEngine
«use»
«use»
«use»
www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
In BRD-SOA
n
There may be
no
business logic encapsulated within the
service/domain model, but only the system’s logic
n
The service becomes the orchestrator, not the business
logic performer
¡
Prepares the preconditions (model instances loaded from the
persistence tier)
¡
Creates business rules filters
¡
Executes the business rules engine
¡
Persists the result
www.feaa.uaic.ro
Why BRD-SOA?
www.uaic.ron
Main advantage of Business Rules Engines:
¡
Business rules may be expressed using natural language
sentences (also using familiar business terms)
n
IF and Only if there is an ontology in place so the
www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
Agenda
1.
Building software systems for (e-) business
2.
The problem of multi-tenancy
3.
Event Driven SOA – first solution
4.
Business Rules Driven SOA – the second one
5.
Real Life MDA – the way to deal with software
development complexity
www.feaa.uaic.ro
One way to approach Model Driven
www.uaic.roArchitecture
BPMN BPOSE Automation Life-Cycle
new developm ent pattern
«BusinessProcess» Meta-Model Update «BusinessProcess»
Meta-Model Update «BusinessProcess»Define New UML Stereotypes «BusinessProcess»
Define New UML Stereotypes
«BusinessProcess» Define MDA Transformers
«BusinessProcess» Define MDA Transformers
«BusinessProcess» Define Model Validators
«BusinessProcess» Define Model Validators «BusinessProcess»
Model, Validate, Transform «BusinessProcess» Model, Validate, Transform
Pattern Obsolete
Refinam ent needed
«flow» «flow» «flow» «flow» «flow» «flow» «flow» «flow»
Roles involved:
www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
From the Business Perspective (view) over
the Use Case…
(C)
DMAD-ARDT UseCase (GIGA)
Computation Independent Model
Roles involved:
www.feaa.uaic.ro
By means of modeling constraints
www.uaic.ro(CIM-PIM/PSM mix)…
A set of design rules and stereotypes
are applied to each CIM element
(C)
Roles involved:
-
Business Analyst
-
Developer
www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
Also by means of linking different layers
(GUI-SERVICES-DATA)…
www.feaa.uaic.ro
To generated PSM (Java)…
www.uaic.rowww.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
Or PIM (from GUI - CIM)…
www.feaa.uaic.ro
And finally to working code
www.uaic.ron
Java Classes
¡
Domain model structures
¡
Business Event structure
¡
EJB service
¡
ESB configurations
n
ORM mappings (JPA annotations)
n
JPA-QL queries
www.feaa.uaic.ro www.uaic.ro
Lect. Phd. Liviu Gabriel CRETU / SPRERS event – Training on software services, Timisoara, Romania, 6-10 dec 2010
Why do we call it “real life” MDA?
n
A few
MDA shortcuts
have been formally defined to
become productive
¡
A CIM element may have a link to a PIM or a PSM element
¡
A PIM element may include PSM concepts (Java code generated
as the behavior content of UML class element)
¡
Developers may interfere with the MDA multiple
transformation steps (they are allowed to modify the
generated models, before generating the next ones)