Slide 1

Slide 1 text

Java App Servers are Dead Greg Turnquist (@gregturn) courtesy of Eberhard Wolff (@ewolff)

Slide 2

Slide 2 text

An Application on a server needs an Application Server

Slide 3

Slide 3 text

Why?? The Price We Pay What now?

Slide 4

Slide 4 text

App Server… • …container for multiple applications • …infrastructure • …deployment • …monitoring

Slide 5

Slide 5 text

• Isolation • ClassLoader • Can lead to non-trivial problems Multiple Applications App Server App 1 App 2 App 3 App 4

Slide 6

Slide 6 text

Isolation • ClassLoader is not enough • CPU? • Memory? • Filesystems? • Applications are not truly isolated • This isolation is what Operating Systems do

Slide 7

Slide 7 text

• Is this what really happens? • Java EE spec talks about “components” • Not Apps Multiple Applications App Server App 1 App 2 App 3 App 4

Slide 8

Slide 8 text

What It Is More Like… App Server App 1 App Server App 1 App Server App 1 App Server App 1 App Server App 1 App Server App 1 Cluster

Slide 9

Slide 9 text

App Server… • …container for multiple applications • …infrastructure • …deployment • …monitoring

Slide 10

Slide 10 text

Infrastructure: Net / Threads • Support, i.e. for HTTP and thread pooling • Connection pooling • Can be done inside the application • Embedded servers (Tomcat, Jetty, Netty, etc.)

Slide 11

Slide 11 text

Infrastructure: Libraries • EJB, CDI, JPA, JSF… • Version tied to App Server version • App depends on Application Server • New libraries can’t be used until new App Server in production

Slide 12

Slide 12 text

Infrastructure: Libraries • Usually not every need covered • …so additional libraries are used • App Server libraries can be replaced by libraries • Makes application more portable • If you need additional libraries anyway… • …why not just package all of them?

Slide 13

Slide 13 text

Infrastructure: Application independent? • Each application has its own infrastructure • E.g. database connection • + specific configuration

Slide 14

Slide 14 text

Dependencies: App Server / Application App Server Application Libraries Infrastructure Specific configuration Cyclic dependency i.e. one component 1 App Server per Application

Slide 15

Slide 15 text

You Don’t Agree? • Can you deploy your application on a different server? • On a different version of the same server? • Without modifications to the server? • Do you deploy other applications on the App Server? • Could you? • is the application server or an installation script in your version control?

Slide 16

Slide 16 text

Application Servers are just another part of the Application

Slide 17

Slide 17 text

App Server… • …container for multiple applications • …infrastructure • …deployment • …monitoring

Slide 18

Slide 18 text

Deployment • Deployment Format: WAR, EAR, JAR… • Can’t define dependencies outside application • i.e. App Server version, database etc. • Operations usually work with deb, RPM, docker… • Completely different tool chain • Also: Usually UNIX services to start/stop

Slide 19

Slide 19 text

App Server… • …container for multiple applications • …infrastructure • …deployment • …monitoring

Slide 20

Slide 20 text

Monitoring • Provided by JMX • Can be integrated with SNMP, etc. • Works outside App Servers, too

Slide 21

Slide 21 text

Monitoring • New tools arise • Logs + Logstash / Kibana or Splunk • New Relic • Hadoop log file collection / analysis • REST-based monitoring resources • Scripts for monitoring

Slide 22

Slide 22 text

App Servers are needed for monitoring and deployment

Slide 23

Slide 23 text

App Servers come with a proprietary Ops Tool Set

Slide 24

Slide 24 text

App Server… • …container for multiple applications • …infrastructure • …deployment • …monitoring 1 App per Server (or cluster) App server part of application Deployment & monitoring OK but not standard tools

Slide 25

Slide 25 text

The Price We Pay

Slide 26

Slide 26 text

• Code • Package a WAR • Instal it • Unpack the WAR • Test • Solutions: JRebel, Spring Loaded • But: Why is it done at all? Slower Turnaround Why??

Slide 27

Slide 27 text

App Server: Complex Deployment • Deployment: not just an application • But also an Application Server • App Server configuration more complex than Application configuration • Look at automation scripts with Puppet / Chef, etc.

Slide 28

Slide 28 text

Cyclic Dependency Application - App Server • Application and App Server must fit each other • Configuration must be compatible • For each developer and each testing stage • Old configuration e.g. for bug fixes • Hard to get right

Slide 29

Slide 29 text

More Apps & Deployments • Continuous Delivery: Applications deployed more frequently • …in many different stages • Micro Service: Many more apps • SImple deployment even more important • App Servers become bigger headache

Slide 30

Slide 30 text

Different Ops Mindset • App Server administrator? • Deployment, monitoring, etc. have been solved already! • Package manager • Ops Monitoring • Why not stick to general solutions?

Slide 31

Slide 31 text

The Price We Pay App Server Slow Turn Around Standard OPs Tools Continuous Delivery Micro Services App Server specific OPs tools Deployment complex One infrastructure doesn’t fit all One App Server per Micro Service? Smaller deployment units

Slide 32

Slide 32 text

RIP Application Server!

Slide 33

Slide 33 text

What now???

Slide 34

Slide 34 text

The Re-Rise of the Applications • Create JAR files • …that contain a main class • Custom infrastructure • e.g. HTTP server • Or Batch • …

Slide 35

Slide 35 text

Monitoring & Deployment • Rely on standard Ops deployment and monitoring tools • REST-based monitoring URLs • Evaluate log files

Slide 36

Slide 36 text

Application: Benefit • Easier to Deploy: Just a JAR • + command line • + config file • Debug & run in IDE • Acceptance tests, etc. run much easier • Ensured: Infrastructure compatible with application & src controlled

Slide 37

Slide 37 text

Spring Boot Actuator & CRaSH Demo

Slide 38

Slide 38 text

Technologies • Spring Boot • Dropwizard by Yammer • Vert.x • Play Framework

Slide 39

Slide 39 text

Thank you! [email protected] @gregturn Send thanks to @ewolff