SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
Re-Implementing Apache Thrift using
Model-Driven Engineering Technologies:
An Experience Report
Sina Madani and Dimitris Kolovos
Department of Computer Science
University of York
{sm1748, dimitris.kolovos}@york.ac.uk
S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 1/9
Motivation
Several experience reports on applications of MDE in industry
Mostly based on interviews
Limited availability of “hard data”
e.g. measurements extracted by implementing the same
software with/without MDE technologies
Such data can provide useful insights and/or act as a good
marketing tool for MDE
S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 2/9
In this work . . .
We re-implemented a subset of Apache Thrift using EMF,
Xtext and Epsilon
Thrift is a web-services framework originally developed at
Facebook (http://thrift.apache.org)
Re-implementaton available in
https://github.com/SMadani/ThriftMDE/
We performed quantitative and qualitative comparison of the
two implementations
S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 3/9
Apache Thrift
Interface description language for modelling services,
input/output data types/structures (similar to CORBA’s IDL)
Several transport protocols (e.g. JSON, binary, compressed)
“Compiler” that produces client/server stubs from interface
descriptions in Java, Ruby, JavaScript etc.
Compiler implemented using flex, Bison and C++
Code generation through string concatenation (!!)
S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 4/9
MDE re-implementation of Thrift’s Compiler
Hand-crafted abstract syntax → EMF
flex, Bison → Xtext
Model validation in C++ → OCL-like constraints
Implemented using the Epsilon Validation Language (EVL)
Concatenation-based code generators → Template-based code
generators
Implemented using the Epsilon Generation Language (EGL)
Only re-implemented code generators for Ruby and Java
To enable automated equivalence testing we produce identical
code (including bugs)
S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 5/9
Quantitative Evaluation: Lines of Code
Implementation Original MDE Difference
Language definition
(parsing & validation)
3,419 447 -87%
Language-neutral
code
712 1,036 +68%
Java generator 5,129 2,224 -57%
Ruby generator 1,231 422 -66%
Total 10,491 4,149 -60%
Remarks
We only counted hand-written code for both implementations
(i.e. excluded code generated by flex, Bison, EMF and Xtext)
S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 6/9
Quantitative Evaluation: KBs (characters)
Implementation Original MDE Difference
Language definition
(parsing & validation)
105 14 -87%
Language-neutral
code
22 26 +15%
Java generator 187 73 -61%
Ruby generator 40 14 -65%
Total 395 128 -68%
S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 7/9
Qualitative Evaluation
The MDE implementation is more modular
Code generation is split over a number of templates for each
language vs. all in one class in the current implementation
Validation logic is contained in a set of EVL constraints vs.
being spread across the codebase
Xtext is significantly more concise than flex and Bison
Using a template-based code generation language
Reduced the accidental complexity of string concatenation
Made little difference in terms of the complexity of the output
computation logic
S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 8/9
Conclusions and Further Work
The MDE re-implementation is significantly more concise
(60-70%)
To argue about maintainability we need to conduct
experiments involving developers
Xtext is a significant improvement over flex and Bison
A template-based code generation language is more concise
but does not reduce the complexity of the code generator
Irreducable essential complexity?
Our conclusions are based on one data point
Need to repeat this exercise with additional software to build
confidence (e.g. Google Protocol Buffers?)
S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 9/9

Más contenido relacionado

Similar a Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An Experience Report

Towards Design-space Exploration of Component Chains in Vehicle Software
Towards Design-space Exploration of Component Chains in Vehicle SoftwareTowards Design-space Exploration of Component Chains in Vehicle Software
Towards Design-space Exploration of Component Chains in Vehicle SoftwareAlessio Bucaioni
 
Spark-MPI: Approaching the Fifth Paradigm with Nikolay Malitsky
Spark-MPI: Approaching the Fifth Paradigm with Nikolay MalitskySpark-MPI: Approaching the Fifth Paradigm with Nikolay Malitsky
Spark-MPI: Approaching the Fifth Paradigm with Nikolay MalitskyDatabricks
 
Towards Logic Programming as a Service: Experiments in tuProlog
Towards Logic Programming as a Service: Experiments in tuPrologTowards Logic Programming as a Service: Experiments in tuProlog
Towards Logic Programming as a Service: Experiments in tuPrologAndrea Omicini
 
Supporting software documentation with source code summarization
Supporting software documentation with source code summarization Supporting software documentation with source code summarization
Supporting software documentation with source code summarization Ra'Fat Al-Msie'deen
 
Ahmed Kamal - Software Development Expert
Ahmed Kamal - Software Development ExpertAhmed Kamal - Software Development Expert
Ahmed Kamal - Software Development ExpertAhmed Kamal
 
A Study on MDE Approaches for Engineering Wireless Sensor Networks
A Study on MDE Approaches  for Engineering Wireless Sensor Networks A Study on MDE Approaches  for Engineering Wireless Sensor Networks
A Study on MDE Approaches for Engineering Wireless Sensor Networks Ivano Malavolta
 
Model-Driven Development of Web Applications
Model-Driven Development of Web ApplicationsModel-Driven Development of Web Applications
Model-Driven Development of Web Applicationsidescitation
 
Software Testing (in Scala): A Practitioner's Survey (Quickly)
Software Testing (in Scala): A Practitioner's Survey (Quickly)Software Testing (in Scala): A Practitioner's Survey (Quickly)
Software Testing (in Scala): A Practitioner's Survey (Quickly)Roberto Casadei
 
Rajas mhaskar resume2k19
Rajas mhaskar resume2k19Rajas mhaskar resume2k19
Rajas mhaskar resume2k19Rajas Mhaskar
 
resume_anuj_sharma
resume_anuj_sharmaresume_anuj_sharma
resume_anuj_sharmaAnuj Sharma
 
Guia 2-examen-de-ingles
Guia 2-examen-de-inglesGuia 2-examen-de-ingles
Guia 2-examen-de-inglesLiz Castro B
 
Monitoring and Operational Data Analytics from a User Perspective at First Eu...
Monitoring and Operational Data Analytics from a User Perspective at First Eu...Monitoring and Operational Data Analytics from a User Perspective at First Eu...
Monitoring and Operational Data Analytics from a User Perspective at First Eu...University of Maribor
 
The Simple Assembly Line Balancing Problem
The Simple Assembly Line Balancing ProblemThe Simple Assembly Line Balancing Problem
The Simple Assembly Line Balancing ProblemNicole Wells
 
STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages ijseajournal
 

Similar a Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An Experience Report (20)

Towards Design-space Exploration of Component Chains in Vehicle Software
Towards Design-space Exploration of Component Chains in Vehicle SoftwareTowards Design-space Exploration of Component Chains in Vehicle Software
Towards Design-space Exploration of Component Chains in Vehicle Software
 
Spark-MPI: Approaching the Fifth Paradigm with Nikolay Malitsky
Spark-MPI: Approaching the Fifth Paradigm with Nikolay MalitskySpark-MPI: Approaching the Fifth Paradigm with Nikolay Malitsky
Spark-MPI: Approaching the Fifth Paradigm with Nikolay Malitsky
 
Towards Logic Programming as a Service: Experiments in tuProlog
Towards Logic Programming as a Service: Experiments in tuPrologTowards Logic Programming as a Service: Experiments in tuProlog
Towards Logic Programming as a Service: Experiments in tuProlog
 
Supporting software documentation with source code summarization
Supporting software documentation with source code summarization Supporting software documentation with source code summarization
Supporting software documentation with source code summarization
 
Kshama_Parakh
Kshama_ParakhKshama_Parakh
Kshama_Parakh
 
Ahmed Kamal - Software Development Expert
Ahmed Kamal - Software Development ExpertAhmed Kamal - Software Development Expert
Ahmed Kamal - Software Development Expert
 
Ijetcas14 533
Ijetcas14 533Ijetcas14 533
Ijetcas14 533
 
A Study on MDE Approaches for Engineering Wireless Sensor Networks
A Study on MDE Approaches  for Engineering Wireless Sensor Networks A Study on MDE Approaches  for Engineering Wireless Sensor Networks
A Study on MDE Approaches for Engineering Wireless Sensor Networks
 
Industrial Training report on java
Industrial  Training report on javaIndustrial  Training report on java
Industrial Training report on java
 
Model-Driven Development of Web Applications
Model-Driven Development of Web ApplicationsModel-Driven Development of Web Applications
Model-Driven Development of Web Applications
 
Software Testing (in Scala): A Practitioner's Survey (Quickly)
Software Testing (in Scala): A Practitioner's Survey (Quickly)Software Testing (in Scala): A Practitioner's Survey (Quickly)
Software Testing (in Scala): A Practitioner's Survey (Quickly)
 
Ashutosh's resume
Ashutosh's resumeAshutosh's resume
Ashutosh's resume
 
Rajas mhaskar resume2k19
Rajas mhaskar resume2k19Rajas mhaskar resume2k19
Rajas mhaskar resume2k19
 
resume_anuj_sharma
resume_anuj_sharmaresume_anuj_sharma
resume_anuj_sharma
 
Guia 2-examen-de-ingles
Guia 2-examen-de-inglesGuia 2-examen-de-ingles
Guia 2-examen-de-ingles
 
Ashutosh's resume (3)
Ashutosh's resume (3)Ashutosh's resume (3)
Ashutosh's resume (3)
 
Monitoring and Operational Data Analytics from a User Perspective at First Eu...
Monitoring and Operational Data Analytics from a User Perspective at First Eu...Monitoring and Operational Data Analytics from a User Perspective at First Eu...
Monitoring and Operational Data Analytics from a User Perspective at First Eu...
 
TripathiAkriti_resume
TripathiAkriti_resumeTripathiAkriti_resume
TripathiAkriti_resume
 
The Simple Assembly Line Balancing Problem
The Simple Assembly Line Balancing ProblemThe Simple Assembly Line Balancing Problem
The Simple Assembly Line Balancing Problem
 
STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages STATICMOCK : A Mock Object Framework for Compiled Languages
STATICMOCK : A Mock Object Framework for Compiled Languages
 

Más de Dimitris Kolovos

Picto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T TransformationPicto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T TransformationDimitris Kolovos
 
The Epsilon Pattern Language
The Epsilon Pattern LanguageThe Epsilon Pattern Language
The Epsilon Pattern LanguageDimitris Kolovos
 
Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...
Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...
Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...Dimitris Kolovos
 
Partial Loading of XMI Models
Partial Loading of XMI ModelsPartial Loading of XMI Models
Partial Loading of XMI ModelsDimitris Kolovos
 
Merging Models with the Epsilon Merging Language - A Decade Later
Merging Models with the Epsilon Merging Language - A Decade LaterMerging Models with the Epsilon Merging Language - A Decade Later
Merging Models with the Epsilon Merging Language - A Decade LaterDimitris Kolovos
 
Assessing the Use of Eclipse MDE Technologies in Open-Source Software Projects
Assessing the Use of Eclipse MDE Technologies in Open-Source Software ProjectsAssessing the Use of Eclipse MDE Technologies in Open-Source Software Projects
Assessing the Use of Eclipse MDE Technologies in Open-Source Software ProjectsDimitris Kolovos
 
Code Generation as a Service
Code Generation as a ServiceCode Generation as a Service
Code Generation as a ServiceDimitris Kolovos
 
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)Dimitris Kolovos
 
Eclipse Modellng Forums: Looking at the Data
Eclipse Modellng Forums: Looking at the DataEclipse Modellng Forums: Looking at the Data
Eclipse Modellng Forums: Looking at the DataDimitris Kolovos
 
Programmatic Muddle Management
Programmatic Muddle ManagementProgrammatic Muddle Management
Programmatic Muddle ManagementDimitris Kolovos
 
Managing XML documents with Epsilon
Managing XML documents with EpsilonManaging XML documents with Epsilon
Managing XML documents with EpsilonDimitris Kolovos
 
COMPASS Early Safety Warning System (ESWS)
COMPASS Early Safety Warning System (ESWS)COMPASS Early Safety Warning System (ESWS)
COMPASS Early Safety Warning System (ESWS)Dimitris Kolovos
 

Más de Dimitris Kolovos (14)

Picto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T TransformationPicto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T Transformation
 
The Epsilon Pattern Language
The Epsilon Pattern LanguageThe Epsilon Pattern Language
The Epsilon Pattern Language
 
Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...
Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...
Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...
 
Partial Loading of XMI Models
Partial Loading of XMI ModelsPartial Loading of XMI Models
Partial Loading of XMI Models
 
Merging Models with the Epsilon Merging Language - A Decade Later
Merging Models with the Epsilon Merging Language - A Decade LaterMerging Models with the Epsilon Merging Language - A Decade Later
Merging Models with the Epsilon Merging Language - A Decade Later
 
Assessing the Use of Eclipse MDE Technologies in Open-Source Software Projects
Assessing the Use of Eclipse MDE Technologies in Open-Source Software ProjectsAssessing the Use of Eclipse MDE Technologies in Open-Source Software Projects
Assessing the Use of Eclipse MDE Technologies in Open-Source Software Projects
 
Code Generation as a Service
Code Generation as a ServiceCode Generation as a Service
Code Generation as a Service
 
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
 
Eclipse Modellng Forums: Looking at the Data
Eclipse Modellng Forums: Looking at the DataEclipse Modellng Forums: Looking at the Data
Eclipse Modellng Forums: Looking at the Data
 
Programmatic Muddle Management
Programmatic Muddle ManagementProgrammatic Muddle Management
Programmatic Muddle Management
 
Managing XML documents with Epsilon
Managing XML documents with EpsilonManaging XML documents with Epsilon
Managing XML documents with Epsilon
 
Epsilon
EpsilonEpsilon
Epsilon
 
COMPASS Early Safety Warning System (ESWS)
COMPASS Early Safety Warning System (ESWS)COMPASS Early Safety Warning System (ESWS)
COMPASS Early Safety Warning System (ESWS)
 
Eugenia
EugeniaEugenia
Eugenia
 

Último

Probability.pptx, Types of Probability, UG
Probability.pptx, Types of Probability, UGProbability.pptx, Types of Probability, UG
Probability.pptx, Types of Probability, UGSoniaBajaj10
 
Environmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptxEnvironmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptxpriyankatabhane
 
The Sensory Organs, Anatomy and Function
The Sensory Organs, Anatomy and FunctionThe Sensory Organs, Anatomy and Function
The Sensory Organs, Anatomy and FunctionJadeNovelo1
 
CHROMATOGRAPHY PALLAVI RAWAT.pptx
CHROMATOGRAPHY  PALLAVI RAWAT.pptxCHROMATOGRAPHY  PALLAVI RAWAT.pptx
CHROMATOGRAPHY PALLAVI RAWAT.pptxpallavirawat456
 
dll general biology week 1 - Copy.docx
dll general biology   week 1 - Copy.docxdll general biology   week 1 - Copy.docx
dll general biology week 1 - Copy.docxkarenmillo
 
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptxGENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptxRitchAndruAgustin
 
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer Zahana
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer ZahanaEGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer Zahana
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer ZahanaDr.Mahmoud Abbas
 
Timeless Cosmology: Towards a Geometric Origin of Cosmological Correlations
Timeless Cosmology: Towards a Geometric Origin of Cosmological CorrelationsTimeless Cosmology: Towards a Geometric Origin of Cosmological Correlations
Timeless Cosmology: Towards a Geometric Origin of Cosmological CorrelationsDanielBaumann11
 
Total Legal: A “Joint” Journey into the Chemistry of Cannabinoids
Total Legal: A “Joint” Journey into the Chemistry of CannabinoidsTotal Legal: A “Joint” Journey into the Chemistry of Cannabinoids
Total Legal: A “Joint” Journey into the Chemistry of CannabinoidsMarkus Roggen
 
final waves properties grade 7 - third quarter
final waves properties grade 7 - third quarterfinal waves properties grade 7 - third quarter
final waves properties grade 7 - third quarterHanHyoKim
 
Observational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsObservational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsSérgio Sacani
 
Observation of Gravitational Waves from the Coalescence of a 2.5–4.5 M⊙ Compa...
Observation of Gravitational Waves from the Coalescence of a 2.5–4.5 M⊙ Compa...Observation of Gravitational Waves from the Coalescence of a 2.5–4.5 M⊙ Compa...
Observation of Gravitational Waves from the Coalescence of a 2.5–4.5 M⊙ Compa...Sérgio Sacani
 
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika Das
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika DasBACTERIAL DEFENSE SYSTEM by Dr. Chayanika Das
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika DasChayanika Das
 
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests GlycosidesGLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests GlycosidesNandakishor Bhaurao Deshmukh
 
whole genome sequencing new and its types including shortgun and clone by clone
whole genome sequencing new  and its types including shortgun and clone by clonewhole genome sequencing new  and its types including shortgun and clone by clone
whole genome sequencing new and its types including shortgun and clone by clonechaudhary charan shingh university
 
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary Microbiology
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary MicrobiologyLAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary Microbiology
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary MicrobiologyChayanika Das
 
Advances in AI-driven Image Recognition for Early Detection of Cancer
Advances in AI-driven Image Recognition for Early Detection of CancerAdvances in AI-driven Image Recognition for Early Detection of Cancer
Advances in AI-driven Image Recognition for Early Detection of CancerLuis Miguel Chong Chong
 
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdf
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdfKDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdf
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdfGABYFIORELAMALPARTID1
 

Último (20)

PLASMODIUM. PPTX
PLASMODIUM. PPTXPLASMODIUM. PPTX
PLASMODIUM. PPTX
 
Probability.pptx, Types of Probability, UG
Probability.pptx, Types of Probability, UGProbability.pptx, Types of Probability, UG
Probability.pptx, Types of Probability, UG
 
Environmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptxEnvironmental acoustics- noise criteria.pptx
Environmental acoustics- noise criteria.pptx
 
The Sensory Organs, Anatomy and Function
The Sensory Organs, Anatomy and FunctionThe Sensory Organs, Anatomy and Function
The Sensory Organs, Anatomy and Function
 
CHROMATOGRAPHY PALLAVI RAWAT.pptx
CHROMATOGRAPHY  PALLAVI RAWAT.pptxCHROMATOGRAPHY  PALLAVI RAWAT.pptx
CHROMATOGRAPHY PALLAVI RAWAT.pptx
 
Ultrastructure and functions of Chloroplast.pptx
Ultrastructure and functions of Chloroplast.pptxUltrastructure and functions of Chloroplast.pptx
Ultrastructure and functions of Chloroplast.pptx
 
dll general biology week 1 - Copy.docx
dll general biology   week 1 - Copy.docxdll general biology   week 1 - Copy.docx
dll general biology week 1 - Copy.docx
 
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptxGENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
GENERAL PHYSICS 2 REFRACTION OF LIGHT SENIOR HIGH SCHOOL GENPHYS2.pptx
 
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer Zahana
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer ZahanaEGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer Zahana
EGYPTIAN IMPRINT IN SPAIN Lecture by Dr Abeer Zahana
 
Timeless Cosmology: Towards a Geometric Origin of Cosmological Correlations
Timeless Cosmology: Towards a Geometric Origin of Cosmological CorrelationsTimeless Cosmology: Towards a Geometric Origin of Cosmological Correlations
Timeless Cosmology: Towards a Geometric Origin of Cosmological Correlations
 
Total Legal: A “Joint” Journey into the Chemistry of Cannabinoids
Total Legal: A “Joint” Journey into the Chemistry of CannabinoidsTotal Legal: A “Joint” Journey into the Chemistry of Cannabinoids
Total Legal: A “Joint” Journey into the Chemistry of Cannabinoids
 
final waves properties grade 7 - third quarter
final waves properties grade 7 - third quarterfinal waves properties grade 7 - third quarter
final waves properties grade 7 - third quarter
 
Observational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive starsObservational constraints on mergers creating magnetism in massive stars
Observational constraints on mergers creating magnetism in massive stars
 
Observation of Gravitational Waves from the Coalescence of a 2.5–4.5 M⊙ Compa...
Observation of Gravitational Waves from the Coalescence of a 2.5–4.5 M⊙ Compa...Observation of Gravitational Waves from the Coalescence of a 2.5–4.5 M⊙ Compa...
Observation of Gravitational Waves from the Coalescence of a 2.5–4.5 M⊙ Compa...
 
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika Das
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika DasBACTERIAL DEFENSE SYSTEM by Dr. Chayanika Das
BACTERIAL DEFENSE SYSTEM by Dr. Chayanika Das
 
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests GlycosidesGLYCOSIDES Classification Of GLYCOSIDES  Chemical Tests Glycosides
GLYCOSIDES Classification Of GLYCOSIDES Chemical Tests Glycosides
 
whole genome sequencing new and its types including shortgun and clone by clone
whole genome sequencing new  and its types including shortgun and clone by clonewhole genome sequencing new  and its types including shortgun and clone by clone
whole genome sequencing new and its types including shortgun and clone by clone
 
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary Microbiology
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary MicrobiologyLAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary Microbiology
LAMP PCR.pptx by Dr. Chayanika Das, Ph.D, Veterinary Microbiology
 
Advances in AI-driven Image Recognition for Early Detection of Cancer
Advances in AI-driven Image Recognition for Early Detection of CancerAdvances in AI-driven Image Recognition for Early Detection of Cancer
Advances in AI-driven Image Recognition for Early Detection of Cancer
 
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdf
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdfKDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdf
KDIGO-2023-CKD-Guideline-Public-Review-Draft_5-July-2023.pdf
 

Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An Experience Report

  • 1. Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An Experience Report Sina Madani and Dimitris Kolovos Department of Computer Science University of York {sm1748, dimitris.kolovos}@york.ac.uk S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 1/9
  • 2. Motivation Several experience reports on applications of MDE in industry Mostly based on interviews Limited availability of “hard data” e.g. measurements extracted by implementing the same software with/without MDE technologies Such data can provide useful insights and/or act as a good marketing tool for MDE S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 2/9
  • 3. In this work . . . We re-implemented a subset of Apache Thrift using EMF, Xtext and Epsilon Thrift is a web-services framework originally developed at Facebook (http://thrift.apache.org) Re-implementaton available in https://github.com/SMadani/ThriftMDE/ We performed quantitative and qualitative comparison of the two implementations S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 3/9
  • 4. Apache Thrift Interface description language for modelling services, input/output data types/structures (similar to CORBA’s IDL) Several transport protocols (e.g. JSON, binary, compressed) “Compiler” that produces client/server stubs from interface descriptions in Java, Ruby, JavaScript etc. Compiler implemented using flex, Bison and C++ Code generation through string concatenation (!!) S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 4/9
  • 5. MDE re-implementation of Thrift’s Compiler Hand-crafted abstract syntax → EMF flex, Bison → Xtext Model validation in C++ → OCL-like constraints Implemented using the Epsilon Validation Language (EVL) Concatenation-based code generators → Template-based code generators Implemented using the Epsilon Generation Language (EGL) Only re-implemented code generators for Ruby and Java To enable automated equivalence testing we produce identical code (including bugs) S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 5/9
  • 6. Quantitative Evaluation: Lines of Code Implementation Original MDE Difference Language definition (parsing & validation) 3,419 447 -87% Language-neutral code 712 1,036 +68% Java generator 5,129 2,224 -57% Ruby generator 1,231 422 -66% Total 10,491 4,149 -60% Remarks We only counted hand-written code for both implementations (i.e. excluded code generated by flex, Bison, EMF and Xtext) S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 6/9
  • 7. Quantitative Evaluation: KBs (characters) Implementation Original MDE Difference Language definition (parsing & validation) 105 14 -87% Language-neutral code 22 26 +15% Java generator 187 73 -61% Ruby generator 40 14 -65% Total 395 128 -68% S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 7/9
  • 8. Qualitative Evaluation The MDE implementation is more modular Code generation is split over a number of templates for each language vs. all in one class in the current implementation Validation logic is contained in a set of EVL constraints vs. being spread across the codebase Xtext is significantly more concise than flex and Bison Using a template-based code generation language Reduced the accidental complexity of string concatenation Made little difference in terms of the complexity of the output computation logic S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 8/9
  • 9. Conclusions and Further Work The MDE re-implementation is significantly more concise (60-70%) To argue about maintainability we need to conduct experiments involving developers Xtext is a significant improvement over flex and Bison A template-based code generation language is more concise but does not reduce the complexity of the code generator Irreducable essential complexity? Our conclusions are based on one data point Need to repeat this exercise with additional software to build confidence (e.g. Google Protocol Buffers?) S. Madani et. al. – OCL Workshop 2016 September 14, 2016 – Slide 9/9