lecce presentation2008

50
SBVR in Practice: Systems Built for Change Declarative Technologies in a Digital Ecosystem Alexandros Marinos ([email protected])

Upload: alexandros-marinos

Post on 23-Jan-2015

450 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Lecce Presentation2008

SBVR in Practice: Systems Built for ChangeDeclarative Technologies in a Digital

Ecosystem

Alexandros Marinos([email protected])

Page 2: Lecce Presentation2008

Points to Cover• Case Study Pt 1: SBVR + Relational Databases + REST

• Case Study Pt 2: Deriving Processes from Rules

• Extending the model (Transactions, UI, Composing Services)

• Declarative Programming and DNA

• The Epistemic Arrogance of Computing

• Integration with DE infrastructure: The RISK board game

Page 3: Lecce Presentation2008

Case Study Pt 1: SBVR + Relational Databases + REST

Made for one another

Page 4: Lecce Presentation2008

SBVR

Page 5: Lecce Presentation2008

Vocabulary(SBVR)

Page 6: Lecce Presentation2008

Vocabulary(SBVR)

Term

Contains

Page 7: Lecce Presentation2008

Vocabulary(SBVR)

Term

Contains

Terms

studentcourse

study programme

Page 8: Lecce Presentation2008

Vocabulary(SBVR)

Term

Fact Type

ContainsContains

Terms

studentcourse

study programme

Page 9: Lecce Presentation2008

Vocabulary(SBVR)

Term

Fact Type

ContainsContains

Terms

studentcourse

study programme

Fact Types

student is registered for course

student is enrolled in study programme

course is available for study programme

Page 10: Lecce Presentation2008

Vocabulary(SBVR)

Term

Fact Type

ContainsContains

Connects

Terms

studentcourse

study programme

Fact Types

student is registered for course

student is enrolled in study programme

course is available for study programme

Page 11: Lecce Presentation2008

Vocabulary(SBVR)

Term

Fact Type

Is defined according to

ContainsContains

Connects

Rule(SBVR)

Terms

studentcourse

study programme

Fact Types

student is registered for course

student is enrolled in study programme

course is available for study programme

Page 12: Lecce Presentation2008

Vocabulary(SBVR)

Term

Fact Type

Is defined according to

ContainsContains

Connects

Rule(SBVR)

Rules

It is necessary that each student is registered for at most five courses

Terms

studentcourse

study programme

Fact Types

student is registered for course

student is enrolled in study programme

course is available for study programme

Page 13: Lecce Presentation2008

Vocabulary(SBVR)

Term

Fact Type

Is defined according to

ContainsContains

Connects

Rule(SBVR)

Rules

It is necessary that each student is registered for at most five courses

It is necessary that each course that a student is registered for, is available for a study programme that the student is enrolled in.

Terms

studentcourse

study programme

Fact Types

student is registered for course

student is enrolled in study programme

course is available for study programme

Page 14: Lecce Presentation2008

Relational Database

Page 15: Lecce Presentation2008

Data

RDBMS

Schema

Structures

Page 16: Lecce Presentation2008

Vocabulary(SBVR)

Data

RDBMS

Schema

Defines

Structures

Page 17: Lecce Presentation2008

Vocabulary(SBVR)

Data

RDBMS

Schema

Defines

Structures

Vocabulary

student, course, study programme, name

student is registered for coursestudent is enrolled in study programmecourse is available for study programme

Page 18: Lecce Presentation2008

Vocabulary(SBVR)

Data

RDBMS

Schema

Defines

Structures

Student

Study Programme Course

Student_StudyProgramme

1

1

StudyProgramme_Course

1 1

Student_Course

1

1

Vocabulary

student, course, study programme, name

student is registered for coursestudent is enrolled in study programmecourse is available for study programme

Page 19: Lecce Presentation2008

Vocabulary(SBVR)

Data

RDBMS

Schema

Defines

Structures

Student

Study Programme Course

Student_StudyProgramme

1

1

StudyProgramme_Course

1 1

Student_Course

1

1

Vocabulary

student, course, study programme, name

student is registered for coursestudent is enrolled in study programmecourse is available for study programme

student has name, course has name, study programme has name

Page 20: Lecce Presentation2008

Vocabulary(SBVR)

Data

Constrains

Is defined according to

Rule(SBVR)

RDBMS

Schema

Defines

Structures

Student

Study Programme Course

Student_StudyProgramme

1

1

StudyProgramme_Course

1 1

Student_Course

1

1

Vocabulary

student, course, study programme, name

student is registered for coursestudent is enrolled in study programmecourse is available for study programme

student has name, course has name, study programme has name

Page 21: Lecce Presentation2008

Vocabulary(SBVR)

Data

Constrains

Is defined according to

Rule(SBVR)

RDBMS

Schema

Defines

Structures

Student

Study Programme Course

Student_StudyProgramme

1

1

StudyProgramme_Course

1 1

Student_Course

1

1

RulesIt is necessary that each student is registered for at most five

courses

It is necessary that each course that a student is registered for, is available for a study programme that the student is enrolled in.

Vocabulary

student, course, study programme, name

student is registered for coursestudent is enrolled in study programmecourse is available for study programme

student has name, course has name, study programme has name

Page 22: Lecce Presentation2008

REST

Page 23: Lecce Presentation2008

Verbs(HTTP)

GET

PUT

POST

DELETE

Page 24: Lecce Presentation2008

Verbs(HTTP)

GET

PUT

POST

DELETE

URI

Accesses

Creates

Updates

Destroys

Page 25: Lecce Presentation2008

Verbs(HTTP)

Instance

GET

PUT

POST

DELETE

URI

Collection

Represents

Accesses

Creates

Updates

Destroys

Represents

Contains

Page 26: Lecce Presentation2008

Verbs(HTTP)

Vocabulary(SBVR)

Term

Instance

GET

PUT

POST

DELETE

URI

REST

Collection

Fact Type

Represents

ContainsContains

Connects

Is Identified by

Describes

Describes

Accesses

Creates

Updates

Destroys

Represents

Contains

Page 27: Lecce Presentation2008

Verbs(HTTP)

Vocabulary(SBVR)

Term

Instance

GET

PUT

POST

DELETE

URI

REST

Collection

Fact Type

Represents

ContainsContains

Connects

Is Identified by

Describes

Describes

Accesses

Creates

Updates

Destroys

Represents

Contains

Vocabulary

student, course, study programme, name

student is registered for coursestudent is enrolled in study programmecourse is available for study programme

student has name, course has name, study programme has name

Page 28: Lecce Presentation2008

Verbs(HTTP)

Vocabulary(SBVR)

Term

Instance

GET

PUT

POST

DELETE

URI

REST

Collection

Fact Type

Represents

ContainsContains

Connects

Is Identified by

Describes

Describes

Accesses

Creates

Updates

Destroys

Represents

Contains

Vocabulary

student, course, study programme, name

student is registered for coursestudent is enrolled in study programmecourse is available for study programme

student has name, course has name, study programme has name

URIs

collection of students:http://domain.org/students/

A specific student:http://domain.org/students/John/

list of courses a student is enrolled in:http://domain.org/students/John/courses/

[note: domain could be replaced with an IP address]

Page 29: Lecce Presentation2008

The Big Picture

Page 30: Lecce Presentation2008

Verbs(HTTP)

Vocabulary(SBVR)

Term

Instance

GET

PUT

POST

DELETE

DataURI

REST

SBVR

Collection

Fact Type

Constrains

Contains

Is defined according to

Represents

ContainsContains

Connects

Is Identified by

Describes

Describes

Accesses

Creates

Updates

Destroys

Rule(SBVR)

RDBMS

Schema

Defines

Structures

Represents

Contains

Page 31: Lecce Presentation2008

Case Study Pt 2: Deriving Processes from Rules

Page 32: Lecce Presentation2008

What Processes?

Student Study Programme CourseCollection Instance Collection Instance Collection Instance

GET + + + + + +PUT   +   +   +POST +   +   +  DELETE   +   +   +

Page 33: Lecce Presentation2008

If we were to write processes…

Is Course available for

student’s SP?no

yes

Does Student have less than

5 courses?

yes

no

Add student to course

Are there students that

will be left with illegal courses?

yes

no

Delete Study Programme

Add Student To Course

addStudentToCourse(studentId,courseId)

Delete Study Programme

deleteSP(spId)

Will course students still be allowed to take

course?

no

yes

Delete Study Programme

Remove Course from Study Programme

RmvCourseFromSP(courseId,spId)

Page 34: Lecce Presentation2008

Cost of Change

Rules

It is necessary that each student is registered for at most five courses

It is necessary that each course that a student is registered for, is available for a study programme that the student is enrolled in.

Fact Types

student is registered for course

student is enrolled in study programme

course is available for study programme

Terms

studentcourse

study programme

Page 35: Lecce Presentation2008

Cost of Change

Rules

It is necessary that each student is registered for at most five courses

It is necessary that each course that a student is registered for, is available for a study programme that the student is enrolled in.

It is necessary that each student that is under probation, is registered for at most five courses

Fact Types

student is registered for course

student is enrolled in study programme

course is available for study programme

student is under probation

Terms

studentcourse

study programme

Page 36: Lecce Presentation2008

The alternative

Goal(x) Generic Method to Reach Goals

Set of Constraints+ = Process (x)+

Page 37: Lecce Presentation2008

The alternative

Goal(x) Generic Method to Reach Goals

Set of Constraints+ = Process (x)

Verb Noun

REST(HTTP)

SBVR Vocab.Rel. Database

Meta - Process SBVR Rules

+

Page 38: Lecce Presentation2008

Meta-process?

Requests Changes to State (Goal)

Explain Inconsistencies

Will State Be Consistent?

no

yes

Apply Changes

Page 39: Lecce Presentation2008

One Rule, Many Processes

Rule Rule Rule Rule

Process Process Process Process

Page 40: Lecce Presentation2008

Declarative Programming and DNA

• Rules must be:– Independent– Atomic

In other words, each rule should express exactly one constraint, no more, no less.

This gives them very interesting properties…

Page 41: Lecce Presentation2008

Declarative Programming and DNA

• Rules can be:– Deleted– Altered– Mixed

Therefore, having a set of candidate rules and a fitness function, we can generate variants of a model and apply genetic programming techniques

Page 42: Lecce Presentation2008

The Arrogant Epistemology of Computing

• Modern Information Systems are not built for change.

• We check requirements at one point in time and build them into processes/code

• Computing has evolved to deal with static problems, look for permanent solutions. We assume that our problem domain is static.

• Changing an information system is a slow, expensive and dangerous process.

• People are therefore tempted to conform to the software rather than having the software conform to their needs.

Page 43: Lecce Presentation2008

The Arrogant Epistemology of Computing

• Human society and organizations are constantly shifting. Not only do the challenges change, but people find constantly better ways to solve even relatively static problems.

• When applying computing to human society, we need a different approach

• The model needs to constantly change in order to reflect this organizational evolution. We need to remove the programmer to facilitate flexible system-stakeholder interaction.

• Declarative Information Systems are built for cheap and frequent change. They assume that the problem domain is constantly shifting

Page 44: Lecce Presentation2008

Questions?

Page 45: Lecce Presentation2008

Extending the model

• The design is modular. The core does not do everything but is focused and extensible.

• Adding Transactions and Querying• Adding Service Description• Adding User Interface• Even altering the persistence system

Page 46: Lecce Presentation2008

Verbs(HTTP)

Vocabulary(SBVR)

Term

Instance

GET

PUT

POST

DELETE

DataURI

REST

SBVR

Collection

Fact Type

Constrains

Contains

Is defined according to

Represents

ContainsContains

Connects

Is Identified by

Describes

Describes

Accesses

Creates

Updates

Destroys

Rule(SBVR)

RDBMS

Schema

Defines

Structures

Represents

Contains

Page 47: Lecce Presentation2008

Extending the model: Inputs

Automated Annotation

Manual Annotation

Automated Extraction

Other method

XML Annotated SBVR-SE

Text Input in Editor

Unstructured Natural

Language

Other Input

Form Input

Template ApplicationManual

Entry

Page 48: Lecce Presentation2008

Integration with DE infrastructure

Application Platform (D.I.S)

Game Rules

Identity &TrustModel

Transaction Model

Dist.Random Number

Gen.

Peer to Peer Client

(Distributed?) Storage System

Presentation (Skin)

Access + Lock System

Data

Community Rules

Application Platform (D.I.S)

Game Rules

Identity &

TrustModel

Transaction Model

DistributedRandom Number

Generator

Peer to Peer Client

(Distributed?) Storage System

Presentation (Skin)

Access + Lock System

Data

Community Rules

Application Platform (D.I.S)

Game Rules

Identity &TrustModel

Transaction Model

Dist.Random Number

Gen.

Peer to Peer Client

(Distributed?) Storage System

Presentation (Skin)

Access + Lock System

Data

Community Rules

Application Platform (D.I.S)

Game Rules

Identity &TrustModel

Transaction Model

Dist.Random Number

Gen.

Peer to Peer Client

(Distributed?) Storage System

Presentation (Skin)

Access + Lock System

Data

Community Rules

Player 2

Internet - REST(HTTP)

Player 1

Player 3 Player 4

As a Use Case for a Digital Ecosystem

Page 49: Lecce Presentation2008

Integration with DE infrastructure

Application Platform (D.I.S)

Game Rules

Identity &

TrustModel

Transaction Model

DistributedRandom Number

Generator

Peer to Peer Client

(Distributed?) Storage System

Presentation (Skin)

Access + Lock System

Internet - REST(HTTP)

Data

Player 1

As a Use Case for a Digital Ecosystem

Community Rules

Page 50: Lecce Presentation2008

More Questions?