javaee microservices -the payara way

Post on 09-Jan-2017

2.245 Views

Category:

Technology

6 Downloads

Preview:

Click to see full reader

TRANSCRIPT

@croft#Devoxx #PayaraMicro #BadassFish

Java EE Microservices:The Payara Way

Mike CroftPayara

`

@croft#Devoxx #PayaraMicro #BadassFish

Who am I?• Java Middleware Consultant• Payara support• @croft• Snowboarder

@croft#Devoxx #PayaraMicro #BadassFish

Who are you?• Developers?• Ops?• DevOps?• Everything…!?

@croft#Devoxx #PayaraMicro #BadassFish

What is this about?• Buzzwords?• Opinions?

• Tools-In-Action

@croft#Devoxx #PayaraMicro #BadassFish

What is Payara?• Payara is…• Built from GlassFish – Java EE RI• Entirely open source (CDDL), forever• Active• Released quarterly

• (snapshot builds also available)

@croft#Devoxx #PayaraMicro #BadassFish

What is Payara Micro?• Payara Micro is…• Micro! (~58MB)• Elastic• Fully embeddable (if you

want…)• Web Profile “plus”• On Maven Central

<dependency><groupId>fish.payara.extras</groupId><ArtifactId>payara-micro</artifactId><version>4.1.1.154</version><type>jar</type>

</dependency>

Demo

@croft#Devoxx #PayaraMicro #BadassFish

@croft#Devoxx #PayaraMicro #BadassFish

Demo Scenario• Fat JAR or skinny WAR?• RESTful API?• Data centre or cloud?

@croft#Devoxx #PayaraMicro #BadassFish

Demo Scenario• “Traditional” hosts

• Local deployments• AWS EC2 via Vagrant

• Containers

• Bonus: full-fat Java EE full profile cluster in Docker (if there’s time)

@croft#Devoxx #PayaraMicro #BadassFish

Demo• Start Payara Micro

• java -jar payara-micro.jar

• Start another!• …• java -jar payara-micro.jar --autoBindHttp

• What about actually running somethinguseful?

@croft#Devoxx #PayaraMicro #BadassFish

Demo• Payara REST JCache example

• https://github.com/payara/Payara-Examples/tree/master/rest-examples/rest-jcache

java -jar payara-micro.jar --autoBindHttp --deploy myApp.war

OR

java -jar payara-micro.jar --autoBindHttp --deploymentDir myApps/

@croft#Devoxx #PayaraMicro #BadassFish

Demo

@croft#Devoxx #PayaraMicro #BadassFish

Demo• PUT

@croft#Devoxx #PayaraMicro #BadassFish

Demo• GET

@croft#Devoxx #PayaraMicro #BadassFish

Demo• Payara Micro + AWS = Elastic cluster

• Vagrant AWS plugin• Vagrant ENV plugin

• Note: This is just a demo, the better way is to use a DevOps tool!

@croft#Devoxx #PayaraMicro #BadassFish

Demo• Docker

@croft#Devoxx #PayaraMicro #BadassFish

Demo• Docker

@croft#Devoxx #PayaraMicro #BadassFish

Demo

• Note: This is just a demo, the better way is to use some of the extensive tooling (e.g. etcd, kubernetes, docker swarm)

@croft#Devoxx #PayaraMicro #BadassFish

Questions?

top related