SlideShare a Scribd company logo
1 of 15
MICROSERVICES
SERVICE VERSIONING
DMYTRO BRAZHNYK
MARCH 05, 2018
2CONFIDENTIAL
AGENDA
Why do we need Versioning1
Different schemas for Versioning2
Specifics of Versioning for Services3
Example of Service API Versioning used for Zero-Down-Time Deployment4
3CONFIDENTIAL
Why do we need Versioning
Software versioning is the process of assigning either unique version
names or unique version numbers to unique states of computer
software, mostly used for compatibility. [wiki]
https://en.wikipedia.org/wiki/Software_versioning
Examples of Versioning Schemas:
- Semver
- Maven Versioning Numbers
- Debian Versioning Policy
- Microsoft Assembly Versioning
Service Versioning is subset of Software Versioning, can be compares with
Library versioning
Software Versioning is often used to indicate degree
of compatibility
4CONFIDENTIAL
SEMVER Explained
https://semver.org/
Semantic Versioning , proposed by Tom Preston-Werner, inventor of Gravatars, is
a formal convention for specifying compatibility using a three-part version
number: major version; minor version; and patch.
Format: <major>.<minor>.<patch>
<major> - when you make incompatible API changes,
<minor> - when you add functionality in a backwards-compatible manner
<patch> - when you make backwards-compatible bug fixes.
Examples: 2.1.4
3.5.1
3.5.2
5CONFIDENTIAL
Maven Version Numbers Explained
https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm
Maven Version Number – versioning schema used by maven to
simplify your dependency management workload.
Maven 3 Example:
https://maven.apache.org/docs/history.html
3.5-SNAPSHOT
3.5.0-beta-1
3.5.1
Format:
<major>.<minor>.<incremental>([ -<qualififer> ] | [ -<build> ])
6CONFIDENTIAL
Microsoft Assembly Versioning
Maven Assembly Versioning – used by .NET CLR to manage
dependencies between assemblies
https://docs.microsoft.com/en-us/dotnet/framework/app-domains/assembly-versioning
Format:
<major version>.<minor version>.<build number>.<revision>
Example: 1.5.1254.0
7CONFIDENTIAL
Versioning and API
Components interacts with each other through interfaces1
Version of API and Version of Implementation is not the same2
Compatibility is dependent on API3
API Type Examples:
API Library
Network API
Application Binary Interface
etc
Examples:
API is Implementation: Struts, Guava
API is not Implementation: Servlet API
8CONFIDENTIAL
Services and Libraries Comparison
Provides functionalities for use/reuse1
Provides access through API2
Compatibility is important3
Similarities
Library embedded by client,
While Service is Deployed by providers.
1
Library client can embed multiple
versions of the same library.
Example: OSGI, JIGSAW
3
Differences
Service Consumer can’t ignore
changes made by provider
2
Service Provide can expose multiple
versions of API on the same service.
4
9CONFIDENTIAL
Service Versioning Practices
Service Binary Versioning and Service API Version is not the same.1
Same service can provides multiple API of different versions2
Support of multiple major API versions can be used to get backward
compatibility.
3
Consider forward compatibility on consumer side, as well as backward
compatibility on provider side.
4
Semver is useful for Service API Versioning5
Minor version doesn’t make any sense for Service API.6
10CONFIDENTIAL
Example of REST API Versioning Approaches
Using HTTP Header:
Request HTTP Header:
Accept: application/vnd.acme.*-v1+json
Response HTTP Header:
Content-Type: application/vnd.acme.customer-v1+json
Unsupported Version Error :
415 HTTP status code for an unsupported version request
Using URL:
http://example.org/service/v1/actors/1
RestfulPragmatic
http://www.lexicalscope.com/blog/2012/03/12/how-are-rest-apis-versioned/
11CONFIDENTIAL
Example of Service API versioning for Echo ZDT
ServiceServiceService ASG
REST V1
BUSINESS CODE
ServiceServiceService ASG
REST V2REST V1
BUSINESS CODE
*ASG – auto scaling group
CONSUMER OF SERVICE CONSUMER OF SERVICE
DATABASE
LOAD BALANCER
LOAD BALANCER
REST-APIV1
Calls
REST Calls
are Disabled
REST V1
REST V2
REST-APIV2
Calls
NewVersionof
Service
BaselineVersionof
Service
REST Calls
are Disabled
REST Calls
are Enabled
NewVersionof
Consumer
BaselineVersionof
Consumer
Red are Rest API calls, which are enabled on Load-Balancer side
Black are Rest API calls, which are disabled on Load-Balancer side
Green are REST API calls of Version 2
Blue are REST API calls of Version 1
Dashed are channels, which either could be enabled or disabled channels, but assumed to be not
used
Two version of service deployed during
ZDT transition phase.
1
Multiple versions of API is used to get
backward compatibility.
3
APIs not compatible – used different major
versions
4
Old service support only API version, while
new two versions of API.
2
PoC to assess ZDT:
12CONFIDENTIAL
Sequence Diagram of Echo ZDT Example
Spring MVC
@RestController
EchoResourceV1ImplUser
Spring MVC
@RestController
EchoResourceV2Impl
@Service
EchoService
Request via depracted URL V1 invoke doBusiness()
returns Business Entity
Return EchoDTO in JSON format
uses depracted properties
Request via URL V2 invoke doBusiness()
returns Business Entity
Return EchoDTO in JSON format
uses new properties
EchoDTO
@Depracated
-oldPayloadProperty
-newPayloadProperty
Samemethodwithsame
argumentlistisinvoked
13CONFIDENTIAL
Sequence Diagram of Echo ZDT Example
14CONFIDENTIAL
Sequence Diagram of Echo ZDT Example
15CONFIDENTIAL
Contacts
Dmytro Brazhnyk
Mail: dmytro_brazhnyk@epam.com
amid.ukr@gmail.com
dmytro@brazhnyk.org
Skype: amid.ukr
Thank You!

More Related Content

What's hot

What's hot (10)

Mule esb–api layer
Mule esb–api layerMule esb–api layer
Mule esb–api layer
 
Implementation web api
Implementation web apiImplementation web api
Implementation web api
 
Angular 11 – everything you need to know
Angular 11 – everything you need to knowAngular 11 – everything you need to know
Angular 11 – everything you need to know
 
Salesforce APIs
Salesforce APIsSalesforce APIs
Salesforce APIs
 
Cloud linux’s recent integration of php 5.5 alpha 2 version
Cloud linux’s recent integration of php 5.5 alpha 2 versionCloud linux’s recent integration of php 5.5 alpha 2 version
Cloud linux’s recent integration of php 5.5 alpha 2 version
 
CF, J2EE and G3
CF, J2EE and G3CF, J2EE and G3
CF, J2EE and G3
 
Mule soft meetup_noida_jan_2022
Mule soft meetup_noida_jan_2022Mule soft meetup_noida_jan_2022
Mule soft meetup_noida_jan_2022
 
Comparison Between Angular 11 vs 12 vs 13.pdf
Comparison Between Angular 11 vs 12 vs 13.pdfComparison Between Angular 11 vs 12 vs 13.pdf
Comparison Between Angular 11 vs 12 vs 13.pdf
 
WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021
 
[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager
[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager
[WSO2Con Asia 2018] Managing API Integrations with WSO2 API Manager
 

Similar to Microservices service versioning (By Dmytro Brazhnyk)

REST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxREST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptx
Jason452803
 
Scalable Deployment Patterns in WSO2 API Manager
Scalable Deployment Patterns in WSO2 API Manager Scalable Deployment Patterns in WSO2 API Manager
Scalable Deployment Patterns in WSO2 API Manager
WSO2
 
B. Proprietary APIs (Application Program Interface) for security is .pdf
B. Proprietary APIs (Application Program Interface) for security is .pdfB. Proprietary APIs (Application Program Interface) for security is .pdf
B. Proprietary APIs (Application Program Interface) for security is .pdf
apoorvikamobileworld
 

Similar to Microservices service versioning (By Dmytro Brazhnyk) (20)

apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhu
apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhuapidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhu
apidays LIVE Hong Kong - Orchestrating APIs at Scale by Hieu Nguyen Nhu
 
Apidays Paris 2023 - Real-Life REST API Versioning, Alexandre Touret, Worldline
Apidays Paris 2023 - Real-Life REST API Versioning, Alexandre Touret, WorldlineApidays Paris 2023 - Real-Life REST API Versioning, Alexandre Touret, Worldline
Apidays Paris 2023 - Real-Life REST API Versioning, Alexandre Touret, Worldline
 
Mount tech
Mount techMount tech
Mount tech
 
Cim smash 500_prog
Cim smash 500_progCim smash 500_prog
Cim smash 500_prog
 
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
 
MuleSoft CloudHub API Versioning
MuleSoft CloudHub API VersioningMuleSoft CloudHub API Versioning
MuleSoft CloudHub API Versioning
 
WEB API Gateway
WEB API GatewayWEB API Gateway
WEB API Gateway
 
Soap toolkits
Soap toolkitsSoap toolkits
Soap toolkits
 
REST API Guidelines.pdf
REST API Guidelines.pdfREST API Guidelines.pdf
REST API Guidelines.pdf
 
WebSDK - Switching between service providers
WebSDK - Switching between service providersWebSDK - Switching between service providers
WebSDK - Switching between service providers
 
REST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxREST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptx
 
SRV307_Operating Your Serverless API at Scale
SRV307_Operating Your Serverless API at ScaleSRV307_Operating Your Serverless API at Scale
SRV307_Operating Your Serverless API at Scale
 
Best practices and advantages of REST APIs
Best practices and advantages of REST APIsBest practices and advantages of REST APIs
Best practices and advantages of REST APIs
 
MuleSoft certified platform architect-level 1 Real Exam Questions
MuleSoft certified platform architect-level 1 Real Exam QuestionsMuleSoft certified platform architect-level 1 Real Exam Questions
MuleSoft certified platform architect-level 1 Real Exam Questions
 
Transform Digital Business with DevOps
Transform Digital Business with DevOpsTransform Digital Business with DevOps
Transform Digital Business with DevOps
 
Oracle RightNow Customer Portal Migration
Oracle RightNow Customer Portal MigrationOracle RightNow Customer Portal Migration
Oracle RightNow Customer Portal Migration
 
Scalable Deployment Patterns in WSO2 API Manager
Scalable Deployment Patterns in WSO2 API Manager Scalable Deployment Patterns in WSO2 API Manager
Scalable Deployment Patterns in WSO2 API Manager
 
B. Proprietary APIs (Application Program Interface) for security is .pdf
B. Proprietary APIs (Application Program Interface) for security is .pdfB. Proprietary APIs (Application Program Interface) for security is .pdf
B. Proprietary APIs (Application Program Interface) for security is .pdf
 
MuleSoft Certified Platform Architect Exam Dumps 2023.pdf
MuleSoft Certified Platform Architect Exam Dumps 2023.pdfMuleSoft Certified Platform Architect Exam Dumps 2023.pdf
MuleSoft Certified Platform Architect Exam Dumps 2023.pdf
 
A Comprehensive Guide Of API Development.pdf
A Comprehensive Guide Of API Development.pdfA Comprehensive Guide Of API Development.pdf
A Comprehensive Guide Of API Development.pdf
 

More from Katherine Golovinova

More from Katherine Golovinova (20)

Contract-based Testing Approach as a Tool for Shift Lef
Contract-based Testing Approach as a Tool for Shift LefContract-based Testing Approach as a Tool for Shift Lef
Contract-based Testing Approach as a Tool for Shift Lef
 
Speed up application testing with azure container instances
Speed up application testing with azure container instancesSpeed up application testing with azure container instances
Speed up application testing with azure container instances
 
Analyzing application activities with KSQL and Elasticsearch
Analyzing application activities with KSQL and ElasticsearchAnalyzing application activities with KSQL and Elasticsearch
Analyzing application activities with KSQL and Elasticsearch
 
Testing Big Data solutions fast and furiously
Testing Big Data solutions fast and furiouslyTesting Big Data solutions fast and furiously
Testing Big Data solutions fast and furiously
 
"Fast & Fail in real life of DevTestSecOps"
"Fast & Fail in real life of DevTestSecOps""Fast & Fail in real life of DevTestSecOps"
"Fast & Fail in real life of DevTestSecOps"
 
Geodistributed databases - what, how, and why?
Geodistributed databases - what, how, and why?Geodistributed databases - what, how, and why?
Geodistributed databases - what, how, and why?
 
COSMOS DB - geodistributed database for anyone
COSMOS DB - geodistributed database for anyoneCOSMOS DB - geodistributed database for anyone
COSMOS DB - geodistributed database for anyone
 
Migrating from a monolith to microservices – is it worth it?
Migrating from a monolith to microservices – is it worth it?Migrating from a monolith to microservices – is it worth it?
Migrating from a monolith to microservices – is it worth it?
 
Azure Functions - the evolution of microservices platform or marketing gibber...
Azure Functions - the evolution of microservices platform or marketing gibber...Azure Functions - the evolution of microservices platform or marketing gibber...
Azure Functions - the evolution of microservices platform or marketing gibber...
 
Gatling and Page Object: a way to performance testing
Gatling and Page Object: a way to performance testingGatling and Page Object: a way to performance testing
Gatling and Page Object: a way to performance testing
 
Automation of Security scanning easy or cheese
Automation of Security scanning easy or cheeseAutomation of Security scanning easy or cheese
Automation of Security scanning easy or cheese
 
Gradle plugins for Test Automation
Gradle plugins for Test AutomationGradle plugins for Test Automation
Gradle plugins for Test Automation
 
Automation world under the DevTestSecOps umbrella
Automation world under the DevTestSecOps umbrellaAutomation world under the DevTestSecOps umbrella
Automation world under the DevTestSecOps umbrella
 
"Disaster Recovery in Azure" by Viktor Kocherha
"Disaster Recovery in Azure" by Viktor Kocherha"Disaster Recovery in Azure" by Viktor Kocherha
"Disaster Recovery in Azure" by Viktor Kocherha
 
"Certified Kubernetes Administrator Exam – how it was" by Andrii Fedenishin
"Certified Kubernetes Administrator Exam – how it was" by Andrii Fedenishin"Certified Kubernetes Administrator Exam – how it was" by Andrii Fedenishin
"Certified Kubernetes Administrator Exam – how it was" by Andrii Fedenishin
 
"Modern CI/CD" by Dmytro Batiievskyi
"Modern CI/CD" by Dmytro Batiievskyi"Modern CI/CD" by Dmytro Batiievskyi
"Modern CI/CD" by Dmytro Batiievskyi
 
EPAM DevOps community meetup: Building CI/CD for microservice architecture
EPAM DevOps community meetup: Building CI/CD for microservice architectureEPAM DevOps community meetup: Building CI/CD for microservice architecture
EPAM DevOps community meetup: Building CI/CD for microservice architecture
 
EPAM DevOps community meetup: Designing bare metal Kubernetes clusters
EPAM DevOps community meetup: Designing bare metal Kubernetes clustersEPAM DevOps community meetup: Designing bare metal Kubernetes clusters
EPAM DevOps community meetup: Designing bare metal Kubernetes clusters
 
Hosting Microservices in Microsoft Azure
Hosting Microservices in Microsoft AzureHosting Microservices in Microsoft Azure
Hosting Microservices in Microsoft Azure
 
Infrastructure as Code for Azure: ARM or Terraform?
Infrastructure as Code for Azure: ARM or Terraform?Infrastructure as Code for Azure: ARM or Terraform?
Infrastructure as Code for Azure: ARM or Terraform?
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Recently uploaded (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 

Microservices service versioning (By Dmytro Brazhnyk)

  • 2. 2CONFIDENTIAL AGENDA Why do we need Versioning1 Different schemas for Versioning2 Specifics of Versioning for Services3 Example of Service API Versioning used for Zero-Down-Time Deployment4
  • 3. 3CONFIDENTIAL Why do we need Versioning Software versioning is the process of assigning either unique version names or unique version numbers to unique states of computer software, mostly used for compatibility. [wiki] https://en.wikipedia.org/wiki/Software_versioning Examples of Versioning Schemas: - Semver - Maven Versioning Numbers - Debian Versioning Policy - Microsoft Assembly Versioning Service Versioning is subset of Software Versioning, can be compares with Library versioning Software Versioning is often used to indicate degree of compatibility
  • 4. 4CONFIDENTIAL SEMVER Explained https://semver.org/ Semantic Versioning , proposed by Tom Preston-Werner, inventor of Gravatars, is a formal convention for specifying compatibility using a three-part version number: major version; minor version; and patch. Format: <major>.<minor>.<patch> <major> - when you make incompatible API changes, <minor> - when you add functionality in a backwards-compatible manner <patch> - when you make backwards-compatible bug fixes. Examples: 2.1.4 3.5.1 3.5.2
  • 5. 5CONFIDENTIAL Maven Version Numbers Explained https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm Maven Version Number – versioning schema used by maven to simplify your dependency management workload. Maven 3 Example: https://maven.apache.org/docs/history.html 3.5-SNAPSHOT 3.5.0-beta-1 3.5.1 Format: <major>.<minor>.<incremental>([ -<qualififer> ] | [ -<build> ])
  • 6. 6CONFIDENTIAL Microsoft Assembly Versioning Maven Assembly Versioning – used by .NET CLR to manage dependencies between assemblies https://docs.microsoft.com/en-us/dotnet/framework/app-domains/assembly-versioning Format: <major version>.<minor version>.<build number>.<revision> Example: 1.5.1254.0
  • 7. 7CONFIDENTIAL Versioning and API Components interacts with each other through interfaces1 Version of API and Version of Implementation is not the same2 Compatibility is dependent on API3 API Type Examples: API Library Network API Application Binary Interface etc Examples: API is Implementation: Struts, Guava API is not Implementation: Servlet API
  • 8. 8CONFIDENTIAL Services and Libraries Comparison Provides functionalities for use/reuse1 Provides access through API2 Compatibility is important3 Similarities Library embedded by client, While Service is Deployed by providers. 1 Library client can embed multiple versions of the same library. Example: OSGI, JIGSAW 3 Differences Service Consumer can’t ignore changes made by provider 2 Service Provide can expose multiple versions of API on the same service. 4
  • 9. 9CONFIDENTIAL Service Versioning Practices Service Binary Versioning and Service API Version is not the same.1 Same service can provides multiple API of different versions2 Support of multiple major API versions can be used to get backward compatibility. 3 Consider forward compatibility on consumer side, as well as backward compatibility on provider side. 4 Semver is useful for Service API Versioning5 Minor version doesn’t make any sense for Service API.6
  • 10. 10CONFIDENTIAL Example of REST API Versioning Approaches Using HTTP Header: Request HTTP Header: Accept: application/vnd.acme.*-v1+json Response HTTP Header: Content-Type: application/vnd.acme.customer-v1+json Unsupported Version Error : 415 HTTP status code for an unsupported version request Using URL: http://example.org/service/v1/actors/1 RestfulPragmatic http://www.lexicalscope.com/blog/2012/03/12/how-are-rest-apis-versioned/
  • 11. 11CONFIDENTIAL Example of Service API versioning for Echo ZDT ServiceServiceService ASG REST V1 BUSINESS CODE ServiceServiceService ASG REST V2REST V1 BUSINESS CODE *ASG – auto scaling group CONSUMER OF SERVICE CONSUMER OF SERVICE DATABASE LOAD BALANCER LOAD BALANCER REST-APIV1 Calls REST Calls are Disabled REST V1 REST V2 REST-APIV2 Calls NewVersionof Service BaselineVersionof Service REST Calls are Disabled REST Calls are Enabled NewVersionof Consumer BaselineVersionof Consumer Red are Rest API calls, which are enabled on Load-Balancer side Black are Rest API calls, which are disabled on Load-Balancer side Green are REST API calls of Version 2 Blue are REST API calls of Version 1 Dashed are channels, which either could be enabled or disabled channels, but assumed to be not used Two version of service deployed during ZDT transition phase. 1 Multiple versions of API is used to get backward compatibility. 3 APIs not compatible – used different major versions 4 Old service support only API version, while new two versions of API. 2 PoC to assess ZDT:
  • 12. 12CONFIDENTIAL Sequence Diagram of Echo ZDT Example Spring MVC @RestController EchoResourceV1ImplUser Spring MVC @RestController EchoResourceV2Impl @Service EchoService Request via depracted URL V1 invoke doBusiness() returns Business Entity Return EchoDTO in JSON format uses depracted properties Request via URL V2 invoke doBusiness() returns Business Entity Return EchoDTO in JSON format uses new properties EchoDTO @Depracated -oldPayloadProperty -newPayloadProperty Samemethodwithsame argumentlistisinvoked

Editor's Notes

  1. SemVer Examples where Versionings is required: Hadrware: wireless, wirefull Software: Application, Libraries, Networks, API/ABI
  2. Who introduced SEMVER?
  3. Who introduced SEMVER?
  4. Who introduced SEMVER?
  5. Method Signatur is interface Library API example – Servlet API Service API – implementation can be java or node, API the same.
  6. In terms of versioning services and libraries have lots of similarities.
  7. SOAP another example of Service API Message Queue also another example of API
  8. Zero-Down-Time Deployment what is. Simple Echo service implemented to demonstrate Zero-Downtime capabilities to deploy service with breaking changes in API.