SlideShare une entreprise Scribd logo
1  sur  47
MICROSERVICES
ON APPLICATION CONTAINER CLOUD SERVICE
Maarten Smeets
07-06-2018
@MaartenSmeetsNL
https://nl.linkedin.com/in/smeetsm
About Maarten
• Integration consultant at AMIS since 2014
• Several certifications
SOA, BPM, MCS, Java, SQL, PL/SQL,
Mule, AWS, etc
• Enthusiastic blogger
http://javaoraclesoa.blogspot.com
3 Membership Tiers
• Oracle ACE Director
• Oracle ACE
• Oracle ACE Associate
bit.ly/OracleACEProgram
500+ Technical Experts
Helping Peers Globally
Connect:
Nominate yourself or someone you know: acenomination.oracle.com
@oracleace
Facebook.com/oracleaces
oracle-ace_ww@oracle.com
MICROSERVICES ON
APPLICATION CONTAINER CLOUD SERVICE
MICROSERVICE
ARCHITECTURE
TWELVE FACTOR
APPLICATION
APPLICATION CONTAINER
CLOUD SERVICE
SPRING BOOT DOCUMENTING YOUR API
USING THE ACCS CACHE
WITH THE ACCS JAVA SDK
DEPLOYING AND RUNNING
ON ACCS
MICROSERVICE ARCHITECTURE IN THE CLOUD
MICROSERVICE ARCHITECTURE IN THE CLOUD
THE CHALLENGES ARE DIFFERENT FROM ON PREMISES
• Environment differs
Administration, connectivity
• DTAP environments
Local development / testing?
• Security
The entire world can access your services
• Scalability
TWELVE FACTOR APPLICATION
HOW
• Codebase
• One codebase tracked in revision control,
many deploys
• Dependencies
• Explicitly declare and isolate dependencies
• Config
• Store config in the environment
• Backing services
• Treat backing services as attached
resources
• Build, release, run
• Strictly separate build and run stages
• Processes
• Execute the app as one or more stateless
processes
TWELVE FACTOR APPLICATION
HOW
• Port binding
• Export services via port binding
• Concurrency
• Scale out via the process model
• Disposability
• Maximize robustness with fast startup and
graceful shutdown
• Dev/prod parity
• Keep environments as similar as possible
• Logs
• Treat logs as event streams
• Admin processes
• Run admin/management tasks as one-off
processes
MICROSERVICE ARCHITECTURE IN THE CLOUD
12 FACTOR APPLICATION: A METHODOLOGY FOR BUILDING SAAS APPS
Application Container
Cloud Service
APPLICATION CONTAINER CLOUD SERVICE
• On demand scale out/in.
Adding/Removing instances
• On demand scale up/down.
Adding/Removing memory per instance
• Automatic load balancer configuration
• One click patching
• Easy to configure service bindings
APPLICATION CONTAINER CLOUD SERVICE
IMPLEMENTING MICROSERVICES
MANY CHOICES
SPRING BOOT
BUT WHY?
• Popular
Java is very popular!
#1 TIOBE index
#3 on Stackoverflow and Github
Netflix uses it
• Performant
Spring Boot outperforms JavaScript on Node if you
do the same things
Like validation, authentication, formatting
• Rich in features
Uses Spring but with many shortcuts.
Spring provides a lot of out of the box functionality
such as integration and security
• Fast to develop
Spring Boot makes it easy to create stand-alone,
production-grade Spring based Applications that
you can "just run".
SPRING BOOT
IMPLEMENTING MICROSERVICES
Documentation
Spring Boot on Docker
Spring Boot on ACCS
Using the Application Cache
SPRING BOOT
DOCUMENTATION
• Contract first (design first)
Generate Spring Boot code using Smartbear Swaggerhub
• You can even generate code from your Maven build using swagger-codegen
https://rphgoossens.wordpress.com/2018/02/10/swagger-generation-automation-or-creating-the-bottling-line/
https://swaggerhub.com/blog/api-design/design-first-or-code-first-api-development/
SPRING BOOT
DOCUMENTATION
• Code first
Generate Swagger documentation from annotations code using
springfox.io libraries
1 2 3
Add dependencies to
pom.xml
Create Swagger
configuration class
Annotate your API’s
SPRING BOOT DOCUMENTATION
CODE FIRST
SPRING BOOT
DOCUMENTATION
• Add the SpringFox dependency to the pom.xml
SPRING BOOT
DOCUMENTATION
Which APIs to generate
documentation for
SPRING BOOT
DOCUMENTATION
Describes the API
Describes the
API operation
SPRING BOOT
DOCUMENTATION
SPRING BOOT
DOCUMENTATION
1 2
SPRING BOOT ON DOCKER
Create a Dockerfile Use dockerfile-maven-plugin
In your pom.xml
SPRING BOOT
ON DOCKER
• Get base images from public registries
• OpenJDK on Alpine Linux
https://spring.io/guides/gs/spring-boot-docker/
• Oracle JDK on Oracle Linux
+
+
http://javaoraclesoa.blogspot.com/2018/03/running-spring-boot-in-docker-container.html
SPRING BOOT
ON DOCKER
mvn package dockerfile:build
docker run -p 8081:8081 maartensmeets/accs-cache-sample:latest
https://github.com/spotify/dockerfile-maven
Dockerfile
SPRING BOOT
ON DOCKER: DIFFERENT FROM ACCS
• There is no local ACCS environment
You cannot test deployment locally
• ACCS bindings cannot be tested locally
LocalSessionProvider is available for the cache
1 2
BUILD A ZIP TO DEPLOY TO ACCS
What should be in the ZIP How do you create those files
SPRING BOOT ON ACCS
BUILD A DEPLOYABLE
ACCS Deployable ZIP
manifest.json
deployment.json
uberJAR.jar
Create with the
maven-assembly-plugin
Create with the
spring-boot-maven-plugin
SPRING BOOT ON ACCS
BUILD A DEPLOYABLE
Describes what should go in the ZIP file for ACCS
JAR + manifest.json + deployment.json
Creates a Spring Boot über JAR with
dependencies which ‘just runs’
SPRING BOOT ON ACCS
DEPLOY! MANUALLY
SPRING BOOT ON ACCS
DEPLOY! DEVELOPER CLOUD SERVICE
1 2
USING THE APPLICATION CACHE
Create an application cache How to access the cache
using the Java SDK
USING THE APPLICATION CACHE
BUT WHY?
• Share state
• Cache slow service responses
USING THE APPLICATION CACHE
Application Cache 1
Customers
Shopping
carts
Inventory
Application Cache 2
Customers
Shopping
carts
Inventory
Java SE
App 1
Java SE
App 1
Node JS
App 1
Java SE
App 3
USING THE APPLICATION CACHE
HOW FAST IS IT?
• Environment
• ACCS: 1 OCPU, 1 Gb
• Cache: 2Gb Basic
• Tested with GET request, small payload
• Average response time for 3500 requests, 20 threads, 60s
• End to end: 236ms (no significant difference REST / GRPC)
• GRPC: 5ms (1ms - 40ms)
• REST: 3ms (0ms - 70ms)
• Local: 0ms
USING THE APPLICATION CACHE
USING THE APPLICATION CACHE
USING THE APPLICATION CACHE
USING THE APPLICATION CACHE
DEPENDENCY CHALLENGES
• Java 9 lacks some libraries from previous SDK’s
Additional dependencies needed
• Additional GRPC libraries are required
USING THE APPLICATION CACHE
IN SPRING BOOT
Entity
Repository
Controller
Exposes resources / presentation
E.g. RestController
Handles connectivity / persistence / DAO
The resource
Service Service / operation
Implement cache
code
Implement logic to
use the cache or
another repository
USING THE APPLICATION CACHE
IN SPRING BOOT
• Oracle provides an open source SDK
• Java Client Caching SDK for Oracle Application Container Cloud Service
https://github.com/oracle/accs-caching-java-sdk
USING THE APPLICATION CACHE
IN SPRING BOOT
CacheRepositoryDbRepository
Service
Cache
SerializerLoader
USING THE APPLICATION CACHE
IN SPRING BOOT
• Create a SessionProvider
• Use the SessionProvider to create a Session
• Use the Session to get a Cache object
• Use the Cache object to access the cache
Can be a Local or Remote.
Remote requires an URL
The session can be REST
or gRPC (HTTP/2) based
Allows you to configure
• Expiry
Determines validity of cached objects
• Loader
This is called when there is no cache hit
• Serializer
Objects need to be serialized to be put in the cache
APPLICATION CONTAINER CLOUD SERVICE
GOOD TO KNOW
• Deployment
Sometimes old deployment ZIP files are used
Recommendation: script removing files from storage cloud
• Debugging
Can be time-consuming. A single deployment can take minutes.
• The Java Client SDK
does not provide support for a findAll method
APPLICATION CACHE
GOOD TO KNOW
• Expiry
Has issues with the LocalSessionProvider
Tip: set it to never expire
• Environment differences
Working locally is no guarantee for working in the cloud!
• Dependencies / performance
Test with both GRPC and REST. REST could be faster!
You can’t remove a cache which has bindings to applications
• Availability
During patches, updating bindings -> implement retries or error handling
WANT TO LEARN MORE?
• Java
• Complete working sample Spring Boot on ACCS with Application Cache
https://github.com/MaartenSmeets/springboot
• A sample of using the cache. Application is Jersey based (no Spring)
https://github.com/abhirockzz/app-container-cloud-cache-example
• Python
• A minimal sample of using Python on ACCS
https://github.com/MaartenSmeets/pythonscripts/tree/master/microservice-accs/minimal-sample
• An elaborate sample of using Python on ACCS
https://dzone.com/articles/deploy-a-python-application-to-oracle-application
Microservices on Application Container Cloud Service

Contenu connexe

Tendances

Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Ryan Cuprak
 
DevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous DeliveryDevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous DeliveryMikhail Prudnikov
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesAmazon Web Services
 
Cross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open SourceCross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open SourceAll Things Open
 
Accelerating Innovation with DevOps on AWS
Accelerating Innovation with DevOps on AWSAccelerating Innovation with DevOps on AWS
Accelerating Innovation with DevOps on AWSAmazon Web Services
 
Devops with Amazon Web Services (January 2017)
Devops with Amazon Web Services (January 2017)Devops with Amazon Web Services (January 2017)
Devops with Amazon Web Services (January 2017)Julien SIMON
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the CloudRyan Cuprak
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS Amazon Web Services
 
12 Ways to Supercharge Your Connect Add-on
12 Ways to Supercharge Your Connect Add-on12 Ways to Supercharge Your Connect Add-on
12 Ways to Supercharge Your Connect Add-onAtlassian
 
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...Amazon Web Services
 
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure StandardizationAmazon Web Services
 
DevOps and AWS - Code PaLOUsa 2017
DevOps and AWS  - Code PaLOUsa 2017DevOps and AWS  - Code PaLOUsa 2017
DevOps and AWS - Code PaLOUsa 2017James Strong
 
Building Search for Bitbucket Cloud
Building Search for Bitbucket CloudBuilding Search for Bitbucket Cloud
Building Search for Bitbucket CloudAtlassian
 
Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAmazon Web Services
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Ryan Cuprak
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAmazon Web Services
 
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...C4Media
 

Tendances (20)

Learning chef
Learning chefLearning chef
Learning chef
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
DevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous DeliveryDevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous Delivery
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation Slides
 
Cross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open SourceCross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open Source
 
Accelerating Innovation with DevOps on AWS
Accelerating Innovation with DevOps on AWSAccelerating Innovation with DevOps on AWS
Accelerating Innovation with DevOps on AWS
 
Devops with Amazon Web Services (January 2017)
Devops with Amazon Web Services (January 2017)Devops with Amazon Web Services (January 2017)
Devops with Amazon Web Services (January 2017)
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
12 Ways to Supercharge Your Connect Add-on
12 Ways to Supercharge Your Connect Add-on12 Ways to Supercharge Your Connect Add-on
12 Ways to Supercharge Your Connect Add-on
 
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
Day 3 - DevOps Culture - Continuous Integration & Continuous Deployment on th...
 
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
 
DevOps and AWS - Code PaLOUsa 2017
DevOps and AWS  - Code PaLOUsa 2017DevOps and AWS  - Code PaLOUsa 2017
DevOps and AWS - Code PaLOUsa 2017
 
DevOps on AWS
DevOps on AWSDevOps on AWS
DevOps on AWS
 
Building Search for Bitbucket Cloud
Building Search for Bitbucket CloudBuilding Search for Bitbucket Cloud
Building Search for Bitbucket Cloud
 
Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWS
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
DevOps for Azure
DevOps for AzureDevOps for Azure
DevOps for Azure
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for Developers
 
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
Scaling Gilt: from Monolithic Ruby Application to Distributed Scala Micro-Ser...
 

Similaire à Microservices on Application Container Cloud Service

Continuously deploy a containerized app to “Azure App Service”
Continuously deploy a containerized app to “Azure App Service”Continuously deploy a containerized app to “Azure App Service”
Continuously deploy a containerized app to “Azure App Service”Seven Peaks Speaks
 
Agile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic BeanstalkAgile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic BeanstalkAmazon Web Services
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Dev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - TorontoDev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - TorontoAmazon Web Services
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAmazon Web Services
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Vinay Kumar
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAmazon Web Services
 
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.jsCome Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.jsEric Nograles
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntAshley Roach
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples Yochay Kiriaty
 
Simplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptxSimplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptxssuser5faa791
 
Cloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment WorkshopCloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment WorkshopManuel Garcia
 
Azure functions
Azure functionsAzure functions
Azure functionsvivek p s
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsBrad Williams
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Emerson Eduardo Rodrigues Von Staffen
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic BeanstalkDeploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic BeanstalkAmazon Web Services
 

Similaire à Microservices on Application Container Cloud Service (20)

Continuously deploy a containerized app to “Azure App Service”
Continuously deploy a containerized app to “Azure App Service”Continuously deploy a containerized app to “Azure App Service”
Continuously deploy a containerized app to “Azure App Service”
 
Agile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic BeanstalkAgile Deployment using Git and AWS Elastic Beanstalk
Agile Deployment using Git and AWS Elastic Beanstalk
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Dev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - TorontoDev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - Toronto
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
 
Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17Modern application development with oracle cloud sangam17
Modern application development with oracle cloud sangam17
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
 
Managing Your Cloud Assets
Managing Your Cloud AssetsManaging Your Cloud Assets
Managing Your Cloud Assets
 
56k.cloud training
56k.cloud training56k.cloud training
56k.cloud training
 
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.jsCome Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
Come Sail Away With Me (you guys): Node.js MVC Web API's Using Sails.js
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger Hunt
 
Azure Functions Real World Examples
Azure Functions Real World Examples Azure Functions Real World Examples
Azure Functions Real World Examples
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
Simplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptxSimplify DevOps with Microservices and Mobile Backends.pptx
Simplify DevOps with Microservices and Mobile Backends.pptx
 
Cloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment WorkshopCloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment Workshop
 
Azure functions
Azure functionsAzure functions
Azure functions
 
ThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.jsThatConference 2016 - Highly Available Node.js
ThatConference 2016 - Highly Available Node.js
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic BeanstalkDeploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
Deploy, Manage, and Scale Your Apps with OpsWorks and Elastic Beanstalk
 

Plus de Maarten Smeets

Google jib: Building Java containers without Docker
Google jib: Building Java containers without DockerGoogle jib: Building Java containers without Docker
Google jib: Building Java containers without DockerMaarten Smeets
 
Introduction to Anchore Engine
Introduction to Anchore EngineIntroduction to Anchore Engine
Introduction to Anchore EngineMaarten Smeets
 
R2DBC Reactive Relational Database Connectivity
R2DBC Reactive Relational Database ConnectivityR2DBC Reactive Relational Database Connectivity
R2DBC Reactive Relational Database ConnectivityMaarten Smeets
 
Performance Issue? Machine Learning to the rescue!
Performance Issue? Machine Learning to the rescue!Performance Issue? Machine Learning to the rescue!
Performance Issue? Machine Learning to the rescue!Maarten Smeets
 
Performance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMsPerformance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMsMaarten Smeets
 
Performance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMsPerformance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMsMaarten Smeets
 
VirtualBox networking explained
VirtualBox networking explainedVirtualBox networking explained
VirtualBox networking explainedMaarten Smeets
 
WebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck ThreadsWebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck ThreadsMaarten Smeets
 
All you need to know about transport layer security
All you need to know about transport layer securityAll you need to know about transport layer security
All you need to know about transport layer securityMaarten Smeets
 
Webservice security considerations and measures
Webservice security considerations and measuresWebservice security considerations and measures
Webservice security considerations and measuresMaarten Smeets
 
Machine learning with R
Machine learning with RMachine learning with R
Machine learning with RMaarten Smeets
 
WebLogic Scripting Tool made Cool!
WebLogic Scripting Tool made Cool!WebLogic Scripting Tool made Cool!
WebLogic Scripting Tool made Cool!Maarten Smeets
 
Oracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new featuresOracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new featuresMaarten Smeets
 
How to build a cloud adapter
How to build a cloud adapterHow to build a cloud adapter
How to build a cloud adapterMaarten Smeets
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debuggingMaarten Smeets
 

Plus de Maarten Smeets (16)

Google jib: Building Java containers without Docker
Google jib: Building Java containers without DockerGoogle jib: Building Java containers without Docker
Google jib: Building Java containers without Docker
 
Introduction to Anchore Engine
Introduction to Anchore EngineIntroduction to Anchore Engine
Introduction to Anchore Engine
 
R2DBC Reactive Relational Database Connectivity
R2DBC Reactive Relational Database ConnectivityR2DBC Reactive Relational Database Connectivity
R2DBC Reactive Relational Database Connectivity
 
Performance Issue? Machine Learning to the rescue!
Performance Issue? Machine Learning to the rescue!Performance Issue? Machine Learning to the rescue!
Performance Issue? Machine Learning to the rescue!
 
Performance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMsPerformance of Microservice Frameworks on different JVMs
Performance of Microservice Frameworks on different JVMs
 
Performance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMsPerformance of Microservice frameworks on different JVMs
Performance of Microservice frameworks on different JVMs
 
VirtualBox networking explained
VirtualBox networking explainedVirtualBox networking explained
VirtualBox networking explained
 
WebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck ThreadsWebLogic Stability; Detect and Analyse Stuck Threads
WebLogic Stability; Detect and Analyse Stuck Threads
 
Introduction to Redis
Introduction to RedisIntroduction to Redis
Introduction to Redis
 
All you need to know about transport layer security
All you need to know about transport layer securityAll you need to know about transport layer security
All you need to know about transport layer security
 
Webservice security considerations and measures
Webservice security considerations and measuresWebservice security considerations and measures
Webservice security considerations and measures
 
Machine learning with R
Machine learning with RMachine learning with R
Machine learning with R
 
WebLogic Scripting Tool made Cool!
WebLogic Scripting Tool made Cool!WebLogic Scripting Tool made Cool!
WebLogic Scripting Tool made Cool!
 
Oracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new featuresOracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new features
 
How to build a cloud adapter
How to build a cloud adapterHow to build a cloud adapter
How to build a cloud adapter
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debugging
 

Dernier

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 

Dernier (20)

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 

Microservices on Application Container Cloud Service

  • 1. MICROSERVICES ON APPLICATION CONTAINER CLOUD SERVICE Maarten Smeets 07-06-2018
  • 2. @MaartenSmeetsNL https://nl.linkedin.com/in/smeetsm About Maarten • Integration consultant at AMIS since 2014 • Several certifications SOA, BPM, MCS, Java, SQL, PL/SQL, Mule, AWS, etc • Enthusiastic blogger http://javaoraclesoa.blogspot.com
  • 3. 3 Membership Tiers • Oracle ACE Director • Oracle ACE • Oracle ACE Associate bit.ly/OracleACEProgram 500+ Technical Experts Helping Peers Globally Connect: Nominate yourself or someone you know: acenomination.oracle.com @oracleace Facebook.com/oracleaces oracle-ace_ww@oracle.com
  • 4. MICROSERVICES ON APPLICATION CONTAINER CLOUD SERVICE MICROSERVICE ARCHITECTURE TWELVE FACTOR APPLICATION APPLICATION CONTAINER CLOUD SERVICE SPRING BOOT DOCUMENTING YOUR API USING THE ACCS CACHE WITH THE ACCS JAVA SDK DEPLOYING AND RUNNING ON ACCS
  • 6. MICROSERVICE ARCHITECTURE IN THE CLOUD THE CHALLENGES ARE DIFFERENT FROM ON PREMISES • Environment differs Administration, connectivity • DTAP environments Local development / testing? • Security The entire world can access your services • Scalability
  • 7. TWELVE FACTOR APPLICATION HOW • Codebase • One codebase tracked in revision control, many deploys • Dependencies • Explicitly declare and isolate dependencies • Config • Store config in the environment • Backing services • Treat backing services as attached resources • Build, release, run • Strictly separate build and run stages • Processes • Execute the app as one or more stateless processes
  • 8. TWELVE FACTOR APPLICATION HOW • Port binding • Export services via port binding • Concurrency • Scale out via the process model • Disposability • Maximize robustness with fast startup and graceful shutdown • Dev/prod parity • Keep environments as similar as possible • Logs • Treat logs as event streams • Admin processes • Run admin/management tasks as one-off processes
  • 9. MICROSERVICE ARCHITECTURE IN THE CLOUD 12 FACTOR APPLICATION: A METHODOLOGY FOR BUILDING SAAS APPS Application Container Cloud Service
  • 10. APPLICATION CONTAINER CLOUD SERVICE • On demand scale out/in. Adding/Removing instances • On demand scale up/down. Adding/Removing memory per instance • Automatic load balancer configuration • One click patching • Easy to configure service bindings
  • 13. SPRING BOOT BUT WHY? • Popular Java is very popular! #1 TIOBE index #3 on Stackoverflow and Github Netflix uses it • Performant Spring Boot outperforms JavaScript on Node if you do the same things Like validation, authentication, formatting • Rich in features Uses Spring but with many shortcuts. Spring provides a lot of out of the box functionality such as integration and security • Fast to develop Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".
  • 14. SPRING BOOT IMPLEMENTING MICROSERVICES Documentation Spring Boot on Docker Spring Boot on ACCS Using the Application Cache
  • 15. SPRING BOOT DOCUMENTATION • Contract first (design first) Generate Spring Boot code using Smartbear Swaggerhub • You can even generate code from your Maven build using swagger-codegen https://rphgoossens.wordpress.com/2018/02/10/swagger-generation-automation-or-creating-the-bottling-line/ https://swaggerhub.com/blog/api-design/design-first-or-code-first-api-development/
  • 16. SPRING BOOT DOCUMENTATION • Code first Generate Swagger documentation from annotations code using springfox.io libraries
  • 17. 1 2 3 Add dependencies to pom.xml Create Swagger configuration class Annotate your API’s SPRING BOOT DOCUMENTATION CODE FIRST
  • 18. SPRING BOOT DOCUMENTATION • Add the SpringFox dependency to the pom.xml
  • 19. SPRING BOOT DOCUMENTATION Which APIs to generate documentation for
  • 20. SPRING BOOT DOCUMENTATION Describes the API Describes the API operation
  • 23. 1 2 SPRING BOOT ON DOCKER Create a Dockerfile Use dockerfile-maven-plugin In your pom.xml
  • 24. SPRING BOOT ON DOCKER • Get base images from public registries • OpenJDK on Alpine Linux https://spring.io/guides/gs/spring-boot-docker/ • Oracle JDK on Oracle Linux + + http://javaoraclesoa.blogspot.com/2018/03/running-spring-boot-in-docker-container.html
  • 25. SPRING BOOT ON DOCKER mvn package dockerfile:build docker run -p 8081:8081 maartensmeets/accs-cache-sample:latest https://github.com/spotify/dockerfile-maven Dockerfile
  • 26. SPRING BOOT ON DOCKER: DIFFERENT FROM ACCS • There is no local ACCS environment You cannot test deployment locally • ACCS bindings cannot be tested locally LocalSessionProvider is available for the cache
  • 27. 1 2 BUILD A ZIP TO DEPLOY TO ACCS What should be in the ZIP How do you create those files
  • 28. SPRING BOOT ON ACCS BUILD A DEPLOYABLE ACCS Deployable ZIP manifest.json deployment.json uberJAR.jar Create with the maven-assembly-plugin Create with the spring-boot-maven-plugin
  • 29. SPRING BOOT ON ACCS BUILD A DEPLOYABLE Describes what should go in the ZIP file for ACCS JAR + manifest.json + deployment.json Creates a Spring Boot über JAR with dependencies which ‘just runs’
  • 30. SPRING BOOT ON ACCS DEPLOY! MANUALLY
  • 31. SPRING BOOT ON ACCS DEPLOY! DEVELOPER CLOUD SERVICE
  • 32. 1 2 USING THE APPLICATION CACHE Create an application cache How to access the cache using the Java SDK
  • 33. USING THE APPLICATION CACHE BUT WHY? • Share state • Cache slow service responses
  • 34. USING THE APPLICATION CACHE Application Cache 1 Customers Shopping carts Inventory Application Cache 2 Customers Shopping carts Inventory Java SE App 1 Java SE App 1 Node JS App 1 Java SE App 3
  • 35. USING THE APPLICATION CACHE HOW FAST IS IT? • Environment • ACCS: 1 OCPU, 1 Gb • Cache: 2Gb Basic • Tested with GET request, small payload • Average response time for 3500 requests, 20 threads, 60s • End to end: 236ms (no significant difference REST / GRPC) • GRPC: 5ms (1ms - 40ms) • REST: 3ms (0ms - 70ms) • Local: 0ms
  • 39. USING THE APPLICATION CACHE DEPENDENCY CHALLENGES • Java 9 lacks some libraries from previous SDK’s Additional dependencies needed • Additional GRPC libraries are required
  • 40. USING THE APPLICATION CACHE IN SPRING BOOT Entity Repository Controller Exposes resources / presentation E.g. RestController Handles connectivity / persistence / DAO The resource Service Service / operation Implement cache code Implement logic to use the cache or another repository
  • 41. USING THE APPLICATION CACHE IN SPRING BOOT • Oracle provides an open source SDK • Java Client Caching SDK for Oracle Application Container Cloud Service https://github.com/oracle/accs-caching-java-sdk
  • 42. USING THE APPLICATION CACHE IN SPRING BOOT CacheRepositoryDbRepository Service Cache SerializerLoader
  • 43. USING THE APPLICATION CACHE IN SPRING BOOT • Create a SessionProvider • Use the SessionProvider to create a Session • Use the Session to get a Cache object • Use the Cache object to access the cache Can be a Local or Remote. Remote requires an URL The session can be REST or gRPC (HTTP/2) based Allows you to configure • Expiry Determines validity of cached objects • Loader This is called when there is no cache hit • Serializer Objects need to be serialized to be put in the cache
  • 44. APPLICATION CONTAINER CLOUD SERVICE GOOD TO KNOW • Deployment Sometimes old deployment ZIP files are used Recommendation: script removing files from storage cloud • Debugging Can be time-consuming. A single deployment can take minutes. • The Java Client SDK does not provide support for a findAll method
  • 45. APPLICATION CACHE GOOD TO KNOW • Expiry Has issues with the LocalSessionProvider Tip: set it to never expire • Environment differences Working locally is no guarantee for working in the cloud! • Dependencies / performance Test with both GRPC and REST. REST could be faster! You can’t remove a cache which has bindings to applications • Availability During patches, updating bindings -> implement retries or error handling
  • 46. WANT TO LEARN MORE? • Java • Complete working sample Spring Boot on ACCS with Application Cache https://github.com/MaartenSmeets/springboot • A sample of using the cache. Application is Jersey based (no Spring) https://github.com/abhirockzz/app-container-cloud-cache-example • Python • A minimal sample of using Python on ACCS https://github.com/MaartenSmeets/pythonscripts/tree/master/microservice-accs/minimal-sample • An elaborate sample of using Python on ACCS https://dzone.com/articles/deploy-a-python-application-to-oracle-application

Notes de l'éditeur

  1. Smooth transition from dev to prod Easy integration with underlying platform ACCS is more GUI based and Heroku is more commandline / configuration file based. Deployment to Heroku is much faster!
  2. Why is this my favorite cloud service? Clean contract, language independent
  3. Example Java SE, Spring Boot
  4. https://octoverse.github.com/ https://insights.stackoverflow.com/survey/2017 Performance: https://www.linkedin.com/pulse/nodejs-vs-java-which-faster-apis-owen-rubel Na application server required. Ideal to just run a Jar in a Docker container Netflix uses it Spring is a solid framework a large codebase many contributors Spring Boot makes using Spring easy by taking an opinionated view Minimal configuration required for 80% of the use cases Designed to get you up and running as quickly as possible. Does not require an application server (has embedded Tomcat) You just need a JVM to run
  5. https://swaggerhub.com/blog/api-design/design-first-or-code-first-api-development/ Internal API’s -> code first External API’s -> design first. Better communication and better experience Useful for quick stub generation
  6. Easy to import Swagger documentation in a tool like Postman
  7. Why? To test locally
  8. First is easy. No need to create accounts, works out of the box Second requires an account on store.docker.com and requires you to accept a license ACCS is OEL7 Why? To test locally https://github.com/oracle/docker-images/tree/master/OracleJava
  9. Add Dockerfile. Specifies container base
  10. The local environment differs. No loadbalancer, no internal and external hostnames Cache can be unittested
  11. between technologically diverse stateless services like session data
  12. Multiple apps can use the same application cache. A single app can use a single application cache Application cache runs on Coherence Useful for sharing session state across apps or app nodes.
  13. The cache name should not contain characters like ‘-’ This will cause the creation to fail (specifically LBaaS configuration)
  14. Or in the deployment.json file or by manually adding a binding This does two things Ensuring there is secure network connectivity to the cache Make connection information to the cache available as parameters inside the Docker env
  15. Also allows local development
  16. Get requests directly to the cache Put requests to both
  17. Oracle provides a client SDK: https://blogs.oracle.com/developers/introducing-application-cache-client-java-sdk-for-oracle-cloud which has been open sourced: https://github.com/oracle/accs-caching-java-sdk
  18. Also see https://community.oracle.com/community/oracle-cloud/oracle-cloud-developer-solutions/blog/2017/06/06/build-oracle-app-container-cloud-cache-based-application-cicd-using-oracle-developer-cloud