a domain specific language for performace modeling - cwi.nl filedomain specific language language...

18
A Domain Specific Language for performance modeling Joost Bosman

Upload: others

Post on 03-Nov-2019

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

A Domain Specific Language for performance modeling

Joost Bosman

Page 2: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Agenda

▪ Introduction

▪ Example: CWI lunch model

▪ Demo

Page 3: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Domain Specific Language

▪ Language tailored for a specialized domain

▪ SQL -> databases

▪ HTML -> web content

▪ Shell script -> Unix/Linux automation

▪ Rebel -> Specification of financial products (SWAT CWI)

▪ In contrast to general purpose languages

▪ C, C++, java etc.

Page 4: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Domain: Performance Modeling

▪ Limitations of existing tools

▪ Mainly graphical (drag n click)

▪ Lack of crucial behavioral primitives

▪ Processor Sharing models

▪ Synchronization

▪ Custom prioritization in queues

▪ Using a framework

▪ Implementing too low level details

▪ Mostly event oriented

▪ Goal:

▪ Process oriented performance modeling language

▪ Include modeling primitives from prior modeling experience

Page 5: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Performance Modeling DSL Tool

Compile time Run time

Language Definition(Antlr4

Grammar)

Engine:Java+SSJ

Parser visitor Model instance

Page 6: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Backend: Discrete event simulation

▪ Three ingredients:

Behavior (timings):• How long?• How much?• Based on data/measurements.

Event list (bookkeeping):• When?• In what order?• List of events with time of occurrence

Model (workflow):• A triggers B• B waits for C• Queueing models• Single/multi process• FIFO / ROUND ROBIN / RANDOM

Page 7: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Backend: Discrete event simulation

▪ Three ingredients:

Behavior (timings):• How long?• How much?• Based on data/measurements.

Event list (bookkeeping):• When?• In what order?• List of events with time of occurrence

Model (workflow):• A triggers B• B waits for C• Queueing models• Single/multi process• FIFO / ROUND ROBIN / RANDOM

Page 8: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Language basics (JSON inspired)▪ Declarations:

▪ <identifier> : Type customer : Type

▪ <type identifier> .<identifier> : Type customer.age : number

▪ <identifier> : <attribute> | <component> a : double, b : ResourcePool(3)

▪ <function> <argument>*= <expression> f(%x) : %x * %x + 2

▪ Orchestration:

▪ <component> -> <component> arrival->queue

▪ Expressions:

▪ -Assignment: x=2, y=‘test’

▪ -Comparison: x<y, value==‘foo’

▪ -Predicate: x>2, a&&b

Page 9: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Example: CWI lunch time QoS(stereotype process)

Page 10: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Example: CWI lunch time QoS(stereotype process)

I’m hungryShall we go for lunch?

Page 11: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Example: CWI lunch time QoS(stereotype process)

I’m hungryShall we go for lunch?

OK

Page 12: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Example: CWI lunch time QoS(stereotype process)

We’re ready, let’s go

What are we waiting for?

Page 13: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Example: CWI lunch time QoS(stereotype process)

Meal or sandwich?

We’re ready, let’s go

What are we waiting for?

Page 14: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Example: CWI lunch time QoS(stereotype process)

Meal or sandwich?

We’re ready, let’s go

What are we waiting for?

Perhaps not

Page 15: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Example: CWI lunch time QoS(stereotype process)

Meal or sandwich?

To snack or not to snack

We’re ready, let’s go

What are we waiting for?

Perhaps not

Page 16: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Example: CWI lunch time QoS(stereotype process)

Meal or sandwich?

To snack or not to snack

We’re ready, let’s go

What are we waiting for?

Perhaps not

Page 17: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Demo

Page 18: A Domain Specific Language for performace modeling - cwi.nl fileDomain Specific Language Language tailored for a specialized domain SQL -> databases HTML -> web content Shell script

Questions