A Discovery Service for Java EE - Jfokus ... #SnoopEE - Jfokus 2016 @ivar_grimstad SnoopEE Ivar...

Click here to load reader

  • date post

    07-Apr-2020
  • Category

    Documents

  • view

    1
  • download

    0

Embed Size (px)

Transcript of A Discovery Service for Java EE - Jfokus ... #SnoopEE - Jfokus 2016 @ivar_grimstad SnoopEE Ivar...

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    SnoopEE

    Ivar Grimstad Principal Consultant, Cybercom Sweden

    JCP Expert Group Member (JSRs 368, 371, 375)

    A Discovery Service for Java EE

  • @ivar_grimstad#SnoopEE - Jfokus 2016

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    @ivar_grimstad

    https://github.com/ivargrimstad https://www.linkedin.com/in/ivargrimstad

    http://lanyrd.com/profile/ivargrimstad/

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    Discovering Microservices with

    SnoopEE

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    Service A Service B Service C

    Application

    Call A Call B Call C

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    Service A Service B Service C

    Application SnoopEE Discovery Service

    Register Register Register

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    Service A Service B Service C

    Application SnoopEE Discovery Service

    Register Register Register

    Lookup A

    Call A

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    Service A Service B Service C

    Application SnoopEE Discovery Service

    Register Register Register

    Lookup B

    Call B

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    Service A Service B Service C

    Application SnoopEE Discovery Service

    Register Register Register

    Lookup B

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    DEMO !

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    Hello World Bzzz

    Hello World SnoopEE Discovery Service

    Register Register Register

    Payara 4.1 Docker + GlassFish 4.1

    Docker + WildFly 9 WebSphere Liberty

    Docker + WildFly 8 WildFly Swarm

    Lookup

    Call

    Call

    Call

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    Hello World Bzzz

    Hello World SnoopEE Discovery Service

    Register Register Register

    Payara 4.1 Docker + GlassFish 4.1

    Docker + WildFly 9 Docker + WildFly 8 WildFly Swarm

    Lookup

    Call

    Call

    Call

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    Resources SnoopEE http://snoopee.agilejava.eu

    Samples https://github.com/ivargrimstad/snoop-samples

    Docker Images https://hub.docker.com/u/ivargrimstad

    http://snoopee.agilejava.eu https://github.com/ivargrimstad/spring-javaee https://hub.docker.com/u/ivargrimstad

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    cybercom.com

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    SnoopEE
 Service Registration

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    @EnableSnoopClient(serviceName="hello")

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    @EnableSnoopClient(name = "hello") @ApplicationPath("api") public class ApplicationConfig extends Application { }

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    SnoopEE
 Service Lookup

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    @Snoop(serviceName="hello")

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    @Inject @Snoop(serviceName = "hello") private SnoopServiceClient helloService;

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    SnoopEE Service

    Consumption

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    SnoopServiceClient

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    @Inject @Snoop(serviceName = "hello") private SnoopServiceClient helloService;

  • @ivar_grimstad#SnoopEE - Jfokus 2016

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    String helloResponse = helloService.simpleGet("hello") .filter(r -> r.getStatus()==200) .map(r -> r.readEntity(String.class)) .orElse("goodbye");

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    SnoopEE Configuration

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    System Properties

    Environment Variables

    Application Configuration

    (snoop.yml)

  • @ivar_grimstad#SnoopEE - Jfokus 2016

    snoop.yml

    snoop: host: http://localhost port: 8080 serviceRoot: snoop-hello-service/api snoopService: 192.168.99.100:8081/snoop-service/