Pico Services

28
@AdamBien / adam-bien.com Micro|Pico|Femto|Atto (MPFA) Services with Java EE 7 on Java 8 and Docker

description

11

Transcript of Pico Services

  • @AdamBien / adam-bien.com

    Micro|Pico|Femto|Atto (MPFA) Services with Java EE 7

    on Java 8 and Docker

  • adam-bien.com

    This talk is also fully compatible with micro, femto

    and atto services :-)

  • adam-bien.com

    Im working as Java EE/SE developer, consultant, sometimes author, speaker and trainer with Java since 1995...

    ...and still really enjoying it!

    Java Programming Language rocks!

    workshops.adam-bien.com

  • adam-bien.com

    blog.adam-bien.com twitter.com/AdamBien airhacks.comairhacks.ioairhacks.tv

  • adam-bien.com

    Adam Bien,

    press.adam-bien.com

  • adam-bien.com

    realworldpatterns.com

  • adam-bien.com

  • adam-bien.com

    Definition

    In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.http://martinfowler.com/articles/microservices.html

  • adam-bien.com

    Definition

    Microservices is a software architecture design pattern, in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs.These services are small, highly decoupled and focus on doing a small task.

    http://en.wikipedia.org/wiki/Microservices

  • adam-bien.com

    What would be the opposite?

  • adam-bien.com

    The Default Java EE Architecture

    Dont make me think

    BCE / ECB

    Conventions are paramount, configuration is optional

  • Business Component

    ControlBoundary Entity

  • Subsystem / Microservice / WARs

  • adam-bien.com

    The Default Java EE Deployment

    Self-contained WARs

    One Server, One Domain, One War

    No Dependencies

    No JARs

  • adam-bien.com

    Default Java EE Design

    No Interfaces

    95% Business Code

    Few annotations

    Just POJOs

    Straightforward testing

  • adam-bien.com

    Installation

    Download size: ~100MB

    Installation: unzip

    Start: Shell script execution

    Start time: 1s - 3secs

    Pure Java is default.

  • adam-bien.com

    Overhead: GlassFish v4

  • adam-bien.com

    Overhead: TomEE 1.7.1

  • adam-bien.com

    Overhead: Wildfly 8.1

  • adam-bien.com

    Overhead: WSL12.1.3.0.0

  • adam-bien.com

    Overhead Summary

    An idle browser consumes more memory, than an idle application server.

  • adam-bien.com

    Empty Chrome

  • adam-bien.com

    WAR Packaging

    unzip xyz.war 0,02s user 0,02s system 64% cpu 0,072 total

    jar -xvf zyz.war 0,17s user 0,05s system 114% cpu 0,191 total

  • adam-bien.com

    Maven Build

    24 lines of pom.xml and:[INFO] ------------------------------------------------------------------------

    [INFO] BUILD SUCCESS

    [INFO] ------------------------------------------------------------------------

    [INFO] Total time: 3.913 s

  • Some code.

  • adam-bien.com

    Thank You! and see you at

    workshops.adam-bien.com