Microservices, ‘enterprise’ and Conway’s law
Maciek Próchniak
Maciek Próchniak
Algebraic topologyhocolim
Group cohomology
Monads
GWTTouK
CamelOSGi
CQRS
Scala
Microservices - new game in town
Microservices - new game in town
NetflixDocker
LinkedIn
Kubernetes
etcd
mesos
puppet
puppet
AWS
kibana
hystrix
kafkaSpring Boot
Microservices?
Order
Promotions
Warehouse
User
Microservices - new game in town
● easy to understand● easy to change● easy to scale● can use different languages/stacks● resilience - fault tolerance
No docker on mesos??
SUCKERS...
How tall do you need to be?
Dev - Ops? Continous delivery?
Mature IT is…
● Release managment
● Separate development from operations
There are two people with permissions to create VMOne is on holidayThe other one is very busy...
THEY still think SOA & ESB
… but THEY don’t like each other ...
Conway’s law
organizations which design systems
are constrained to produce designs which are copies of the communication structures of these organizations
Vendors vs in-house dev
Choices?
● find (really) powerful ally
● change job
● sit down and think...
What can be saved in ‘enterprise’
● easy to understand● easy to change● easy to scale● can use different languages/stacks● resilience - fault tolerance
Microservices?
Just another way to build modular applications
Modular??
Modular development
Modular packaging
Modular deployment
Modular - code level
Modular - microservice
Modular - java container
Java is already ‘container’
Write once,run everywhere...(™)
Polyglot - why not?javascalagroovy clojurenashornjython, frege, jhaskell, erjang, jruby, ...
Modular java??
Jigsaw? Java 9?
OSGi - just how old r’u?
● standards
● static part - access and versioning
● dynamic part - services
● bad fame
OSGi - static part
● module i.e. bundle
● exports & imports
● versioning hell
OSGi - what is a bundle?
Versioning? REST??
OSGi - static part - bad fame
● libraries ignore OSGi● hibernate??● tooling support○ bnd○ eclipse/intelliJ○ mvn
OSGi - dynamic part
● often forgotten
● hides many nice gems
● µ-services they call them :)
OSGi - dynamic part
OSGi - dynamic part
● frameworks
○ blueprint
○ declarative services
OSGi - declarative services
OSGi - lifecycle
● code hot-swap
● service start/stop
OSGi - configuration
● *.properties
● file backed
● dynamic update
OSGi - configuration
OSGi - dynamic part
When one VM is not enough?
DOSGi - scalability, discovery
DOSGi - next EJB?
Fallacies of distributed computing?
Apache Karaf?
● microcontainer● OSGi framework + modules
Environment in git
config- preprod- prod
feature- calendar- e-payments
Karaf pipeline vision
Nexus
Karaf pipeline vision
OSGi + Karaf + Profiles
● defer decision to last moment
● separate code from deployment
● build on standards
● … and OSS
OSGi - limits
● resilience - fault tolerance?
● easy to change?
Hotdeploy - blessing or a curse
Development?...better than JRebel!
Deployment?… when did we managed to restart???
Still want unmodifiable containers
… maybe except for configuration
How much is left out?
● easy to understand● easy to change● easy to scale● can use different languages/stacks● resilience - fault tolerance
Modularity
just because you don’t have root access
doesn’t mean you cannot build modular applications...
Дякую@mpproch
[email protected]://github.com/mproch
● http://www.osgi.org/Main/HomePage
● http://karaf.apache.org/
● http://hawt.io/
● https://www.flickr.com/photos/wallyg/694715940/in/photolist-8WbnU3-8foQ5o-6sQcG4-7xzmMK-6SK7Py-4DCS7t-6FY31J-fQ1JYV-9L9nm8-24oAR3-5fGcNH-4VAr2p-k2zUu9-5dRa1X-4DCRMa-4rQd9k-accvf8-4LWiVT-ah8viP-fMxemF-86yAWa-8D9Lyq-6xXWJB-oKp9q2-86yFNF
● http://www.rebellesociety.com/wp-content/uploads/2013/09/WaitingForGodotW-1024x768.jpg● https://farm8.staticflickr.com/7226/7402624046_7e8f5ba62f_z_d.jpg● http://martinfowler.com/articles/enterpriseREST/images/service-diamond-dependency.png● http://pixabay.com/static/uploads/photo/2014/05/30/17/37/hipster-358479_640.jpg● https://farm1.staticflickr.com/143/320928712_a50ef836c1_z_d.jpg?zz=1● http://upload.wikimedia.org/wikipedia/commons/3/3e/K2_south_routes.jpg● https://farm2.staticflickr.com/1240/714170839_c25ae0026e_z_d.jpg?zz=1● https://farm9.staticflickr.com/8089/8438863370_f90b37bfb1_z_d.jpg