0
Java Architectures
Eberhard Wolff
http://ewolff.com
A New Hope
Eberhard Wolff - @ewolff
What happens
with a talk titled
like this?
Architecture
of Enterprise
Java Apps
Eberhard Wolff - @ewolff
Eberhard Wolff - @ewolff
Eberhard Wolff - @ewolff
How can I
implement a
new feature???
Eberhard Wolff - @ewolff!
Eberhard Wolff - @ewolff
ECommerce System
Spring &
OSGi
New Stuff
Eberhard Wolff - @ewolff
New StuffSpring &
OSGi
New Stuff
ECommerce System
Eberhard Wolff - @ewolff
HTTP
New
Stuff
Links
No legacy code
Any technology
"
Small code base
Eberhard Wolff - @ewolff
Micro Services
•  Component Model
•  Component…
•  Separate process
•  Individual deployment unit...
Eberhard Wolff - @ewolff
Online Shop
Order
Catalog
Search
Billing
Eberhard Wolff - @ewolff
Online Shop
elasticsearch
Spring Batch
Oracle
Spring MVC
MongoDB
Order
Catalog
Search
Billing
Service might
be even
smaller
Eberhard Wolff - @ewolff
Continuous
Delivery
Eberhard Wolff - @ewolff
Continuous Delivery:

Build Pipeline
Commit
Stage
Automated
Acceptance
Testing
Automated
Capacity...
Eberhard Wolff - @ewolff
Without Micro Services
•  Modify order process slightly
•  Billing, Search & Catalog unchanged
Or...
Eberhard Wolff - @ewolff
Order
Catalog
Search
Billing
Eberhard Wolff - @ewolff
Continuous Delivery:

Everything Tested etc
Commit
Stage
Automated
Acceptance
Testing
Automated
C...
Eberhard Wolff - @ewolff
Build Pipeline
•  Just one component changed!
•  Lots of unneeded work
•  Takes much too long
Eberhard Wolff - @ewolff
With Micro Services
Commit
Stage
Automated
Acceptance
Testing
Automated
Capacity
Testing
Manual
E...
Eberhard Wolff - @ewolff
Release
•  Just a single component
•  Faster feedback
•  Easier deployment
•  Rollback of single ...
Eberhard Wolff - @ewolff
How to scale
agile?
Implement
more feature
Eberhard Wolff - @ewolff
Conways Law
Architecture
copies
communication structures
of the organization
Eberhard Wolff - @ewolff
Online Shop
Order
Catalog
Search
Billing
Component = Team
Eberhard Wolff - @ewolff
Micro Service 
•  Team independent from each other
•  No code dependencies
•  Can use individual ...
Eberhard Wolff - @ewolff
Architecture Challenges
•  Code Reuse?
•  Handling interfaces?
•  Managing dependencies between
(...
Install and
configure App
Server for each
Microservice??
Simple Java
Application?
What about
Operations?
Spring Boot
Demo
Eberhard Wolff - @ewolff
Why Spring Boot?
•  Easier deployment
•  i.e. just a JAR
•  Built in operations support
Eberhard Wolff - @ewolff
Other Technologies
•  Dropwizard by Yammer
•  vert.x
•  Play Framework
Micro Services
as a
Component
System
Eberhard Wolff - @ewolff
Components Collaborate
Micro
Service
Micro
Service
Link
Data Replication
REST
Messaging
Micro Service
can easily
integrate
with Legacy
Deploy &
Operate?
Eberhard Wolff - @ewolff
Component Model
•  No restriction on language etc
•  Individual processes
•  + infrastructure (da...
Eberhard Wolff - @ewolff
Docker
•  No true virtualization
•  Linux Containers (lxc)
•  i.e. shared kernel
•  i.e. separate...
Eberhard Wolff - @ewolff
Docker File Systems
•  Read only base images
•  +read/write image
•  Can be stacked
Application
R...
Eberhard Wolff - @ewolff
Docker
•  Linux only
•  So: Run it in VM
•  Controlled by Vagrant
Docker Demo
Eberhard Wolff - @ewolff
Vagrant VM
Docker Container
Redis
Port
6379
6379
6379
Eberhard Wolff - @ewolff
Communication Between
Docker Container
•  Via ports
•  Via data volumes
Docker is a
Component
System
Eberhard Wolff - @ewolff
Example
•  Log file analysis
•  ELK Stack
•  Elasticsearch: Store
•  Logstash: Parse
•  Kibana: W...
Eberhard Wolff - @ewolff
Dockerized ELK Stack
•  1 Vagrantfile (25 lines)
•  6 Dockerfiles (total 28 lines)
•  1 HTML file...
Eberhard Wolff - @ewolff
Vagrant VM
Container
user-registration
8080
8081
Port
8081
Container
elasticsearch
Container
logs...
Demo ELK
Stack
Eberhard Wolff - @ewolff
Links
•  https://github.com/ewolff/user-
registration
•  http://www.heise.de/developer/
artikel/E...
Eberhard Wolff - @ewolff
Eberhard Wolff - @ewolff
Micro Services
•  A new hope against Java Monoliths
•  Also great for legacy
•  Spring Boot for i...
Eberhard Wolff - @ewolff
Thank You!!
eberhard.wolff@gmail.com
@ewolff
Upcoming SlideShare
Loading in...5
×

Java Architectures - a New Hope

2,100

Published on

Large Java Enterprise Applications

Published in: Technology
0 Comments
12 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,100
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
59
Comments
0
Likes
12
Embeds 0
No embeds

No notes for slide

Transcript of "Java Architectures - a New Hope"

  1. 1. Java Architectures Eberhard Wolff http://ewolff.com A New Hope
  2. 2. Eberhard Wolff - @ewolff What happens with a talk titled like this?
  3. 3. Architecture of Enterprise Java Apps
  4. 4. Eberhard Wolff - @ewolff
  5. 5. Eberhard Wolff - @ewolff
  6. 6. Eberhard Wolff - @ewolff How can I implement a new feature???
  7. 7. Eberhard Wolff - @ewolff!
  8. 8. Eberhard Wolff - @ewolff ECommerce System Spring & OSGi New Stuff
  9. 9. Eberhard Wolff - @ewolff New StuffSpring & OSGi New Stuff ECommerce System
  10. 10. Eberhard Wolff - @ewolff HTTP New Stuff Links No legacy code Any technology " Small code base
  11. 11. Eberhard Wolff - @ewolff Micro Services •  Component Model •  Component… •  Separate process •  Individual deployment unit •  GUI+Logic •  Small services+GUI – unlike SOA
  12. 12. Eberhard Wolff - @ewolff Online Shop Order Catalog Search Billing
  13. 13. Eberhard Wolff - @ewolff Online Shop elasticsearch Spring Batch Oracle Spring MVC MongoDB Order Catalog Search Billing
  14. 14. Service might be even smaller
  15. 15. Eberhard Wolff - @ewolff Continuous Delivery
  16. 16. Eberhard Wolff - @ewolff Continuous Delivery:
 Build Pipeline Commit Stage Automated Acceptance Testing Automated Capacity Testing Manual Explorative Testing Release
  17. 17. Eberhard Wolff - @ewolff Without Micro Services •  Modify order process slightly •  Billing, Search & Catalog unchanged Order Catalog Search Billing
  18. 18. Eberhard Wolff - @ewolff Order Catalog Search Billing
  19. 19. Eberhard Wolff - @ewolff Continuous Delivery:
 Everything Tested etc Commit Stage Automated Acceptance Testing Automated Capacity Testing Manual Explorative Testing Release Order Catalog Search Billing
  20. 20. Eberhard Wolff - @ewolff Build Pipeline •  Just one component changed! •  Lots of unneeded work •  Takes much too long
  21. 21. Eberhard Wolff - @ewolff With Micro Services Commit Stage Automated Acceptance Testing Automated Capacity Testing Manual Explorative Testing ReleaseOrder
  22. 22. Eberhard Wolff - @ewolff Release •  Just a single component •  Faster feedback •  Easier deployment •  Rollback of single service also easier
  23. 23. Eberhard Wolff - @ewolff How to scale agile? Implement more feature
  24. 24. Eberhard Wolff - @ewolff Conways Law Architecture copies communication structures of the organization
  25. 25. Eberhard Wolff - @ewolff Online Shop Order Catalog Search Billing Component = Team
  26. 26. Eberhard Wolff - @ewolff Micro Service •  Team independent from each other •  No code dependencies •  Can use individual technology stack •  Can even deploy independently •  Speed up development
  27. 27. Eberhard Wolff - @ewolff Architecture Challenges •  Code Reuse? •  Handling interfaces? •  Managing dependencies between (>100) Services? •  Global architecture? •  Global refactorings?
  28. 28. Install and configure App Server for each Microservice??
  29. 29. Simple Java Application? What about Operations?
  30. 30. Spring Boot Demo
  31. 31. Eberhard Wolff - @ewolff Why Spring Boot? •  Easier deployment •  i.e. just a JAR •  Built in operations support
  32. 32. Eberhard Wolff - @ewolff Other Technologies •  Dropwizard by Yammer •  vert.x •  Play Framework
  33. 33. Micro Services as a Component System
  34. 34. Eberhard Wolff - @ewolff Components Collaborate Micro Service Micro Service Link Data Replication REST Messaging
  35. 35. Micro Service can easily integrate with Legacy
  36. 36. Deploy & Operate?
  37. 37. Eberhard Wolff - @ewolff Component Model •  No restriction on language etc •  Individual processes •  + infrastructure (database etc) •  JARs, WARs, EARs: No good fit •  Virtual machines as components? •  Overhead??
  38. 38. Eberhard Wolff - @ewolff Docker •  No true virtualization •  Linux Containers (lxc) •  i.e. shared kernel •  i.e. separate file systems
  39. 39. Eberhard Wolff - @ewolff Docker File Systems •  Read only base images •  +read/write image •  Can be stacked Application Read / Write Java Ubuntu
  40. 40. Eberhard Wolff - @ewolff Docker •  Linux only •  So: Run it in VM •  Controlled by Vagrant
  41. 41. Docker Demo
  42. 42. Eberhard Wolff - @ewolff Vagrant VM Docker Container Redis Port 6379 6379 6379
  43. 43. Eberhard Wolff - @ewolff Communication Between Docker Container •  Via ports •  Via data volumes
  44. 44. Docker is a Component System
  45. 45. Eberhard Wolff - @ewolff Example •  Log file analysis •  ELK Stack •  Elasticsearch: Store •  Logstash: Parse •  Kibana: Web based GUI •  Install three servers •  Automate installation ... !
  46. 46. Eberhard Wolff - @ewolff Dockerized ELK Stack •  1 Vagrantfile (25 lines) •  6 Dockerfiles (total 28 lines) •  1 HTML file (11 lines) •  1 Config (Logstash) (29 lines) •  Total: 93 lines, 9 files •  Including one RegExp !
  47. 47. Eberhard Wolff - @ewolff Vagrant VM Container user-registration 8080 8081 Port 8081 Container elasticsearch Container logstash 9200 9200 Port 9200 9200 link Container kibana Port 8080 8080 8080 Browser Volume /log
  48. 48. Demo ELK Stack
  49. 49. Eberhard Wolff - @ewolff Links •  https://github.com/ewolff/user- registration •  http://www.heise.de/developer/ artikel/Episode-44-Modularisierte- Architektur-fuer-grosse- Systeme-2195818.html •  http://projects.spring.io/spring-boot/ •  http://www.docker.com/ •  http://www.docker.com/tryit
  50. 50. Eberhard Wolff - @ewolff
  51. 51. Eberhard Wolff - @ewolff Micro Services •  A new hope against Java Monoliths •  Also great for legacy •  Spring Boot for implementation •  Docker as component model & runtime
  52. 52. Eberhard Wolff - @ewolff Thank You!! eberhard.wolff@gmail.com @ewolff
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×