model driven development and code generation of software systems
TRANSCRIPT
Model-Driven Development and Code Generation of Software Systems
Marco BrambillaPolitecnico di Milano [email protected]
@marcobrambi
Agenda
• Research field
• Research path
• A sample of research topics• From business processes to software applications
• Generating code for crowdsourcing
• Impact and perspectives
Field
Marco BrambillaPolitecnico di Milano
@marcobrambi
• Improving software development and maintenance productivity
Context
Liberated programmingSelf-healing and self-
evolving programs
End-user Development (EUP), Mashups, …
Agile development
Modeling and Code Generation Approaches
(MDE)
[B1] Brambilla, Cabot, Wimmer. Model-Driven Software Engineering In Practice.
Morgan & Claypool, USA, 2012.
• Engineering practices based on models
Model-based Engineering
Model
Features:• Mapping • Reduction• Pragmatism
System
Represents
Purposes: • Descriptive• Prescriptive
• Model-Based Engineering (MBE)
• Model-Driven Engineering (MDE)
• Model-Driven Development (MDD)
• Model-driven Architecture (MDA)
The MD* Acronyms Map
• Model-Based Engineering (MBE)
• Model-Driven Engineering (MDE)
• Model-Driven Development (MDD)
• Model-driven Architecture (MDA)
The MD* Acronyms Map
• Models (M)
• Model Transformations (MT)
The MDE Ingredients
MDE Basic ArchitectureR
ealiz
atio
nM
odel
ing
Model
Artifacts(e.g. code)
Modelinglanguage
Platform
Meta-modelinglanguage
Transformationdefinition
Transformationlanguage
uses
defined using
defined by
Application domainApplication Meta-Level
Aut
omat
ion
Transformation
Abstraction (bottom-up)Reuse
Construction (top-down)
MDE Basic ArchitectureR
ealiz
atio
nM
odel
ing
Model
Artifacts(e.g. code)
Modelinglanguage
Platform
Meta-modelinglanguage
Transformationdefinition
Transformationlanguage
uses
defined using
defined by
Application domainApplication Meta-Level
Aut
omat
ion
Transformation
Abstraction (bottom-up)Reuse
Construction (top-down)
Research Path
Marco BrambillaPolitecnico di Milano
@marcobrambi
Research pathS
uppo
rted
sub
syst
ems
and
data
sou
rces
SW Devel. Process Span
Crowds
Social Net.
Search Eng.
Ontologies
Processes
Web Serv.
Relational
Requirements Business Design Application Design Code Gen.
Data intensive
SOA
BPM
Sem. Web / LD
Structured Web Data
SN Integr. & Expert finding
Crowd control & integr.
Social BPM
Advanced Search UI
Main research resultsS
uppo
rted
sub
syst
ems
and
data
sou
rces
Crowds.
Social Net.
Search Eng.
Ontologies/ Sem. Web
Processes
Web Serv.
Relational (& MDE)
• Reactive CrowdSourcing. ACM Conf. on World Wide Web WWW 2013• Answering search queries with CrowdSearcher. ACM Conf. on World Wide Web
WWW 2012
• Choosing the Right Crowd: Expert Finding in Social Networks, EDBT 2013• From Requirements to Implementation of Ad-hoc Social Web Applications: an
Empirical Pattern-Based Approach. IET-Sw, 2012
• A bottom-up, knowledge-aware approach to integrating and querying web data services. ACM Trans. on the Web (TWEB), 2013
• Exploratory search framework for Web data sources. VLDB Journal, 2013
• Model-Driven Design and Development of Semantic Web Service Applications, ACM Trans. on Internet Technology (TOIT), 2007
• Process modeling in Web applications. ACM Trans. Softw. Eng. Methodol (TOSEM), 2006
• Exception Handling in Workflow-Driven Web Applications. ACM Conf. on World Wide Web WWW 2005
• Model-driven design and deployment of service-enabled web applications. ACM Trans. Internet Technology (TOIT), 2005
• Designing Data-Intensive Web Applications, Morgan-Kaufmann, 2003• The Role of Visual Tools in a Web Application Design and Verification
Framework: A Visual Notation for LTL Formulae.Conf. Web Eng. ICWE 2005• Content search over model repositories. ACM Transactions on the Web (TWEB),
2014 in print.
Topic 1From Business Processesto Software Applications
Marco BrambillaPolitecnico di Milano
@marcobrambi
Addressed problem
• Communication chasm between business and IT is one of the main weaknesses of large organizations• Different language
• Different objectives
• Different quality metrics
• Bridging the gap between business requirements and IT realizations (from design to deployment)
• My challenge: • Business business processes (BPMN)
• IT SOA-oriented and Web-based implementation
• Manual specification of BPMN process model
• Automatic transformation of BPMN to WebML
• Possible manual refinement of WebML models
• Automatic full code generation
Model-driven Development Process
• Manual specification of BPMN process model
• Automatic transformation of BPMN to WebML
• Possible manual refinement of WebML models
• Automatic full code generation
Model-driven Development Process
BPM Application model transformation
Transformation rulesINPUT: BPMN model enriched with data and activity typing
• typed activities enable reusable application models• data dependencies are specified at high level
BPM Application model transformation
Transformation rulesOUTPUT: fine-grained Application Model, needing few refinements by the designer
BPMN WebML transformation
20
(1) One control siteview per pool: Human interaction
BPMN WebML transformation
21
(1) One control siteview per pool: Human interaction(2) One control view per pool: Choreography
BPMN WebML transformation
22
(1) One control siteview per pool: Human interaction(2) One control serviceview per pool: WS Choreography(3) One site view per lane: user navigation
BPMN WebML transformation
23
(4) One site view per lane: business logics of activities and gateways
BPMN WebML transformationTransformation rules
finer-grained Application Model, needing few refinements by the designer
• typed activities enables reusable application models• data dependencies are specified at a higher level
less errors in Application Model design
Faster development
24
(1) One control siteview per pool: Human interaction(2) One control serviceview per pool: WS Choreography(3) One site view per lane: user navigation(4) One site view per lane: business logics of activities and gateways(4) One site view per lane: business logics of activities and gateways(5) Orchestration view: a controller component invokes the activities
• Backward engineering (2): modularization of hypertext pieces and reuse as activity types through catalogues
• Reverse Engineering (3): decomposition of the web application and extraction of the BP model
• Aspect-oriented adaptation of transformation rules: • Higher order transformations for: security, company-specific integration, …
• Cross-model validation &coherence
Additional investigations
Topic 2Crowdsourcing based
web applications
Marco BrambillaPolitecnico di Milano
@marcobrambi
•Schema of the process decided and deployed centrally•Tasks defined rigidly •Actor roles predefined and assigned to tasks
Closed BPM
•Opens the process design to multiple actors•Stakeholders can participate and fuse processes•End users can define their processes
Participatory Design
•Social tools integrated into the process execution•Collateral communications allowed, like following up the status, commenting, voting, etc.
Participatory Enactment
•Process execution open (in part) to actors that are not known a priori•Collective (community or crowd based) execution of a task allowed.
Social/Crowd Enactment
From BPM to Social and Crowd Performers
•Schema of the process decided and deployed centrally•Tasks defined rigidly •Actor roles predefined and assigned to tasks
Closed BPM
•Opens the process design to multiple actors•Stakeholders can participate and fuse processes•End users can define their processes
Participatory Design
•Social tools integrated into the process execution•Collateral communications allowed, like following up the status, commenting, voting, etc.
Participatory Enactment
•Process execution open (in part) to actors that are not known a priori•Collective (community or crowd based) execution of a task allowed.
Social/Crowd Enactment
From BPM to Social and Crowd Performers
Crowd-based Applications
Emerging crowd-based applications:opinion mining
localized information or expert response gathering
content annotation and enrichment
General structure of crowdsourcing: the requestor poses some questions
a wide set of responders (typically unknown to the requestor)are in charge of providing answers
the crowdsourcing system organizes a response collection campaign
Crowd Control is tough…
Crowd engineering is complicated Task design, planning, assignment
Workers discovery, assessment, engagement
Controlling crowdsourcing is fundamentalCost
Time
Quality
Need for higher level abstraction and tools
My take on crowdsourcing: CrowdSearcher
Crowdsearcher comprises • a conceptual framework
• a specification paradigm and tool
• a reactive execution control environment
Supports designing, deploying, monitoring, and controlling crowd-based systems
Design is top-down, platform-independent
Deployment turns declarative specifications into platform-specific implementations which include social networks and crowdsourcing platforms
(simplified) example: crowdsourcing opinions on new job position (1)
(simplified) example: crowdsourcing opinions on new job position (2)
The CrowdSearcher features and architecture
Cross-platform integration: social networks and Q&A websites in addition to crowdsourcing platforms
Crowd control: model-driven engine controls application deployment and execution
CrowdSearcher
API Access
A simple task design and deployment process, based on specific data structures
created using model-driven transformations
driven by the task specification
The Design Process of crowd-based apps within CrowdSearcher
Task Specification Task Planning Control Specification
• Task Specification: task operations, objects, and performers• Task Planning: work distribution• Control Specification: task control policies
Model-driven engineering setting
Task Specification
Task Planning
Control Specification
Model-driven engineering setting
Task Specification
Task Planning
Control Specification
Model-driven engineering setting
Task Specification
Task Planning
Control Specification
CrowdSearcher Meta-Model
CrowdSearcher Datamart for Runtime Control
Example experiment: Professors’ images
Classification of images retrieved from Google
• 16 professors within 2 research groups in DEIB (DB and AI groups)
• The top 50 images returned by the Google Image API for each query
• Each microtask consisted of classifying 5 images regarding a professor
• Agreement of multiple performers checked on the image
• Randomization of the image order
Experiment objectives
Validating impact of model-driven change of:• Crowdsourcing strategies (majority, agreement)
• Crowd communities
• Control rules (order of invitations, …)
Measures:• Speed of result collection (number of closed objects in time)
• Quality of classification results (precision of responses)
The communities:• the research group of the professor
• the research area containing the group (e.g. Computer Science)
• and the whole department (more than 600 people in different areas)
• Polimi-related social networks
Precision of communities
Control rules: order of invitation
Precision decreases with less expert communities
Outside-in strategy (from generic to expert users) outperforms inside-out strategy (from expert to generic)
Strategies Evaluation: different majorities
Evaluations
• Different strategies and communities impact on quality, cost and time
• Cost of adapting is very low thanks to definition of strategies and rules at design level and model-driven generation of running system
Impact
Marco BrambillaPolitecnico di Milano
@marcobrambi
User interaction has been overlooked in software engineering standards
Hence the Interaction Flow Modeling Language (IFML)
Final voting on version 1.0, after 3+ years of work
Standardization
Proposed as a standard in OMG (Object Management Group)
In less than 2 years (a record in OMG!), we obtained approval of the IFML standard (March 2013)
Brambilla, Fraternali. “Model-driven UI Engineering of Web and Mobile Apps with IFML”. Morgan Kauffmann, USA, 2014.
IFML (and formerly WebML)has been exploited by the spinoff WebRatio
Commercial modeler and code generator based on IFML and BPMN
17,000 academic licenses
150+ industrial customers (including Acer, Ikea, Unicredit, General Electrics, …)
US and LA branches
Different time-to-market for research ideas• From 0 (web service modeling) to 4 (BPM) years!
Industrial exploitation
Conclusion: innovation-enabling ecosystem
Research (Research group
at Polimi)
Method, Language
and Platform
Spin-off(WebRatio)
Customers (including EU
projects)
Teaching (Polimi and int.l courses)
innovation
innovation toolsuite
Toolsuite, industrial requirements
innovation
requirementsuse cases
Standard
& other SME Partners
Thanks
Marco BrambillaPolitecnico di Milano
@marcobrambi