Weitere ähnliche Inhalte Mehr von Phil Wilkins (20) Kürzlich hochgeladen (20) Microservices in a Monolith World1. 1Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.
Micro-Services in a Monolith
World
Phil Wilkins
Phil.Wilkins@capgemini.com
uk.linkedin.com/in/philWilkins
@MP3Monster /
@PhilAtCapgemini
Oracle-integration.cloud /
APIPlatform.cloud /
Blog.mp3monster.org
2. 2Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. 2
• Technical Enterprise Architect specializing in
Integration and PaaS.
• Started out as a developer working on UI for Radar
• Moved into integration solutions –using Open Src
Tech e.g. JBoss App Server & Fuse, Apache Camel etc.
• Worked in end user companies, ISVs & consultancy.
• Worked with Oracle tech for ~10yrs covering on-prem
and cloud.
About :: Phil Wilkins
Supported the
development of a
variety of books
Packt – Erl et al
Articles published
in a range of
Journals
Published 1st Oracle
iPaaS Book
Implementing ICS
PaaS Community
Jan, 2017
TOGAF 9 Certified
2013
• co-authored a book on Oracle Integration Cloud, contributing a new book on API Platform &
contributions to development of more than a dozen other titles ranging from Apache Camel to
Cloud Computing Design
• Active blogger have had a number of articles published in various journals.
• Organizer of London Oracle Developer Meetup & Drones with APIs OS Project
Implementing API
Platform
& PaaS Community
Award
April & May 2018
3. 3Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. 3
Publications from the Capgemini
PaaS Team
https://oracle-integration.cloud
Order from …
• http://bit.ly/ImplICSBook
• http://bit.ly/ICS-Amazon
Goes to Print Q1 2018http://APIPlatform.cloud
Just gone to print
Order from …
• http://bit.ly/APIP-CS
• http://bit.ly/APIP-CS-
Amazon
4. 4Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.
Cloud Premier Partner
Oracle Diamond Partner
Oracle Cloud Managed Service
Provider (*New!) partner – only a
handful of SI’s
Only Global SI to be accredited as
Oracle Authorized Education Center
Part of Beta programmes for:
Container Native & Microservices
Inteligent Chatbot
API platform
Integration cloud
Process cloud
Oracle Self-Service Automation
Oracle IoT Cloud
Oracle Mobile Cloud
Continuous investments in cloud
accelerators
5 Oracle Aces: 2 Directors, 3 Aces
Real experts and thought leaders including
several books:
2013: Oracle SOA Governance
Implementation
2015: Oracle API Management
Implementation
2016: Oracle Case Management
Solutions
2017: Implementing Integration
Cloud Service
Oracle API Platform CS
Implementation
Enterprise API Management
Several publications in OTN, Oracle
Magazine, Oracle Scene & Other
2018 – Outstanding PaaS Contribution & Outstanding API
Contribution
2017 – Gold & Silver UKOUG Partner of the Year Awards
2017 – Global Excellence Award for Extend and Connect
2017 – API PaaS Community Award
2017 – Chatbot PaaS Community Award
2016 – Oracle Specialized Partner of the Year: Industry
2016 – Oracle University Partner of the Year
2016 – BPM and Cloud community awards
2015 – Oracle Customer Support Services Partner of the Year
2011 – Global Partner of the Year Award for Oracle
Applications
2012 – Fusion Middleware partner of the year
2010 – Partner of the year for Oracle Fusion Middleware
2010 – 2010 EMEA Industry Partner of the Year
2010 – Oracle Customer Services Partner of The Year
2009 – Oracle Customer Services Partner of The Year
2008 – Oracle Customer Services Partner of The Year
Alliance and Strategic Partnership Awards & Recognitions Thought Leadership
Article – June 17
Article – June 17
Podcast – August 17
Capgemini & Oracle
5. 5Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. 5Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. 5
01
02
03
04
05
06
What do we mean by
Microservices?
How can monolithic containers
be made to help me ?
Use of WebLogic
What could my development
approach look like?
Take Aways
Q&A / Debate?
Agenda
6. 6Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.
What do we mean by
Microservices?
7. 7Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
What do we really mean by Microservices?
8. 8Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
An architecture that structures the application as a set of loosely coupled, collaborating
services … Each service implements a set of narrowly, related functions.
Services communicate using either synchronous protocols such as HTTP/REST or
asynchronous protocols such as AMQP. Services can be developed and deployed
independently of one another…
- Chris Richardson, microservices.io
Microservices are small, autonomous services that work together.
—Sam Newman, Thoughtworks
Loosely coupled service-oriented architecture with bounded contexts.
—Adrian Cockcroft, formerly Netflix, now VP Cloud Architecture Strategy at AWS
What do the thought leaders say ….
9. 9Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
Monolith, Microservices & Mini Apps …
some characterization
Diagrams based on Microservices by James Lewis
- Thoughtworks
https://martinfowler.com/articles/microservices.html
10. 10Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
Monolith, Microservices & Mini Apps
11. 11Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
Monolith, Microservices & Mini Apps
(aka Microservices on a Monolith)
12. 12Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
Are you going to miss the point?
• Paraphrase Martin Fowler – best way to do
microservices is build the monolith first
• Microservices is as much organization, people and
design as it is tech
Why Microservices?
• It’s the thing to do,
• We want new toys,
• It will keep the development team happy,
• It’s the only way to develop in the cloud
• My ability to deliver is too slow (or I need
my development to go faster),
• I need lower coupling and modularity to
help re-use,
• I need ways to scale my solution in
different ways,
• Things need to be elastic and more
dynamic at runtime,
• I need to find ways to future proof my
current investments,
13. 13Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
Understanding the Premium & Debunk
some Myths
App Server /
Runtime Platform
App
Host Servers
Bare Metal with a
hypervisor or just a
cluster of servers with
an OS such as Linux
Container Mgmt
Kubernetes / Istio
Microservice Mesh /
Mesos etc
ContainerContainer
Container solution such
as Docker
App Svr App Svr
Simple server process to
execute app logic e.g.
Apache
Service
Service
Service
Application Logic –
discrete unconnected
solutions and potentially
Polyglot in nature
Enterprise
class app
server offering
many features
such as
WebLogic –
very capable
but also very
complex. Large
footprint
unless stripped
down
App – multiple
Jars running
on a single OS
process that is
multithreaded
TomakeachangesafelyIneedtounderstand
allofthisHost Servers
Monolith Microservices
Whenatscale
specialismallowsthis
To make a change safely I need
to understand all of this
14. 14Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
Understanding the Premium & Debunk
some Myths
Host Servers
App Server /
Runtime Platform
App
ContainerContainer
Container Mgmt
Service
App Svr App Svr
Service
Service
To make a change safely I need
to understand all of this
TomakeachangesafelyIneedtounderstand
allofthis
Host Servers
Monolith Microservices
Whenatscale
specialismallowsthis
App Server /
Runtime Platform
App
Host Servers
MicroApp
App App
ReducedKnowledgefootprint
15. 15Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
Runtime
Understanding the Premium & Debunk
some Myths
Host Servers
App Server /
Runtime Platform
App
ContainerContainer
Container Mgmt
Service
App Svr App Svr
Service
Service
To make a change safely I need
to understand all of this
TomakeachangesafelyIneedtounderstand
allofthis
Host Servers
Monolith Microservices
Whenatscale
specialismallowsthis
Runtime
App
Host Servers
Microservices (Micro
app) on a Monolith
App App
ReducedKnowledgefootprint
Runtime
16. 16Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.
Build on - Martin Fowler
https://martinfowler.com/bliki/MicroservicePremium.html
The micro apps approach will
incur overhead, but less than all
out microservices
17. 17Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.
How we can achieve the
Microservice goals using
WebLogic ?
18. 18Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
Why try microservices on WLS?
• Organisational Investment & Culture
• Broad adoption of WLS can be a significant
investment - desire to maximise investment (or
desire not to have $$$ spent seen as redundant)
• Minimize vendors - encourages big vendor with
broad offering rather than specialist orgs.
• Mindset of the decision makers – prefer tried and
tested technologies
• Open Source vs Closed Source
• Really supported vs unsupported or self supported
(often perception issue)
• Often closed source offerings – hardened or pre-
integrated versions of open source e.g. JMS or JNDI
• Open source licensing – still can bite – particularly
when thinking about monetization
• Typical tech associated with Microservices can be seen
as too big a change for some – resistant to big change
• Vertical Alignment
• Exploit defined markets & partnership relationships (big vendor partner
may help sell)
• Vendor relationship
Martin Fowler
19. 19Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
WebLogic as a Platform
Server 1
Single
DomainWLS Svcs
Coherence
JMS AQ
JNDI
Servlet
Node
Mgr
Managed
Svr
Admin
Svr
• Admin Svr & Domain maybe combined
• All services included into a domain as
normal practise
• All libraries included into domain
• Only 1 domain as easy – no setup
• Apps / projects isolated when worked
on by developers – but deployed to
common location
• Accumulation of artefacts
• Delivery pressure + desire to re-use –
leads cross dependencies and library
level
SOA
Mediator
BPEL OSB
Rules
Workflow
20. 20Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
WebLogic with Docker
WLS in Docker …
• WLS certified with Docker as 12.1.3 BUT…
• Mean it’s a microservice?
maybe
• Same mistakes can be made
• It does allow us to simplify
deployment
• It does allow us create separation
WLS in Docker is a winner for…
• Accelerating development
• Likely to develop deploQuick to start using
• My development environment can be anywhere – any
host OS, in ANY cloud
• No installation processes needed
• Deployment processes using WLST – making switch to
production grade deployment better
• But what about license costs beyond the OTN
agreement?
21. 21Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
WebLogic as a Micro App Platform
Server 1
Single
DomainWLS Svcs
Coherence
JMS AQ
JNDI
Servlet
Node
Mgr
• WebLogic 12.2.1 also introduced idea
of Partitions …
• Thread management allowing QoS
control – through resources
• Resources can have access at
• Domain level – i.e.
everywhere
• Partition level – shared with
no one
• Although core processes are
shared e.g.
• Node Manager
• JMS threads
• Coherence processes
Managed
Svr
App 1
Domain
Partition 1
Admin
Svr
• Our microservice simile
• We’ve taken to call a MicroApp
as it resides in an App Server –
and avoids ‘contentious
disputes over what a
microservice must look like’
22. 22Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
Using the WLS Core Services
Node Manager
• per server and looks after the O/S connection
• Make Node manager work – keep all services
alive (managed svr, admin server etc)
Managed Server
• Provides the JVM which we can resource share
• Home for shared services/execution resources
• Key limitation - this fails then you lose all your
microapps
Admin Server
• This is optional – but having 1 provides a simple dashboard into
domain and state
• Avoids needing to know WLST
23. 23Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
Server 1
WebLogic as a Micro App Platform
Single
Domain
Node
Mgr
• To add extra microapps we add new
partitions
• Footprint grows by threads
allocated & some JVM Memory
• Configuration in the partitions is
isolated
• We might have to enable
additional shared services e.g.
JMS & coherence at the domain
or sever level
Managed
Svr
App 1
Domain
Partition 1
App 2
Domain
Partition 2
WLS Svcs
Coherence
JMS AQ
JNDI
Servlet
Admin
Svr
24. 24Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
Server nServer 1
WebLogic as a Micro App Platform - Scale
Node
Mgr
• Can scale the capacity by:
• Scaleup – utilize a VM to provide
transparently more memory &
CPUs – therefore more threads =
more potential partitions without
degrading existing nodes
• Scale out = more compute nodes into
the domain. Apply partitions onto
domain
• Note we’ve not bothered with passive
Admin Svrs
Managed
Svr
Managed
Svr
App 1
Domain
Partition 1
App 2
Domain
Partition 2
WLS Svcs
Coherence
JMS AQ
JNDI
Servlet
Admin
Svr
Node
Mgr
WLS Svcs
Coherence
JMS AQ
JNDI
Servlet
Single Domain
25. 25Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
Exploit WLS Clustering?
WLS Clustering gives us …
• Shared session management across nodes
• Rolling upgrade process
• Cross node application deployment
• Load balancing
• Failover mechanisms
There are downsides ….
• Shared session management can create a lot of
overheads and counter productive in the wrong scenario
• Upgrade mechanics – clustering imposes constraints on
platform versions as well providing feature. We can avoid this
by adopting container style approaches of replacing nodes
• Load balancing presumes there is a front end – but you may
not have a front end. So apply microservice thinking use
component best & dedicated to task
My view – err away, the closer to a container model your deployment, the easier to make the
change
26. 26Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
The roll of messaging
Messaging important to establish …
• Asynchronous communication
between services
• Lower coupling …
• Support for moving from
Orchestration to Choreography –
dumb pipes smart endpoints
Orchestration
The mechanics
with the
channel direct
traffic node to
node
Choreography
The channel is a
simple dumb
pipe, everyone
listens and
decides what to
do
To be polyglot friendly your messaging needs both
invocation interface spec e.g. JMS and a wire level
specification e.g. AMQPP, Apache Avro
JMS?
27. 27Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
The is Kafka right ?
JMSProducer
Consumer
Consumer
Consumer
Storage
Why is JMS not so great?
• No wire level spec – so Polyglot an issue
• Often implemented with DB storage making
it relatively slow and single node dependency
• Kafka resolves by using HDFS
But there are transition options …
1. JMS only with topics
2. Kafka + JMS client
3. Future refactor JMS client out – 1 service
at a time
KafkaProducer
Consumer
Consumer
Consumer
HDFS
Consumer
28. 28Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.
How do I build the code?
- OR -
Spring is my Friend
29. 29Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
How does my Development process work?
Adapt the design approach ….
• Start to embody the design concepts
• Keep it small, keep it decoupled
• Design to do 1 thing well, if there’s a different API
for it, then its another service
• Use Bounded Contexts and stay inside your
boundaries.
• Many Microservice patterns are solution agnostic
– and you can find comparable solutions built in a
monolithic style
Chris Richardson
Microservices.io
(Microservice Patterns)
Difficult to
realize in an
monolithic
platform
Would require
new capability
30. 30Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
How does my Development process work?
Adapt the development process …
• Every Microservice text there is puts significant
emphasis on CI-CD
• Rapid & frequent
• Good test coverage
• Make mocking interfaces easy
• API 1st approaches will increase likelihood of mocking
• Get development to be local for longer …
• Use a small container that provides the basics as the
dev container,
• It will encourage decoupled thinking – if you know
code will get moved to a different container, you’re
going to be careful – you’re not going to rewrite
• More decoupling == easier testing
• If development is getting bound to the container –
you have a ‘bad smell’
• If you need a service it’s an API
Design
Build Local
Test Local
Start WLS Parallel
(alternate
Dependencies Set)
Integrate
Regression
Production
31. 31Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.© 2017 Capgemini. All rights reserved.
Fine in theory, but to make it work in
practise …
Spring Boot to the rescue
• Spring Boot leverages Spring platform in an
‘opinionated manner’ i.e.
• Works with Spring elements that are commonly
used together
• Derives dependencies based on provided info for
project types,
• Provide Spring Boot with configuration and it will
create the Java framework for you and allow
deployment to …
• Apache Tomcat, Apache Jetty
• Undertow, Netty,
• WebLogic, Websphere …
• Spring Boot is recognised as a framework for building ‘typical’ container
centric microservices
• As Spring is proven with WLS, once you microservice is, swap your
dependencies to the WLS versions – Build & DEPLOY!
Word of Warning – changing dependencies for WLS can be tricky, is not for the Java newbie
32. 32Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
Exploiting Cloud …
Microservices need cloud ?
• People conflate cloud and microservices
• They can be used together to gain benefit
• That can be used for monoliths just as easily
• BUT …
• Typically it is easier to create and destroy
environments
• Redeploys to virgin environments help verify
that you’re not creating implicit dependencies
• Typically instantiation of cloud is faster than
organization processes on prem – so its easier
• Oracle offers BYOL options …
• Reduces costs, but if License investment is one
of the factors preventing ‘pure’ microservices
then this is in keeping with expectation
33. 33Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. 33© 2017 Capgemini. All rights reserved.
Make the right choices and you set yourself on
a journey to transition without too much pain.
A less disruptive transition may be more
palatable
Microservices is a design style NOT
tech – so design microservices even
if you have to run on a monolithic
platform
A few things to keep in mind when looking at
adopting or adapting this approach …
Microservices don’t come without cost & can be
difficult – so need to take on for the right reasons
If we knew what it was we were
doing, it would not be called
research, would it?
Albert Einstein
Takeways
34. 34Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
London Developer Meetup
This group is about developing Enterprise-grade Cloud
Native applications on the Oracle Cloud Platform,
covering topics like Microservices Architecture,
developing in Node, Python and PHP, using Low Code
development tools to build Mobile apps, and much
more.
Share your knowledge with the community
• Hands-on PaaS & IaaS presentations & labs
• Networking with pizza & beer
Location: Oracle City Office
One South Place, London EC2M 2RB
Registration:
www.meetup.com/Oracle-Developer-Meetup-London
35. 35Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved. ‹#›© 2017 Capgemini. All rights reserved.
Thankyou
Presentation Title | Author | Date
36. 36Microservices in a Monolith World | Phil Wilkins | May 2018 © 2018 Capgemini. All rights reserved.
With more than 190,000 people, Capgemini is present in over 40 countries and
celebrates its 50th Anniversary year in 2017. A global leader in consulting, technology
and outsourcing services, the Group reported 2016 global revenues of EUR 12.5 billion.
Together with its clients, Capgemini creates and delivers business, technology and
digital solutions that fit their needs, enabling them to achieve innovation and
competitiveness. A deeply multicultural organization, Capgemini has developed its own
way of working, the Collaborative Business Experience™, and draws on Rightshore®, its
worldwide delivery model.
About Capgemini
Learn more about us at
www.capgemini.com
This message contains information that may be privileged or confidential and is
the property of the Capgemini Group.
Copyright © 2017 Capgemini. All rights reserved.
Rightshore® is a trademark belonging to Capgemini.
This message is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please
notify the sender immediately and delete all copies of this message.
Hinweis der Redaktion Microservices don’t come without cost & can be difficult – so need to take on for the right reasons
Make the right choices and you set yourself on a journey to transition without too much pain. A less disruptive transition may be more palatable
Microservices is a design style NOT tech – so design microservices even if you have to run on a monolithic platform