Top Banner
Microservices, ‘enterprise’ and Conway’s law Maciek Próchniak
72
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Jee conf 2015

Microservices, ‘enterprise’ and Conway’s law

Maciek Próchniak

Page 2: Jee conf 2015

Whoami?

Page 3: Jee conf 2015

Maciek Próchniak

Algebraic topologyhocolim

Group cohomology

Monads

GWTTouK

CamelOSGi

CQRS

Scala

Page 4: Jee conf 2015

Microservices - new game in town

Page 5: Jee conf 2015

Microservices - new game in town

NetflixDocker

LinkedIn

Kubernetes

etcd

mesos

puppet

puppet

AWS

kibana

hystrix

kafkaSpring Boot

Page 6: Jee conf 2015

Microservices?

Order

Promotions

Warehouse

User

Page 7: Jee conf 2015

Microservices - new game in town

● easy to understand● easy to change● easy to scale● can use different languages/stacks● resilience - fault tolerance

Page 8: Jee conf 2015

No docker on mesos??

SUCKERS...

Page 9: Jee conf 2015

How tall do you need to be?

Page 10: Jee conf 2015

Dev - Ops? Continous delivery?

Page 11: Jee conf 2015

Mature IT is…

● Release managment

● Separate development from operations

Page 12: Jee conf 2015

There are two people with permissions to create VMOne is on holidayThe other one is very busy...

Page 13: Jee conf 2015

THEY still think SOA & ESB

Page 14: Jee conf 2015

… but THEY don’t like each other ...

Page 15: Jee conf 2015

Conway’s law

organizations which design systems

are constrained to produce designs which are copies of the communication structures of these organizations

Page 16: Jee conf 2015

Vendors vs in-house dev

Page 17: Jee conf 2015

In-house dev

Page 18: Jee conf 2015

Vendors

Page 19: Jee conf 2015

Choices?

● find (really) powerful ally

● change job

● sit down and think...

Page 20: Jee conf 2015

What can be saved in ‘enterprise’

● easy to understand● easy to change● easy to scale● can use different languages/stacks● resilience - fault tolerance

Page 21: Jee conf 2015

Microservices?

Just another way to build modular applications

Page 22: Jee conf 2015

Modular??

Modular development

Modular packaging

Modular deployment

Page 23: Jee conf 2015

Modular - code level

Page 24: Jee conf 2015

Modular - microservice

Page 25: Jee conf 2015

Modular - java container

Page 26: Jee conf 2015

Java is already ‘container’

Write once,run everywhere...(™)

Page 27: Jee conf 2015

Polyglot - why not?javascalagroovy clojurenashornjython, frege, jhaskell, erjang, jruby, ...

Page 28: Jee conf 2015

Modular java??

Jigsaw? Java 9?

Page 29: Jee conf 2015

OSGi - just how old r’u?

● standards

● static part - access and versioning

● dynamic part - services

● bad fame

Page 30: Jee conf 2015
Page 31: Jee conf 2015

OSGi - static part

● module i.e. bundle

● exports & imports

● versioning hell

Page 32: Jee conf 2015

OSGi - what is a bundle?

Page 33: Jee conf 2015

Versioning? REST??

Page 34: Jee conf 2015

OSGi - static part - bad fame

● libraries ignore OSGi● hibernate??● tooling support○ bnd○ eclipse/intelliJ○ mvn

Page 35: Jee conf 2015

OSGi - bundles

Page 36: Jee conf 2015

Microservices?

Page 37: Jee conf 2015

OSGi - dynamic part

● often forgotten

● hides many nice gems

● µ-services they call them :)

Page 38: Jee conf 2015

OSGi - dynamic part

Page 39: Jee conf 2015

OSGi - dynamic part

● frameworks

○ blueprint

○ declarative services

Page 40: Jee conf 2015

OSGi - blueprint

Page 41: Jee conf 2015

OSGi - declarative services

Page 42: Jee conf 2015

OSGi - lifecycle

● code hot-swap

● service start/stop

Page 43: Jee conf 2015

OSGi - lifecycle

Page 44: Jee conf 2015

OSGi - configuration

● *.properties

● file backed

● dynamic update

Page 45: Jee conf 2015

OSGi - configuration

Page 46: Jee conf 2015

OSGi - dynamic part

Page 47: Jee conf 2015

Microservices?

Page 48: Jee conf 2015

When one VM is not enough?

Page 49: Jee conf 2015

DOSGi - scalability, discovery

Page 50: Jee conf 2015

DOSGi - next EJB?

Fallacies of distributed computing?

Page 51: Jee conf 2015

Apache Karaf?

● microcontainer● OSGi framework + modules

Page 52: Jee conf 2015

Apache Karaf?

Page 53: Jee conf 2015

Karaf shell

Page 54: Jee conf 2015

Hawtio

Page 55: Jee conf 2015

Hawtio

Page 56: Jee conf 2015
Page 57: Jee conf 2015

Profiles

Page 58: Jee conf 2015

Profiles

Page 59: Jee conf 2015

Environment in git

config- preprod- prod

feature- calendar- e-payments

Page 60: Jee conf 2015

Karaf pipeline vision

Nexus

Page 61: Jee conf 2015

Karaf pipeline vision

Page 62: Jee conf 2015

OSGi + Karaf + Profiles

● defer decision to last moment

● separate code from deployment

● build on standards

● … and OSS

Page 63: Jee conf 2015

OSGi - limits

● resilience - fault tolerance?

● easy to change?

Page 64: Jee conf 2015

Thread::stop

Page 65: Jee conf 2015

Hotdeploy - blessing or a curse

Development?...better than JRebel!

Deployment?… when did we managed to restart???

Page 66: Jee conf 2015

Still want unmodifiable containers

… maybe except for configuration

Page 67: Jee conf 2015

How much is left out?

● easy to understand● easy to change● easy to scale● can use different languages/stacks● resilience - fault tolerance

Page 68: Jee conf 2015

Modularity

just because you don’t have root access

doesn’t mean you cannot build modular applications...

Page 69: Jee conf 2015
Page 70: Jee conf 2015

Дякую@mpproch

[email protected]://github.com/mproch

Page 71: Jee conf 2015

● http://www.osgi.org/Main/HomePage

● http://karaf.apache.org/

● http://hawt.io/

Page 72: Jee conf 2015

● 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