SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
Using Magnolia in a Microservices Architecture
Presented by Nicolas Barbé
Broadcast on 2015-09-10
Nicolas Barbé
Software engineer and
technology enthusiast
working for Magnolia
MICROSERVICES
“Loosely coupled
service oriented architecture
with bounded contexts”
Adrian Cockcroft
Your organisation can scale
WHY DOES IT MATTER?
NOT A FREE LUNCH
Distributed systems are complex
๏ Testability
๏ Eventual consistency
๏ Operational complexity
http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
COMMON PATTERNS
REQUEST - RESPONSE
request
response
BLOCKED
one to one and synchronous
client server
This is a service
PUBLISH - SUBSCRIBE
publish
one to many and asynchronous
subscribetopic
producer
consumers
FACADE
C
Facade B
A
A facade provides an uniformed API
abstracting several underlying services
Request
PROXY
C
proxy B
A
A proxy delegates a request to one of the
underlying services
Request
CRUD
Create / Read / Update / Delete
Straightforward mapping to DB operators but
does not perform well with task based UI
CQRS
Different models for queries and commands
Commands Queries
ROLE OF MAGNOLIA
๏ Editorial Content - Magnolia
๏ Dynamic or User Generated Content
๏ Content & Business Logic - Microservices
๏ Frontend - Magnolia
๏ Backend - Magnolia
MAGNOLIA ASK
A proof of concept of a Q&A website like stack-overflow
WHICH SERVICES?
References must be checked
- Question / Answer
- Question / User
- Answer / User
- Rating / Answer
- Rating / Question
Users have only one vote
Answers are single threaded
USERS
QUESTIONS ANSWERS
RATINGS
ARCHITECTURE
USERS-COMMANDS
users
RATINGS-COMMANDS
ANSWERS-COMMANDS
QUESTIONS-COMMANDS
USERS-QUERIES
votes
questions
answers
QUESTIONS-QUERIES
ANSWERS-QUERIES
pub
pub
pub
pub
sub
sub
sub
sub
sub
sub
sub
sub
sub
req/res
req/res
sub
Magnolia
req/res
req/res
req/res
ANATOMY OF A MICROSERVICE
Commands Queries
QUESTIONS
‣ AskQuestion
‣ CloseQuestion
{
title: Eget lacinia odio sem nec
elit?
description: Cum sociis natoque
penatibus et magnis dis
parturient ontes, nascetur
ridiculus mus.
initiator: nbarbe
createdAt: 2015-08-14T14:45:43

closed: false
}
‣ ListQuestions
‣ ShowQuestion
{
title: Eget lacinia odio sem nec
elit?
description: Cum sociis natoque
penatibus et magnis dis
parturient ontes, nascetur
ridiculus mus.
initiator: Nicolas Barbé
createdAt: 2015-08-14T14:45:43
closed: false
votes: 12
answers: 3
answersBucketId: fh34t738
}
DEEP DIVE IN THE IMPLEMENTATION
CONTAINERS
Additional layer of abstraction and
automation of an OS
CONTAINERS OR VM?
Actually both !
Virtual machine for the hosts
Containers for the microservices
CONTAINER = MICROSERVICE
๏ Clear Boundaries
๏ Reproducible Builds
๏ Network Plumbing
๏ From Dev to Prod to
Dev
๏ Uniform Operations
- Packaging
- Distribution
- Deployment / Upgrade
- Backup / Restore
- Monitoring
- Logging
- Snaphots
DOCKERIZE MAGNOLIA
$ echo 
'FROM nicolasbarbe/magnolia-base
MAINTAINER Nicolas Barbé "https://github.com/nicolasbarbe"
RUN wget -nv http://sourceforge.net/projects/magnolia/files/
magnolia/Magnolia%20CE%205.4.2/magnolia-bundled-
webapp-5.4.2.war/download?use_mirror=autoselect -O
$CATALINA_BASE/webapps/ROOT.war' > Dockerfile
$ docker build -t magnolia .
$ docker run -p 3000:8080 magnolia
TIPS & TRICKS
๏ Follows the recommendations of
the Filesystem Hierarchy Standard
๏ Configuration through
environment variables
- INSTANCE_TYPE
- DB_TYPE
- DB_SCHEMA
- DB_USERNAME
- DB_PASSWORD
- DEVELOP_MODE
- CLUSTER_ID
๏ Tomcat & JVM settings can be
customised
COPY setenv.sh $CATALINA_BASE/bin/setenv.sh
๏ Map a volume from the host to the
container to persist the JCR
repository
-v /var/lib/magnolia/repositories:/var/lib/
magnolia/repositories
๏ Map a volume from the host to the
container for the resources
-v $MAGNOLIA_WEB_RESOURCES:/var/opt/magnolia
MORE INFORMATION
http://nicolasbarbe.com/2015/01/02/a-docker-image-for-magnolia/
FROM DEV …
Build a clone of the production environment locally with Docker Compose
db-author:
image: postgres
environment:
- POSTGRES_USER=magnolia
- POSTGRES_PASSWORD=mysecretpassword
author:
image: nicolasbarbe/ms-frontend:1.0-SNAPSHOT
command: run
ports:
- "3000:8080"
links:
- db-author:db
environment:
- INSTANCE_TYPE=author
- DB_TYPE=postgresql
- DB_ADDRESS=db
- DB_PORT=5432
- DB_SCHEMA=magnolia
- DB_USERNAME=magnolia
- DB_PASSWORD=mysecretpassword
Create a new container for
the database
Create a network link between
the database and magnolia
Create another container for Magnolia
Configure the instance as an author
and to use the postgresql driver
Thanks to the link, we don’t have to specify the
database IP address
… TO PROD
๏ Use a full Docker stack
- Reuse the same Docker Compose definition
- If the architectures are slightly different use extends keyword
- Use Docker Swarm to deploy on multiple hosts
- Use Docker Machine to provision the hosts
๏ But, wait, Docker Compose/Swarm are still in Beta
- Use Kubernetes if you want a cluster with dynamic provisioning and hosts allocation
- Use Ansible if you want static hosts provisioning and allocation (see my blog post*)
๏ In all cases use the same Docker Images !
* http://nicolasbarbe.com/2015/07/13/magnolia-devops-automate-deployment/
SERVICE DISCOVERY
Build a Service Registry to let Magnolia discovers the services automatically
The Service Registry
- Defines microservices in a YAML file
- Discovers the services through
environment variables, Java system
properties, from the JCR or by value
- Injects services in the templates
- Provides a generic connector to
build dedicated content apps in
YAML
services:
questions:
connection:
host: QUESTIONS_QUERIES_HOST
port: QUESTIONS_QUERIES_PORT
type: env
apiVersion: v1
resource:
name: question
properties:
- name: id
type: Integer
- name: title
type: String
- name: description
https://github.com/nicolasbarbe/magnolia-http-utils
DISPLAYING CONTENT
[#assign id=ctx.getParameter("id")]
[#assign question=httpfn.service("question").GET(id)]
<div class="row">
<h2>${question.title}</h2>
<h4>${question.initiator}</h4>
<p class="lead">
${question.description}
</p>
<div class="pull-right">Asked ${question.createdAt?datetime?date}</div>
</div>
MANAGING CONTENT
Presenters uses
Query side
Actions connect to the
Command side
HTTPS://GITHUB.COM/NICOLASBARBE/MAGNOLIA-ASK
QUESTIONS?

Más contenido relacionado

La actualidad más candente

Ceph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideCeph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideKaran Singh
 
Red Hat Openshift Fundamentals.pptx
Red Hat Openshift Fundamentals.pptxRed Hat Openshift Fundamentals.pptx
Red Hat Openshift Fundamentals.pptxssuser18b1c6
 
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019Sean Cohen
 
The world of Containers with Podman, Buildah, Skopeo by Seema - CCDays
The world of Containers with Podman, Buildah, Skopeo by Seema - CCDaysThe world of Containers with Podman, Buildah, Skopeo by Seema - CCDays
The world of Containers with Podman, Buildah, Skopeo by Seema - CCDaysCodeOps Technologies LLP
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniZalando Technology
 
Kubernetes dealing with storage and persistence
Kubernetes  dealing with storage and persistenceKubernetes  dealing with storage and persistence
Kubernetes dealing with storage and persistenceJanakiram MSV
 
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Vietnam Open Infrastructure User Group
 
Everything You Need To Know About Persistent Storage in Kubernetes
Everything You Need To Know About Persistent Storage in KubernetesEverything You Need To Know About Persistent Storage in Kubernetes
Everything You Need To Know About Persistent Storage in KubernetesThe {code} Team
 
Distributed Locking in Kubernetes
Distributed Locking in KubernetesDistributed Locking in Kubernetes
Distributed Locking in KubernetesRafał Leszko
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability Mydbops
 
Introduction of OpenStack cascading solution
Introduction of OpenStack cascading solutionIntroduction of OpenStack cascading solution
Introduction of OpenStack cascading solutionJoe Huang
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes NetworkingCJ Cullen
 
Kubernetes #6 advanced scheduling
Kubernetes #6   advanced schedulingKubernetes #6   advanced scheduling
Kubernetes #6 advanced schedulingTerry Cho
 
Monitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheusMonitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheusChandresh Pancholi
 
Docker Networking Deep Dive
Docker Networking Deep DiveDocker Networking Deep Dive
Docker Networking Deep DiveDocker, Inc.
 
Implementation &amp; Comparison Of Rdma Over Ethernet
Implementation &amp; Comparison Of Rdma Over EthernetImplementation &amp; Comparison Of Rdma Over Ethernet
Implementation &amp; Comparison Of Rdma Over EthernetJames Wernicke
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Novell
 

La actualidad más candente (20)

Ceph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideCeph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing Guide
 
Red Hat Openshift Fundamentals.pptx
Red Hat Openshift Fundamentals.pptxRed Hat Openshift Fundamentals.pptx
Red Hat Openshift Fundamentals.pptx
 
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
Storage 101: Rook and Ceph - Open Infrastructure Denver 2019
 
The world of Containers with Podman, Buildah, Skopeo by Seema - CCDays
The world of Containers with Podman, Buildah, Skopeo by Seema - CCDaysThe world of Containers with Podman, Buildah, Skopeo by Seema - CCDays
The world of Containers with Podman, Buildah, Skopeo by Seema - CCDays
 
High Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando PatroniHigh Availability PostgreSQL with Zalando Patroni
High Availability PostgreSQL with Zalando Patroni
 
Kubernetes dealing with storage and persistence
Kubernetes  dealing with storage and persistenceKubernetes  dealing with storage and persistence
Kubernetes dealing with storage and persistence
 
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
 
Everything You Need To Know About Persistent Storage in Kubernetes
Everything You Need To Know About Persistent Storage in KubernetesEverything You Need To Know About Persistent Storage in Kubernetes
Everything You Need To Know About Persistent Storage in Kubernetes
 
Distributed Locking in Kubernetes
Distributed Locking in KubernetesDistributed Locking in Kubernetes
Distributed Locking in Kubernetes
 
Galera cluster for high availability
Galera cluster for high availability Galera cluster for high availability
Galera cluster for high availability
 
macvlan and ipvlan
macvlan and ipvlanmacvlan and ipvlan
macvlan and ipvlan
 
Introduction of OpenStack cascading solution
Introduction of OpenStack cascading solutionIntroduction of OpenStack cascading solution
Introduction of OpenStack cascading solution
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Kubernetes #6 advanced scheduling
Kubernetes #6   advanced schedulingKubernetes #6   advanced scheduling
Kubernetes #6 advanced scheduling
 
Monitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheusMonitoring on Kubernetes using prometheus
Monitoring on Kubernetes using prometheus
 
Docker Networking Deep Dive
Docker Networking Deep DiveDocker Networking Deep Dive
Docker Networking Deep Dive
 
Memcached
MemcachedMemcached
Memcached
 
Implementation &amp; Comparison Of Rdma Over Ethernet
Implementation &amp; Comparison Of Rdma Over EthernetImplementation &amp; Comparison Of Rdma Over Ethernet
Implementation &amp; Comparison Of Rdma Over Ethernet
 
Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)Virtualization with KVM (Kernel-based Virtual Machine)
Virtualization with KVM (Kernel-based Virtual Machine)
 
Galera Cluster Best Practices for DBA's and DevOps Part 1
Galera Cluster Best Practices for DBA's and DevOps Part 1Galera Cluster Best Practices for DBA's and DevOps Part 1
Galera Cluster Best Practices for DBA's and DevOps Part 1
 

Destacado

Magnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - ArchitectureMagnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - ArchitecturePhilipp Bärfuss
 
Magnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynoteMagnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynoteMagnolia
 
Customer Engagement in the Digital Era
Customer Engagement in the Digital EraCustomer Engagement in the Digital Era
Customer Engagement in the Digital EraMagnolia
 
Get the Maximum Out of Your Magnolia Workflow
Get the Maximum Out of Your Magnolia WorkflowGet the Maximum Out of Your Magnolia Workflow
Get the Maximum Out of Your Magnolia WorkflowMagnolia
 
Developing Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficientlyDeveloping Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficientlyMagnolia
 
Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4Magnolia
 
Spring and Web Content Management
Spring and Web Content ManagementSpring and Web Content Management
Spring and Web Content ManagementZak Greant
 
Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Tobias Mattsson
 
Integrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer ExperienceIntegrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer ExperienceMagnolia
 
The Age of the IOT & Digital Business
The Age of the IOT & Digital BusinessThe Age of the IOT & Digital Business
The Age of the IOT & Digital BusinessMagnolia
 

Destacado (10)

Magnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - ArchitectureMagnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - Architecture
 
Magnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynoteMagnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynote
 
Customer Engagement in the Digital Era
Customer Engagement in the Digital EraCustomer Engagement in the Digital Era
Customer Engagement in the Digital Era
 
Get the Maximum Out of Your Magnolia Workflow
Get the Maximum Out of Your Magnolia WorkflowGet the Maximum Out of Your Magnolia Workflow
Get the Maximum Out of Your Magnolia Workflow
 
Developing Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficientlyDeveloping Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficiently
 
Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4
 
Spring and Web Content Management
Spring and Web Content ManagementSpring and Web Content Management
Spring and Web Content Management
 
Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015
 
Integrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer ExperienceIntegrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer Experience
 
The Age of the IOT & Digital Business
The Age of the IOT & Digital BusinessThe Age of the IOT & Digital Business
The Age of the IOT & Digital Business
 

Similar a Using Magnolia in a Microservices Architecture

CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...CA Technologies
 
DCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application PackagesDCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application PackagesDocker, Inc.
 
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...Henning Jacobs
 
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Wojciech Barczyński
 
Running Magnolia on Jelastic Cloud Hosting
Running Magnolia on Jelastic Cloud HostingRunning Magnolia on Jelastic Cloud Hosting
Running Magnolia on Jelastic Cloud HostingMagnolia
 
Magnolia CMS on Jelastic
Magnolia CMS on JelasticMagnolia CMS on Jelastic
Magnolia CMS on JelasticEdgar Vonk
 
Magnolia CMS - on Jelastic
Magnolia CMS - on JelasticMagnolia CMS - on Jelastic
Magnolia CMS - on JelasticInfo.nl
 
'DOCKER' & CLOUD: ENABLERS For DEVOPS
'DOCKER' & CLOUD:  ENABLERS For DEVOPS'DOCKER' & CLOUD:  ENABLERS For DEVOPS
'DOCKER' & CLOUD: ENABLERS For DEVOPSACA IT-Solutions
 
Docker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITDocker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITStijn Wijndaele
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetessparkfabrik
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Chris Ciborowski
 
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflixaspyker
 
High available BizTalk infrastructure on Azure IaaS
High available BizTalk infrastructure on Azure IaaSHigh available BizTalk infrastructure on Azure IaaS
High available BizTalk infrastructure on Azure IaaSBizTalk360
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSLana Kalashnyk
 
Automating the VMware Virtual Datacenter
Automating the VMware Virtual DatacenterAutomating the VMware Virtual Datacenter
Automating the VMware Virtual DatacenterJosh Atwell
 
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex GervaisAmbassador Labs
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsVMware Tanzu
 
How to Train Your Docker Cloud
How to Train Your Docker CloudHow to Train Your Docker Cloud
How to Train Your Docker CloudC4Media
 
Deep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice ArchitectureDeep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice ArchitectureWSO2
 
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkCloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkRed Hat Developers
 

Similar a Using Magnolia in a Microservices Architecture (20)

CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...
 
DCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application PackagesDCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application Packages
 
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
 
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
 
Running Magnolia on Jelastic Cloud Hosting
Running Magnolia on Jelastic Cloud HostingRunning Magnolia on Jelastic Cloud Hosting
Running Magnolia on Jelastic Cloud Hosting
 
Magnolia CMS on Jelastic
Magnolia CMS on JelasticMagnolia CMS on Jelastic
Magnolia CMS on Jelastic
 
Magnolia CMS - on Jelastic
Magnolia CMS - on JelasticMagnolia CMS - on Jelastic
Magnolia CMS - on Jelastic
 
'DOCKER' & CLOUD: ENABLERS For DEVOPS
'DOCKER' & CLOUD:  ENABLERS For DEVOPS'DOCKER' & CLOUD:  ENABLERS For DEVOPS
'DOCKER' & CLOUD: ENABLERS For DEVOPS
 
Docker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITDocker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-IT
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015
 
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflix
 
High available BizTalk infrastructure on Azure IaaS
High available BizTalk infrastructure on Azure IaaSHigh available BizTalk infrastructure on Azure IaaS
High available BizTalk infrastructure on Azure IaaS
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MS
 
Automating the VMware Virtual Datacenter
Automating the VMware Virtual DatacenterAutomating the VMware Virtual Datacenter
Automating the VMware Virtual Datacenter
 
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized Applications
 
How to Train Your Docker Cloud
How to Train Your Docker CloudHow to Train Your Docker Cloud
How to Train Your Docker Cloud
 
Deep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice ArchitectureDeep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice Architecture
 
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkCloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
 

Más de Magnolia

The SEO Workflow
The SEO WorkflowThe SEO Workflow
The SEO WorkflowMagnolia
 
Magnolia 6 release walkthrough
Magnolia 6 release walkthroughMagnolia 6 release walkthrough
Magnolia 6 release walkthroughMagnolia
 
Buzzword bingo: The real deal behind omnichannel, personalization and headless
Buzzword bingo: The real deal behind  omnichannel, personalization and headlessBuzzword bingo: The real deal behind  omnichannel, personalization and headless
Buzzword bingo: The real deal behind omnichannel, personalization and headlessMagnolia
 
A modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianA modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianMagnolia
 
Launching Magnolia on demand
Launching Magnolia on demandLaunching Magnolia on demand
Launching Magnolia on demandMagnolia
 
Front-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites fasterFront-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites fasterMagnolia
 
Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?Magnolia
 
Magnolia and the IOT
Magnolia and the IOTMagnolia and the IOT
Magnolia and the IOTMagnolia
 
Internationalization for globalized enterprise websites
Internationalization for globalized enterprise websitesInternationalization for globalized enterprise websites
Internationalization for globalized enterprise websitesMagnolia
 
The new visana website how to fit a square peg into a round hole
The new visana website   how to fit a square peg into a round holeThe new visana website   how to fit a square peg into a round hole
The new visana website how to fit a square peg into a round holeMagnolia
 
Solving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approachSolving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approachMagnolia
 
Extending Magnolia with our solutions
Extending Magnolia with our solutionsExtending Magnolia with our solutions
Extending Magnolia with our solutionsMagnolia
 
Boost your online e commerce with magnolia
Boost your online e commerce with magnoliaBoost your online e commerce with magnolia
Boost your online e commerce with magnoliaMagnolia
 
The slick YAML based configuration by file in Magnolia 5.4
The slick YAML based configuration by file in Magnolia 5.4The slick YAML based configuration by file in Magnolia 5.4
The slick YAML based configuration by file in Magnolia 5.4Magnolia
 
Seamless integration with Magnolia's REST API
Seamless integration with Magnolia's REST APISeamless integration with Magnolia's REST API
Seamless integration with Magnolia's REST APIMagnolia
 
Dynamic page caching for Magnolia 5.4
Dynamic page caching for Magnolia 5.4Dynamic page caching for Magnolia 5.4
Dynamic page caching for Magnolia 5.4Magnolia
 
An integrated, fail safe e-business platform based on open source solutions
An integrated, fail safe e-business platform based on open source solutionsAn integrated, fail safe e-business platform based on open source solutions
An integrated, fail safe e-business platform based on open source solutionsMagnolia
 
Magnolia conference 2015 - Boris Kraft's keynote
Magnolia conference 2015 - Boris Kraft's keynoteMagnolia conference 2015 - Boris Kraft's keynote
Magnolia conference 2015 - Boris Kraft's keynoteMagnolia
 
From business requirements to the development of magnolia cms.com - personali...
From business requirements to the development of magnolia cms.com - personali...From business requirements to the development of magnolia cms.com - personali...
From business requirements to the development of magnolia cms.com - personali...Magnolia
 
Building on Magnolia's personalization
Building on Magnolia's personalizationBuilding on Magnolia's personalization
Building on Magnolia's personalizationMagnolia
 

Más de Magnolia (20)

The SEO Workflow
The SEO WorkflowThe SEO Workflow
The SEO Workflow
 
Magnolia 6 release walkthrough
Magnolia 6 release walkthroughMagnolia 6 release walkthrough
Magnolia 6 release walkthrough
 
Buzzword bingo: The real deal behind omnichannel, personalization and headless
Buzzword bingo: The real deal behind  omnichannel, personalization and headlessBuzzword bingo: The real deal behind  omnichannel, personalization and headless
Buzzword bingo: The real deal behind omnichannel, personalization and headless
 
A modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianA modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at Atlassian
 
Launching Magnolia on demand
Launching Magnolia on demandLaunching Magnolia on demand
Launching Magnolia on demand
 
Front-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites fasterFront-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites faster
 
Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?
 
Magnolia and the IOT
Magnolia and the IOTMagnolia and the IOT
Magnolia and the IOT
 
Internationalization for globalized enterprise websites
Internationalization for globalized enterprise websitesInternationalization for globalized enterprise websites
Internationalization for globalized enterprise websites
 
The new visana website how to fit a square peg into a round hole
The new visana website   how to fit a square peg into a round holeThe new visana website   how to fit a square peg into a round hole
The new visana website how to fit a square peg into a round hole
 
Solving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approachSolving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approach
 
Extending Magnolia with our solutions
Extending Magnolia with our solutionsExtending Magnolia with our solutions
Extending Magnolia with our solutions
 
Boost your online e commerce with magnolia
Boost your online e commerce with magnoliaBoost your online e commerce with magnolia
Boost your online e commerce with magnolia
 
The slick YAML based configuration by file in Magnolia 5.4
The slick YAML based configuration by file in Magnolia 5.4The slick YAML based configuration by file in Magnolia 5.4
The slick YAML based configuration by file in Magnolia 5.4
 
Seamless integration with Magnolia's REST API
Seamless integration with Magnolia's REST APISeamless integration with Magnolia's REST API
Seamless integration with Magnolia's REST API
 
Dynamic page caching for Magnolia 5.4
Dynamic page caching for Magnolia 5.4Dynamic page caching for Magnolia 5.4
Dynamic page caching for Magnolia 5.4
 
An integrated, fail safe e-business platform based on open source solutions
An integrated, fail safe e-business platform based on open source solutionsAn integrated, fail safe e-business platform based on open source solutions
An integrated, fail safe e-business platform based on open source solutions
 
Magnolia conference 2015 - Boris Kraft's keynote
Magnolia conference 2015 - Boris Kraft's keynoteMagnolia conference 2015 - Boris Kraft's keynote
Magnolia conference 2015 - Boris Kraft's keynote
 
From business requirements to the development of magnolia cms.com - personali...
From business requirements to the development of magnolia cms.com - personali...From business requirements to the development of magnolia cms.com - personali...
From business requirements to the development of magnolia cms.com - personali...
 
Building on Magnolia's personalization
Building on Magnolia's personalizationBuilding on Magnolia's personalization
Building on Magnolia's personalization
 

Último

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Último (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Using Magnolia in a Microservices Architecture

  • 1. Using Magnolia in a Microservices Architecture Presented by Nicolas Barbé Broadcast on 2015-09-10
  • 2. Nicolas Barbé Software engineer and technology enthusiast working for Magnolia
  • 3. MICROSERVICES “Loosely coupled service oriented architecture with bounded contexts” Adrian Cockcroft
  • 4. Your organisation can scale WHY DOES IT MATTER?
  • 5. NOT A FREE LUNCH Distributed systems are complex ๏ Testability ๏ Eventual consistency ๏ Operational complexity http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
  • 7. REQUEST - RESPONSE request response BLOCKED one to one and synchronous client server This is a service
  • 8. PUBLISH - SUBSCRIBE publish one to many and asynchronous subscribetopic producer consumers
  • 9. FACADE C Facade B A A facade provides an uniformed API abstracting several underlying services Request
  • 10. PROXY C proxy B A A proxy delegates a request to one of the underlying services Request
  • 11. CRUD Create / Read / Update / Delete Straightforward mapping to DB operators but does not perform well with task based UI
  • 12. CQRS Different models for queries and commands Commands Queries
  • 13. ROLE OF MAGNOLIA ๏ Editorial Content - Magnolia ๏ Dynamic or User Generated Content ๏ Content & Business Logic - Microservices ๏ Frontend - Magnolia ๏ Backend - Magnolia
  • 14. MAGNOLIA ASK A proof of concept of a Q&A website like stack-overflow
  • 15. WHICH SERVICES? References must be checked - Question / Answer - Question / User - Answer / User - Rating / Answer - Rating / Question Users have only one vote Answers are single threaded USERS QUESTIONS ANSWERS RATINGS
  • 17. ANATOMY OF A MICROSERVICE Commands Queries QUESTIONS ‣ AskQuestion ‣ CloseQuestion { title: Eget lacinia odio sem nec elit? description: Cum sociis natoque penatibus et magnis dis parturient ontes, nascetur ridiculus mus. initiator: nbarbe createdAt: 2015-08-14T14:45:43
 closed: false } ‣ ListQuestions ‣ ShowQuestion { title: Eget lacinia odio sem nec elit? description: Cum sociis natoque penatibus et magnis dis parturient ontes, nascetur ridiculus mus. initiator: Nicolas Barbé createdAt: 2015-08-14T14:45:43 closed: false votes: 12 answers: 3 answersBucketId: fh34t738 }
  • 18. DEEP DIVE IN THE IMPLEMENTATION
  • 19. CONTAINERS Additional layer of abstraction and automation of an OS
  • 20. CONTAINERS OR VM? Actually both ! Virtual machine for the hosts Containers for the microservices
  • 21. CONTAINER = MICROSERVICE ๏ Clear Boundaries ๏ Reproducible Builds ๏ Network Plumbing ๏ From Dev to Prod to Dev ๏ Uniform Operations - Packaging - Distribution - Deployment / Upgrade - Backup / Restore - Monitoring - Logging - Snaphots
  • 22. DOCKERIZE MAGNOLIA $ echo 'FROM nicolasbarbe/magnolia-base MAINTAINER Nicolas Barbé "https://github.com/nicolasbarbe" RUN wget -nv http://sourceforge.net/projects/magnolia/files/ magnolia/Magnolia%20CE%205.4.2/magnolia-bundled- webapp-5.4.2.war/download?use_mirror=autoselect -O $CATALINA_BASE/webapps/ROOT.war' > Dockerfile $ docker build -t magnolia . $ docker run -p 3000:8080 magnolia
  • 23. TIPS & TRICKS ๏ Follows the recommendations of the Filesystem Hierarchy Standard ๏ Configuration through environment variables - INSTANCE_TYPE - DB_TYPE - DB_SCHEMA - DB_USERNAME - DB_PASSWORD - DEVELOP_MODE - CLUSTER_ID ๏ Tomcat & JVM settings can be customised COPY setenv.sh $CATALINA_BASE/bin/setenv.sh ๏ Map a volume from the host to the container to persist the JCR repository -v /var/lib/magnolia/repositories:/var/lib/ magnolia/repositories ๏ Map a volume from the host to the container for the resources -v $MAGNOLIA_WEB_RESOURCES:/var/opt/magnolia
  • 25. FROM DEV … Build a clone of the production environment locally with Docker Compose db-author: image: postgres environment: - POSTGRES_USER=magnolia - POSTGRES_PASSWORD=mysecretpassword author: image: nicolasbarbe/ms-frontend:1.0-SNAPSHOT command: run ports: - "3000:8080" links: - db-author:db environment: - INSTANCE_TYPE=author - DB_TYPE=postgresql - DB_ADDRESS=db - DB_PORT=5432 - DB_SCHEMA=magnolia - DB_USERNAME=magnolia - DB_PASSWORD=mysecretpassword Create a new container for the database Create a network link between the database and magnolia Create another container for Magnolia Configure the instance as an author and to use the postgresql driver Thanks to the link, we don’t have to specify the database IP address
  • 26. … TO PROD ๏ Use a full Docker stack - Reuse the same Docker Compose definition - If the architectures are slightly different use extends keyword - Use Docker Swarm to deploy on multiple hosts - Use Docker Machine to provision the hosts ๏ But, wait, Docker Compose/Swarm are still in Beta - Use Kubernetes if you want a cluster with dynamic provisioning and hosts allocation - Use Ansible if you want static hosts provisioning and allocation (see my blog post*) ๏ In all cases use the same Docker Images ! * http://nicolasbarbe.com/2015/07/13/magnolia-devops-automate-deployment/
  • 27. SERVICE DISCOVERY Build a Service Registry to let Magnolia discovers the services automatically The Service Registry - Defines microservices in a YAML file - Discovers the services through environment variables, Java system properties, from the JCR or by value - Injects services in the templates - Provides a generic connector to build dedicated content apps in YAML services: questions: connection: host: QUESTIONS_QUERIES_HOST port: QUESTIONS_QUERIES_PORT type: env apiVersion: v1 resource: name: question properties: - name: id type: Integer - name: title type: String - name: description https://github.com/nicolasbarbe/magnolia-http-utils
  • 28. DISPLAYING CONTENT [#assign id=ctx.getParameter("id")] [#assign question=httpfn.service("question").GET(id)] <div class="row"> <h2>${question.title}</h2> <h4>${question.initiator}</h4> <p class="lead"> ${question.description} </p> <div class="pull-right">Asked ${question.createdAt?datetime?date}</div> </div>
  • 29. MANAGING CONTENT Presenters uses Query side Actions connect to the Command side