SlideShare a Scribd company logo
1 of 64
Download to read offline
JEE ON DC/OS
101 AND FUN
Dr. Josef Adersberger ( @adersberger)
DC/OS = #GIFEE Google’s

(and Facebook’s, Twitter’s, Airbnb’s, …)

Infrastructure

For

Everyone

Else
#GIFEE => Cloud Native Applications

(apps like Google’s, Facebook’s, …)
TRAFFIC
DATA
FEATURES
AT NO OPPORTUNITY COSTSHORIZONTAL
The second largest monolith on earth!*
*) only beaten by the guys who are writing PHP code at large scale
JEE
CLOUD

NATIVE
+ =
CLOUD

NATIVE

JEE
instagram.com/toby_littledude
JEE IS NEITHER UGLY NOR FOCUSED ON MONOLITHIC APPS
▸ Java EE by itself is modular und lightweight in the recent versions.

(to be honest: Spring feels more heavyweight than JEE to me from
time to time)
▸ Java EE micro containers allow to modularize applications into
self-contained runnable units.
▸ How to develop enterprise applications based on Java EE is well
understood and knowledge is widespread.
▸ API is mature and standardized. Implementations are battle
proven.
JEE
CLOUD

NATIVE
+ =
CLOUD

NATIVE

JEE
instagram.com/toby_littledude
ARCHITECT’S VIEW
CLOUD NATIVE JEE
JEE IS NOT AN OVERALL MONOLITH. BUT PEOPLE TEND TO RUN
JEE APPS AS MONOLITHS WITHIN HEAVY WEIGHT APP SERVERS.
DESIGN CODE RUN
startup-cluster.sh
JEE Impl.
JEE App Server
JEE MICRO CONTAINER TO THE RESCUE: ENABLING MICROSERVICES ON JEE
DESIGN CODE RUN
main()
JEE impl. parts
A CLOUD OF JEE MICRO CONTAINERS. MISSION ACCOMPLISHED?
image: https://www.dreamstime.com
a cloud is not nothing!
what’s inside our cloud?
THE CLOUD NATIVE STACK
CLOUD NATIVE STACK
JEE MICROSERVICES
CLUSTER VIRTUALIZATION (computing, network, storage, memory)
CLUSTER RESOURCE MANAGER
CLUSTER ORCHESTRATOR
APPLICATIONS
CONTAINER
CLUSTER RESOURCES
MICROSERVICE PLATFORM

API Gateway
Micro Container
Configuration & Coordination
Diagnosability &

Monitoring
Infrastructure-as-a-Service Bare Metal Local Host
Service

Client
Service Discovery
DevOps Interface
‣ deploy
‣ rollback
‣ scale
‣ configure
Diagnose Interface
‣ analyze logs
‣ analyze metrics
‣ analyze traces
Edge Interface
‣ request service
‣ authenticate
CLUSTER VIRTUALIZATION (computing, network, storage, memory)
CLUSTER RESOURCE MANAGER
CLUSTER ORCHESTRATOR
APPLICATIONS
CONTAINER
CLUSTER RESOURCES
MICROSERVICE PLATFORM

API Gateway
Micro Container
Configuration & Coordination
Diagnosability &

Monitoring
Infrastructure-as-a-Service Bare Metal Local Host
Service

Client
Service Discovery
DevOps Interface
‣ deploy
‣ rollback
‣ scale
‣ configure
Diagnose Interface
‣ analyze logs
‣ analyze metrics
‣ analyze traces
Edge Interface
‣ request service
‣ authenticate
how to provide the right
resources for container
execution?
how to decouple from
physical hardware?
how to run (containerized)
applications on a cluster?
how to detect and solve
operational anomalies?
how to call other microservices
resilient and responsive?
how to execute a microservice
and embed it within the platform? how to provide cluster-wide
consensus on config values etc.?
how to expose microservice
endpoints to the internet?
how to manage
microservice endpoints
within the whole
platform?
goo.gl/xrVg3J
CLUSTER VIRTUALIZATION (computing, network, storage, memory)
CLUSTER RESOURCE MANAGER
CLUSTER ORCHESTRATOR
APPLICATIONS
CONTAINER
CLUSTER RESOURCES
MICROSERVICE PLATFORM

API Gateway
Micro Container
Configuration & Coordination
Diagnosability &

Monitoring
Infrastructure-as-a-Service Bare Metal Local Host
Service

Client
Service Discovery
DevOps Interface
Diagnose InterfaceEdge Interface
THE ZWITSCHER JEE SHOWCASE
ZWITSCHER-APP-HISTORY ZWITSCHER-APP-WIKIPEDIAZWITSCHER-APP-CHUCK
ZWITSCHER-APP-BOARD
keyword results + keyword history
random joke

(because every chuck
norris joke matches on
every keyword)
JDBC Open API
ZWITSCHER-APP-CHUCK
fallback
https://github.com/adersberger/cloud-native-zwitscher-jee
DEVELOPER’S VIEW
CLOUD NATIVE JEE 101
MICRO
CONTAINERDEPENDENCY INJECTION
APPLICATION LIFECYCLE
ENDPOINT EXPOSITION
THE JEE MICRO CONTAINER ECOSYSTEM
http://wildfly-swarm.io
https://ee.kumuluz.com
http://microprofile.io (to come)
http://tomee.apache.org
http://www.payara.fish/payara_micro
EMBEDDED
implements (unstable)
JEE MICRO CONTAINER COMPARISON CHART
Payara Micro Wildfly Swarm TomEE+ kumuluzEE
Servlets et al. x x x x
WebSockets x x x
JSF x x x
JAX-RS x x x x
JAX-WS x x
EJB *2 x x x
CDI x x x x
JTA x x x
JCA x x
JMS x x
JPA x x x x
Bean Validation x x x x
JBatch x x
Concurrency x x
JCache x x
JEE version JEE 7 JEE 7 JEE 6, JEE 7 part.*1 JEE 7 part.
Packaging WAR + JAR JAR JAR classes + JARs
Startup time 4s 4s 2s 1s
Size 57MB 83 MB 44 MB 15 MB
*1) http://tomee.apache.org/javaee7-status.html
*2) http://stackoverflow.com/questions/13487987/where-to-use-ejb-3-1-and-cdi
@Path(“/joke") @RequestScoped

public class ChuckJokeResource {

@Inject

private IcndbIntegration icndb;

@GET

@Produces("application/json")

public Response getJoke() {

Map<String, String> json = new HashMap<>();

json.put("message", icndb.getRandomJoke());

return Response.ok(json).build();

}

}
@ApplicationPath("/chuck")

public class ChuckJokeApplication extends ResourceConfig {

public ChuckJokeApplication() {

super();
register(ChuckJokeResource.class);

}

}
JAX-RS WITH CDI
bean-discovery-mode="all"
public class Main {



/**

* Starts the microservice container.

*

* Requires environment variable "PORT" according

* on what port to listen.

*

* @param args no arguments evaluated

*/

public static void main(String[] args) {

com.kumuluz.ee.EeApplication.main(args);

}

}
JEE MICRO CONTAINER STARTUP
TESTING
@RunWith(CdiTestRunner.class)

public class TestChuckJokeResource {



@Inject

private ChuckJokeResource chuckJokeResource;



@Test

public void testChuckJokeResource() {

Response response = chuckJokeResource.getJoke();

assertThat(
response.getStatusInfo().getStatusCode(),
equalTo(200));

}

}
SERVICE CLIENTSERVICE DISCOVERY
LOAD BALANCING
REQUEST MONITORING
CIRCUIT BREAKING
SERVICE CLIENT WITH JERSEY, RXJAVA AND HYSTRIX
‣ Circuit Breaker (Resiliency)
‣ Request Monitoring
‣ JAX-RS 2.0 compliant REST clients‣ Parallel & async execution 

(Responsive)
SERVICE CLIENT WITH JERSEY, RXJAVA AND HYSTRIX
@RequestScoped

public class IcndbIntegration implements IChuckNorrisJokes {



@Override public String getRandomJoke() {

IcndbIntegrationCommand cmd = new IcndbIntegrationCommand();

return cmd.observe().toBlocking().toFuture().get();

}



private class IcndbIntegrationCommand extends HystrixObservableCommand<String> {



IcndbIntegrationCommand() {

super(Setter.withGroupKey(HystrixCommandGroupKey.Factory.asKey("zwitscher"))

.andCommandPropertiesDefaults(HystrixCommandProperties.Setter()

.withExecutionTimeoutInMilliseconds(3000)));

}



@Override protected Observable<String> construct() {

return RxObservable.newClient()

.target("http://api.icndb.com").path("jokes/random").request(MediaType.APPLICATION_JSON_TYPE)

.rx().get()

.map(response -> {

Map<String, Map<String, String>> json = response.readEntity(Map.class);

return json.get("value").get("joke");

});

}

}

}
FALLBACK JOKES
@RequestScoped

public class IcndbIntegration implements IChuckNorrisJokes {
@Inject @Named("chucknorrisjoke-chucknorrisio")

private IChuckNorrisJokes fallback;
@Override public Observable<String> getRandomJokeObservable() { 

return new IcndbIntegrationCommand().observe();
}



//…



private class IcndbIntegrationCommand extends HystrixObservableCommand<String> {



//…



@Override

protected Observable<String> resumeWithFallback() {

return fallback.getRandomJokeObservable();

}

}

}
MONITORING &
DIAGNOSABILITYCOLLECT, STORE, ANALYZE METRICS
COLLECT, STORE, ANALYZE LOGS
COLLECT, STORE, ANALYZE TRACES
DASHBOARDING & ALERTING
THE MAGIC DIAGNOSABILITY TRIANGLE
Metrics
Logs Traces
Cluster-wide

Diagnosis
DIAGNOSABILITY BIG PICTURE
DROPWIZARD
METRICS
JERSEY
HYSTRIX
SLF4J
MICRO
SERVICE
PROMETHEUS
SERVLET
METRICS
SERVLET
HYSTRIX
SERVLET
Dashboard / Turbine
Health 

Checks
Service

Lookup
INSTRUMENTING THE MICROSERVICE WITH DROPWIZARD METRICS
@ApplicationPath("/chuck")

public class ChuckJokeApplication extends ResourceConfig {

public ChuckJokeApplication() {

super();

//Instrument application with metrics

MetricRegistry METRIC_REGISTRY = MetricsProvider.getMetricRegistryInstance();

register(new InstrumentedResourceMethodApplicationListener(METRIC_REGISTRY));

HystrixPlugins.getInstance().registerMetricsPublisher(

new HystrixCodaHaleMetricsPublisher(METRIC_REGISTRY));

//Register Prometheus metric exporter

CollectorRegistry.defaultRegistry.register(new DropwizardExports(METRIC_REGISTRY));

}

}
Instrument
inbound REST
calls
Instrument
outbound REST
calls
Export all
metrics to
Prometheus
Obtain the
singleton
Metric Registry
HYSTRIX DASHBOARD
SERVICE DISCOVERYSERVICE REGISTRATION
SERVICE LOOKUP
SERVICE HEALTH CHECKING
& API GATEWAYAPI EXPOSITION & REQUEST ROUTING
AUTHENTICATION & AUTORISATION
LOAD BALANCING & SHEDDING
RATE LIMITING
REQUEST MONITORING & AUDITING
THE BIG PICTURE
MICRO
SERVICE
SERVICE DISCOVERY
register 

web-facing 

services
lookup 

internal 

endpoints
web requests
lookup routes
API GATEWAY
health

checks (metrics servlet)
java.security.Security.setProperty("networkaddress.cache.ttl", "0" );
SERVICE REGISTRATION WITHIN A JEE MICROSERVICE
@ApplicationPath("/chuck")

public class ChuckJokeApplication extends ResourceConfig {



@Inject

public ChuckJokeApplication(

@ConsulFabio IServiceDiscovery serviceDiscovery) {

super();

//Register service

serviceDiscovery.registerService(
"zwitscher-chuck", "/chuck/joke");

}

} Service Name URL Path to Service
SERVICE REGISTRATION: THE HEAVY LIFTING
/**

* Registeres a service

*

* see https://github.com/eBay/fabio/wiki/Service-Configuration

*/

public synchronized void registerService(String serviceName, String servicePath) {



String applicationHost = getOutboundHost();

int applicationPort = getOutboundPort();

HostAndPort consulEndpoint = getConsulHostAndPort();

logger.info("Will register service on host {} and port {} at consul endpoint {}",

applicationHost, applicationPort, consulEndpoint.toString());



//generate unique serviceId

String serviceId = serviceName + "-" + applicationHost + ":" + applicationPort;

String fabioServiceTag = "urlprefix-" + servicePath;



//point healthcheck URL to dropwizard metrics healthcheck servlet

URL serviceUrl = UrlBuilder.empty()

.withScheme("http")

.withHost(applicationHost)

.withPort(applicationPort)

.withPath("/metrics/ping").toUrl();



// Service bei Consul registrieren inklusive einem Health-Check auf die URL des REST-Endpunkts.

logger.info("Registering service with ID {} and NAME {} with healthcheck URL {} and inbound ROUTE {}",

serviceId, serviceName, serviceUrl, fabioServiceTag);



//use consul API to register service

ConsulClient client = new ConsulClient(consulEndpoint.toString());

NewService service = new NewService();

service.setId(serviceId);

service.setName(serviceName);

service.setPort(applicationPort);

service.setAddress(applicationHost);

List<String> tags = new ArrayList<>();

tags.add(fabioServiceTag);

service.setTags(tags);

//register health check

NewService.Check check = new NewService.Check();

check.setHttp(serviceUrl.toString());

check.setInterval(ConsulFabioServiceDiscovery.HEALTHCHECK_INTERVAL + "s");

service.setCheck(check);

client.agentServiceRegister(service);

}



public static String getOutboundHost() {

String hostName = System.getenv(HOSTNAME_ENVVAR);

String host = System.getenv(HOST_ENVVAR);

if (hostName == null && host == null) return DEFAULT_HOST;

else if (host != null) return host;

else {

File etcHosts = new File("/etc/hosts");

List<String> lines;

try {

lines = Files.readLines(etcHosts, Charset.defaultCharset());

} catch (IOException e) {

return DEFAULT_HOST;

}

for (String line: lines){

if (!line.trim().startsWith("#") && !line.trim().isEmpty()) {

String[] etcEntry = line.split("s+");

if (etcEntry[1].equals(hostName)) return etcEntry[0];

}

}

return DEFAULT_HOST;

}

}



public static int getOutboundPort() {

String portEnv = System.getenv(PORT_ENVVAR);

if (portEnv == null) return DEFAULT_PORT;

return Integer.valueOf(portEnv);

}



public static HostAndPort getConsulHostAndPort() {

String consulEnv = System.getenv(CONSUL_ENVVAR);

if (consulEnv == null) return HostAndPort.fromString(CONSUL_DEFAULT_HOSTANDPORT);

else return HostAndPort.fromString(consulEnv);

}
@ConsulFabio

@ApplicationScoped

public class ConsulFabioServiceDiscovery implements IServiceDiscovery {
figure out Consul-visible host name and port
compose health check
add meta data for Fabio
register service at Consul 

(as well as API doc and diagnosability endpoints)
ET VOILA: CONSUL (STARTING 3 INSTANCES)
ET VOILA: FABIO
APPOP’S VIEW
CLOUD NATIVE JEE
SELF-DELIVERING SOFTWARE
RUNNING

TESTED

SOFTWARE

INCREMENT
EVERYTHING AS CODE:
‣ codes application
‣ codes tests
‣ codes infrastructure
‣ codes delivery workflow{ }
FOCUS ON SHORT ROUND TRIPS WITH MULTIPLE RUN MODES
In-Process
Local Cluster
Remote Cluster
‣ longer round trip time
‣ but: more realistic
Group with dependencies:
Single applications:
MARATHON APP DEFINITION
{

"id": "/zwitscher",

"groups": [

{

"id": "/zwitscher/infrastructure",

"apps": [

{

"id": "consul",

"cpus": 1,

"mem": 256,

"disk": 0,

"instances": 1,

"cmd": "/bin/consul agent -server -ui -advertise=$HOST -config-dir=/config -data-dir=/tmp/consul -bootstrap-expect=1 -node=consul-server -client=0.0.0.0",

"container": {

"docker": {

"image": "gliderlabs/consul-server:0.6",

"forcePullImage": true,

"privileged": false,

"network": "HOST",

"portDefinitions": [

{ "port": 8300, "protocol": "tcp", "name": "server-rpc" },

{ "port": 8301, "protocol": "tcp", "name": "serf-lan" },

{ "port": 8302, "protocol": "tcp", "name": "serf-wan" },

{ "port": 8400, "protocol": "tcp", "name": "cli-rpc" },

{ "port": 8500, "protocol": "tcp", "name": "http-api" },

{ "port": 8600, "protocol": "udp", "name": "dns" }

],

"requirePorts" : true

}

},

"env": {

"GOMAXPROCS": "10"

},

"healthChecks": [

{

"protocol": "HTTP",

"port": 8500,

"path": "/v1/status/leader",

"intervalSeconds": 10,

"timeoutSeconds": 10,

"maxConsecutiveFailures": 3

}

]

},

{

"id": "fabio",

"cpus": 1,

"mem": 256,

"disk": 0,

"instances": 1,

"env": {

"registry_consul_addr": "consul.infrastructure.zwitscher.marathon.mesos:8500"

},

"container": {

"docker": {

"image": "magiconair/fabio:latest",

"forcePullImage": true,

"privileged": false,

"network": "HOST",

"portDefinitions": [

{ "port": 9998, "protocol": "tcp", "name": "web-ui" },

{ "port": 9999, "protocol": "tcp", "name": "proxy-port" }

],

"requirePorts" : true

}

},

"acceptedResourceRoles":["slave_public"],

"healthChecks": [

{

"protocol": "HTTP",

"port": 9998,

"path": "/health",

"intervalSeconds": 10,

"timeoutSeconds": 10,

"maxConsecutiveFailures": 3

}

]

}

]

},

{

"id": "/zwitscher/services",

"apps": [

{

"id": "zwitscher-chuck",

"cpus": 1,

"mem": 256,

"disk": 0,

"instances": 1,

"container": {

"docker": {

"image": "adersberger/zwitscher-app-chuck:1.0.0-SNAPSHOT",

"forcePullImage": true,

"privileged": false,

"network": "HOST",

"portDefinitions": [

{ "port": 12340, "protocol": "tcp", "name": "rest-api" }

],

"requirePorts" : true

}

},

"env": {

"PORT": "12340",

"CONSUL": "consul.infrastructure.zwitscher.marathon.mesos:8500",

"CONFIG_ENV" : "zwitscher"

},

"args": [

"-Xmx256m"

],

"healthChecks": [

{

"protocol": "HTTP",

"port": 12340,

"path": "/metrics/ping",

"intervalSeconds": 10,

"timeoutSeconds": 10,

"maxConsecutiveFailures": 3

}

],

"dependencies": [

"/zwitscher/infrastructure/consul"

]

}

]

}

]

}
marathon-appgroup.json
/zwitscher
/infrastructure
/consul
/fabio
/service
/zwitscher-chuck
dependency
"healthChecks": [

{

"protocol": “HTTP", "port": 9998, "path": "/health",

"intervalSeconds": 10, "timeoutSeconds": 10, "maxConsecutiveFailures": 3

}

]
Define health checks for every app:
"network": "HOST",

"ports": [9998, 9999],

"requirePorts" : true
HOST networking (so that Mesos-DNS works) with fixed ports:
"acceptedResourceRoles":["slave_public"]
Run API gateway on public slave (accessible from www):
"env": {

"PORT": "12340",

"CONSUL": "consul.infrastructure.zwitscher.marathon.mesos:8500"

},

"args": ["-Xmx256m"]
Configuration @ startup with env vars and args:
"container": { "docker": {

"image": "adersberger/zwitscher-app-chuck:1.0.0-SNAPSHOT",

"forcePullImage": true
forcePullImage = true to get the latest pushed docker image:
"dependencies": [ "/zwitscher/infrastructure/consul"]
Yes, sometimes you need dependencies (but you should avoid them to get more resilient):
SUMMARY
CLOUD NATIVE JEE
CLOUD NATIVE JEE 101
SUMMARY
▸ Implementing JEE microservices on DC/OS is simple & fun.
▸ The JEE APIs are out of the box not cloud native but can easily be
enhanced with the required functionality. You can use our
JCloudEE util classes to glue JEE together with cloud native tech.









▸ Short round trip times are essential to be productive. You need
full portability and automation from local host up to the cloud.
FUN!
CLOUD NATIVE JEE
https://github.com/qaware/kubepad
‣ First things first: Will be renamed to 

CloudPad soon!
‣ Controlling a DC/OS cluster 

with a DJ pad.
‣ Written in fancy Kotlin.
‣ Turned out to be really helpful for cloud
native newbies to better grasp cluster
orchestration.
‣ Kicky colored lights and well-hidden
snake game easter egg. Set colors with
app label.
MESSAGING
JEE ON DC/OS 201
SNEAK PREVIEW
SECURITY
WEB USER
INTERFACE
STATEFUL
SERVICES
TWITTER.COM/QAWARE - SLIDESHARE.NET/QAWARE
Thank you!
Questions?
josef.adersberger@qaware.de
@adersberger
https://github.com/adersberger/cloud-native-zwitscher-jee
BONUS SLIDES
CONFIGURATION
& COORDINATIONKEY-VALUE STORE
NOTIFICATIONS, EVENTS
LOCKS
LEADER ELECTIONS
READING CONFIGURATION VALUES
@Inject

private ConfigurationProvider config;

//…

String messageTag = config.getProperty("messageTag", String.class);
try to read config value in
Consul
fallback to file if Consul is
not available or no config
value is set in Consul
THE CONSUL AGENT AND CONFIG ENVIRONMENT CAN BE SET
WITH A ENV VAR.
"env": {

"CONFIG_ENV" : "zwitscher"

}
The config environment (e.g. “zwitscher”, “zwitscher-test”, “zwitscher-prod”). Refers to 

a path in Consul or to a local path where the config file is.
MONITORING &
DIAGNOSABILITYCOLLECT, STORE, ANALYZE METRICS
COLLECT, STORE, ANALYZE LOGS
COLLECT, STORE, ANALYZE TRACES
DASHBOARDING & ALERTING
CUSTOM INSTRUMENTATIONS
▸ Logging



▸ Business Metrics







▸ Timers
@Inject

private Logger logger;
@ApplicationScoped

public class Slf4jLoggerProvider {



@Produces

public Logger produceLogger(InjectionPoint injectionPoint) {

return LoggerFactory.getLogger(

injectionPoint.getMember()
.getDeclaringClass()
.getName());

}



}
@Inject

MetricRegistry metrics;



//…



metrics.counter("fun counter").inc();
@GET

@Timed

@Produces("application/json")

public Response getJoke() { //…

More Related Content

What's hot

Lessons from Cassandra & Spark (Matthias Niehoff & Stephan Kepser, codecentri...
Lessons from Cassandra & Spark (Matthias Niehoff & Stephan Kepser, codecentri...Lessons from Cassandra & Spark (Matthias Niehoff & Stephan Kepser, codecentri...
Lessons from Cassandra & Spark (Matthias Niehoff & Stephan Kepser, codecentri...DataStax
 
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...StampedeCon
 
MongoDB Chunks - Distribution, Splitting, and Merging
MongoDB Chunks - Distribution, Splitting, and MergingMongoDB Chunks - Distribution, Splitting, and Merging
MongoDB Chunks - Distribution, Splitting, and MergingJason Terpko
 
Escape from Hadoop: Ultra Fast Data Analysis with Spark & Cassandra
Escape from Hadoop: Ultra Fast Data Analysis with Spark & CassandraEscape from Hadoop: Ultra Fast Data Analysis with Spark & Cassandra
Escape from Hadoop: Ultra Fast Data Analysis with Spark & CassandraPiotr Kolaczkowski
 
Spark Streaming with Cassandra
Spark Streaming with CassandraSpark Streaming with Cassandra
Spark Streaming with CassandraJacek Lewandowski
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Paul Brebner
 
MongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster TutorialMongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster TutorialJason Terpko
 
Zero to Streaming: Spark and Cassandra
Zero to Streaming: Spark and CassandraZero to Streaming: Spark and Cassandra
Zero to Streaming: Spark and CassandraRussell Spitzer
 
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...DataStax
 
Triggers In MongoDB
Triggers In MongoDBTriggers In MongoDB
Triggers In MongoDBJason Terpko
 
Using MongoDB with Kafka - Use Cases and Best Practices
Using MongoDB with Kafka -  Use Cases and Best PracticesUsing MongoDB with Kafka -  Use Cases and Best Practices
Using MongoDB with Kafka - Use Cases and Best PracticesAntonios Giannopoulos
 
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2Antonios Giannopoulos
 
Cassandra is great but how do I test my application?
Cassandra is great but how do I test my application?Cassandra is great but how do I test my application?
Cassandra is great but how do I test my application?Christopher Batey
 
Michael Häusler – Everyday flink
Michael Häusler – Everyday flinkMichael Häusler – Everyday flink
Michael Häusler – Everyday flinkFlink Forward
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Paul Brebner
 
Spark and Cassandra 2 Fast 2 Furious
Spark and Cassandra 2 Fast 2 FuriousSpark and Cassandra 2 Fast 2 Furious
Spark and Cassandra 2 Fast 2 FuriousRussell Spitzer
 
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...Codemotion
 

What's hot (18)

Lessons from Cassandra & Spark (Matthias Niehoff & Stephan Kepser, codecentri...
Lessons from Cassandra & Spark (Matthias Niehoff & Stephan Kepser, codecentri...Lessons from Cassandra & Spark (Matthias Niehoff & Stephan Kepser, codecentri...
Lessons from Cassandra & Spark (Matthias Niehoff & Stephan Kepser, codecentri...
 
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
Beyond the Query – Bringing Complex Access Patterns to NoSQL with DataStax - ...
 
MongoDB Chunks - Distribution, Splitting, and Merging
MongoDB Chunks - Distribution, Splitting, and MergingMongoDB Chunks - Distribution, Splitting, and Merging
MongoDB Chunks - Distribution, Splitting, and Merging
 
Escape from Hadoop: Ultra Fast Data Analysis with Spark & Cassandra
Escape from Hadoop: Ultra Fast Data Analysis with Spark & CassandraEscape from Hadoop: Ultra Fast Data Analysis with Spark & Cassandra
Escape from Hadoop: Ultra Fast Data Analysis with Spark & Cassandra
 
Spark Streaming with Cassandra
Spark Streaming with CassandraSpark Streaming with Cassandra
Spark Streaming with Cassandra
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
 
MongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster TutorialMongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster Tutorial
 
Zero to Streaming: Spark and Cassandra
Zero to Streaming: Spark and CassandraZero to Streaming: Spark and Cassandra
Zero to Streaming: Spark and Cassandra
 
Sharded cluster tutorial
Sharded cluster tutorialSharded cluster tutorial
Sharded cluster tutorial
 
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
Building a Fast, Resilient Time Series Store with Cassandra (Alex Petrov, Dat...
 
Triggers In MongoDB
Triggers In MongoDBTriggers In MongoDB
Triggers In MongoDB
 
Using MongoDB with Kafka - Use Cases and Best Practices
Using MongoDB with Kafka -  Use Cases and Best PracticesUsing MongoDB with Kafka -  Use Cases and Best Practices
Using MongoDB with Kafka - Use Cases and Best Practices
 
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
New Indexing and Aggregation Pipeline Capabilities in MongoDB 4.2
 
Cassandra is great but how do I test my application?
Cassandra is great but how do I test my application?Cassandra is great but how do I test my application?
Cassandra is great but how do I test my application?
 
Michael Häusler – Everyday flink
Michael Häusler – Everyday flinkMichael Häusler – Everyday flink
Michael Häusler – Everyday flink
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
 
Spark and Cassandra 2 Fast 2 Furious
Spark and Cassandra 2 Fast 2 FuriousSpark and Cassandra 2 Fast 2 Furious
Spark and Cassandra 2 Fast 2 Furious
 
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
Jörg Schad - Hybrid Cloud (Kubernetes, Spark, HDFS, …)-as-a-Service - Codemot...
 

Viewers also liked

Simple REST with Dropwizard
Simple REST with DropwizardSimple REST with Dropwizard
Simple REST with DropwizardAndrei Savu
 
Production Ready Web Services with Dropwizard
Production Ready Web Services with DropwizardProduction Ready Web Services with Dropwizard
Production Ready Web Services with Dropwizardsullis
 
Dropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stackDropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stackJacek Furmankiewicz
 
Dropwizard and Groovy
Dropwizard and GroovyDropwizard and Groovy
Dropwizard and Groovytomaslin
 
Dropwizard Introduction
Dropwizard IntroductionDropwizard Introduction
Dropwizard IntroductionAnthony Chen
 
WildFly Swarm: Criando Microservices com Java EE 7
WildFly Swarm: Criando Microservices com Java EE 7WildFly Swarm: Criando Microservices com Java EE 7
WildFly Swarm: Criando Microservices com Java EE 7George Gastaldi
 
Simple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerSimple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerLeanIX GmbH
 
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"Daniel Bryant
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSAmazon Web Services
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudConor Svensson
 
promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...
promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...
promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...Tokuhiro Matsuno
 
Microservice Architecture JavaCro 2015
Microservice Architecture JavaCro 2015Microservice Architecture JavaCro 2015
Microservice Architecture JavaCro 2015Nenad Pecanac
 
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entitySpring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entityToni Jara
 
Building REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring CloudBuilding REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring CloudKenny Bastani
 
Microservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudMicroservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudBen Wilcock
 
Service discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consulService discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consulJos Dirksen
 

Viewers also liked (20)

Soa with consul
Soa with consulSoa with consul
Soa with consul
 
Simple REST with Dropwizard
Simple REST with DropwizardSimple REST with Dropwizard
Simple REST with Dropwizard
 
Production Ready Web Services with Dropwizard
Production Ready Web Services with DropwizardProduction Ready Web Services with Dropwizard
Production Ready Web Services with Dropwizard
 
Dropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stackDropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stack
 
Dropwizard and Groovy
Dropwizard and GroovyDropwizard and Groovy
Dropwizard and Groovy
 
Dropwizard Introduction
Dropwizard IntroductionDropwizard Introduction
Dropwizard Introduction
 
WildFly Swarm: Criando Microservices com Java EE 7
WildFly Swarm: Criando Microservices com Java EE 7WildFly Swarm: Criando Microservices com Java EE 7
WildFly Swarm: Criando Microservices com Java EE 7
 
Simple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and SwaggerSimple REST-APIs with Dropwizard and Swagger
Simple REST-APIs with Dropwizard and Swagger
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
Deep Dive on Microservices
Deep Dive on MicroservicesDeep Dive on Microservices
Deep Dive on Microservices
 
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
J1 2015 "Building a Microservice Ecosystem: Some Assembly Still Required"
 
Deep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECSDeep Dive on Microservices and Amazon ECS
Deep Dive on Microservices and Amazon ECS
 
Microservices and Amazon ECS
Microservices and Amazon ECSMicroservices and Amazon ECS
Microservices and Amazon ECS
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
 
promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...
promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...
promgen - prometheus managemnet tool / simpleclient_java hacks @ Prometheus c...
 
Microservice Architecture JavaCro 2015
Microservice Architecture JavaCro 2015Microservice Architecture JavaCro 2015
Microservice Architecture JavaCro 2015
 
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entitySpring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
 
Building REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring CloudBuilding REST APIs with Spring Boot and Spring Cloud
Building REST APIs with Spring Boot and Spring Cloud
 
Microservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudMicroservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloud
 
Service discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consulService discovery in a microservice architecture using consul
Service discovery in a microservice architecture using consul
 

Similar to JEE on DC/OS

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationBen Hall
 
Debugging Microservices - QCON 2017
Debugging Microservices - QCON 2017Debugging Microservices - QCON 2017
Debugging Microservices - QCON 2017Idit Levine
 
Кирилл Толкачев. Микросервисы: огонь, вода и девопс
Кирилл Толкачев. Микросервисы: огонь, вода и девопсКирилл Толкачев. Микросервисы: огонь, вода и девопс
Кирилл Толкачев. Микросервисы: огонь, вода и девопсScrumTrek
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionBrennan Saeta
 
8 - OpenShift - A look at a container platform: what's in the box
8 - OpenShift - A look at a container platform: what's in the box8 - OpenShift - A look at a container platform: what's in the box
8 - OpenShift - A look at a container platform: what's in the boxKangaroot
 
Cloud nativemicroservices jax-london2020
Cloud nativemicroservices   jax-london2020Cloud nativemicroservices   jax-london2020
Cloud nativemicroservices jax-london2020Emily Jiang
 
Cloud nativemicroservices jax-london2020
Cloud nativemicroservices   jax-london2020Cloud nativemicroservices   jax-london2020
Cloud nativemicroservices jax-london2020Emily Jiang
 
Bringing order to the chaos! - Paulo Lopes - Codemotion Amsterdam 2018
Bringing order to the chaos! - Paulo Lopes - Codemotion Amsterdam 2018Bringing order to the chaos! - Paulo Lopes - Codemotion Amsterdam 2018
Bringing order to the chaos! - Paulo Lopes - Codemotion Amsterdam 2018Codemotion
 
GeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassleGeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassleAnton Arhipov
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsBen Hall
 
Easing offline web application development with GWT
Easing offline web application development with GWTEasing offline web application development with GWT
Easing offline web application development with GWTArnaud Tournier
 
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008Vando Batista
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusEmily Jiang
 
July 2015 Android Taipei - Anti-Decompiler by SUKI
July 2015 Android Taipei - Anti-Decompiler by SUKIJuly 2015 Android Taipei - Anti-Decompiler by SUKI
July 2015 Android Taipei - Anti-Decompiler by SUKISuki Huang
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)Hendrik Ebbers
 
OpenShift Taiwan Vol.1 Technology Overview
OpenShift Taiwan Vol.1 Technology OverviewOpenShift Taiwan Vol.1 Technology Overview
OpenShift Taiwan Vol.1 Technology OverviewJason Peng
 

Similar to JEE on DC/OS (20)

Arquitecturas de microservicios - Medianet Software
Arquitecturas de microservicios   -  Medianet SoftwareArquitecturas de microservicios   -  Medianet Software
Arquitecturas de microservicios - Medianet Software
 
Clean Architecture @ Taxibeat
Clean Architecture @ TaxibeatClean Architecture @ Taxibeat
Clean Architecture @ Taxibeat
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
Hybrid Applications
Hybrid ApplicationsHybrid Applications
Hybrid Applications
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
Debugging Microservices - QCON 2017
Debugging Microservices - QCON 2017Debugging Microservices - QCON 2017
Debugging Microservices - QCON 2017
 
Кирилл Толкачев. Микросервисы: огонь, вода и девопс
Кирилл Толкачев. Микросервисы: огонь, вода и девопсКирилл Толкачев. Микросервисы: огонь, вода и девопс
Кирилл Толкачев. Микросервисы: огонь, вода и девопс
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline Execution
 
8 - OpenShift - A look at a container platform: what's in the box
8 - OpenShift - A look at a container platform: what's in the box8 - OpenShift - A look at a container platform: what's in the box
8 - OpenShift - A look at a container platform: what's in the box
 
Cloud nativemicroservices jax-london2020
Cloud nativemicroservices   jax-london2020Cloud nativemicroservices   jax-london2020
Cloud nativemicroservices jax-london2020
 
Cloud nativemicroservices jax-london2020
Cloud nativemicroservices   jax-london2020Cloud nativemicroservices   jax-london2020
Cloud nativemicroservices jax-london2020
 
Bringing order to the chaos! - Paulo Lopes - Codemotion Amsterdam 2018
Bringing order to the chaos! - Paulo Lopes - Codemotion Amsterdam 2018Bringing order to the chaos! - Paulo Lopes - Codemotion Amsterdam 2018
Bringing order to the chaos! - Paulo Lopes - Codemotion Amsterdam 2018
 
GeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassleGeeCON 2017 - TestContainers. Integration testing without the hassle
GeeCON 2017 - TestContainers. Integration testing without the hassle
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js Applications
 
Easing offline web application development with GWT
Easing offline web application development with GWTEasing offline web application development with GWT
Easing offline web application development with GWT
 
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
 
July 2015 Android Taipei - Anti-Decompiler by SUKI
July 2015 Android Taipei - Anti-Decompiler by SUKIJuly 2015 Android Taipei - Anti-Decompiler by SUKI
July 2015 Android Taipei - Anti-Decompiler by SUKI
 
JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)JavaFX Enterprise (JavaOne 2014)
JavaFX Enterprise (JavaOne 2014)
 
OpenShift Taiwan Vol.1 Technology Overview
OpenShift Taiwan Vol.1 Technology OverviewOpenShift Taiwan Vol.1 Technology Overview
OpenShift Taiwan Vol.1 Technology Overview
 

More from Josef Adersberger

Into the cloud, you better fly by sight
Into the cloud, you better fly by sightInto the cloud, you better fly by sight
Into the cloud, you better fly by sightJosef Adersberger
 
Serverless containers … with source-to-image
Serverless containers  … with source-to-imageServerless containers  … with source-to-image
Serverless containers … with source-to-imageJosef Adersberger
 
The need for speed – transforming insurance into a cloud-native industry
The need for speed – transforming insurance into a cloud-native industryThe need for speed – transforming insurance into a cloud-native industry
The need for speed – transforming insurance into a cloud-native industryJosef Adersberger
 
The good, the bad, and the ugly of migrating hundreds of legacy applications ...
The good, the bad, and the ugly of migrating hundreds of legacy applications ...The good, the bad, and the ugly of migrating hundreds of legacy applications ...
The good, the bad, and the ugly of migrating hundreds of legacy applications ...Josef Adersberger
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesJosef Adersberger
 
Istio By Example (extended version)
Istio By Example (extended version)Istio By Example (extended version)
Istio By Example (extended version)Josef Adersberger
 
Docker und Kubernetes Patterns & Anti-Patterns
Docker und Kubernetes Patterns & Anti-PatternsDocker und Kubernetes Patterns & Anti-Patterns
Docker und Kubernetes Patterns & Anti-PatternsJosef Adersberger
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...Josef Adersberger
 
Dataservices - Processing Big Data The Microservice Way
Dataservices - Processing Big Data The Microservice WayDataservices - Processing Big Data The Microservice Way
Dataservices - Processing Big Data The Microservice WayJosef Adersberger
 
Cloud Native und Java EE: Freund oder Feind?
Cloud Native und Java EE: Freund oder Feind?Cloud Native und Java EE: Freund oder Feind?
Cloud Native und Java EE: Freund oder Feind?Josef Adersberger
 
Clickstream Analysis with Spark
Clickstream Analysis with Spark Clickstream Analysis with Spark
Clickstream Analysis with Spark Josef Adersberger
 
Software-Sanierung: Wie man kranke Systeme wieder gesund macht.
Software-Sanierung: Wie man kranke Systeme wieder gesund macht.Software-Sanierung: Wie man kranke Systeme wieder gesund macht.
Software-Sanierung: Wie man kranke Systeme wieder gesund macht.Josef Adersberger
 

More from Josef Adersberger (13)

Into the cloud, you better fly by sight
Into the cloud, you better fly by sightInto the cloud, you better fly by sight
Into the cloud, you better fly by sight
 
Serverless containers … with source-to-image
Serverless containers  … with source-to-imageServerless containers  … with source-to-image
Serverless containers … with source-to-image
 
The need for speed – transforming insurance into a cloud-native industry
The need for speed – transforming insurance into a cloud-native industryThe need for speed – transforming insurance into a cloud-native industry
The need for speed – transforming insurance into a cloud-native industry
 
The good, the bad, and the ugly of migrating hundreds of legacy applications ...
The good, the bad, and the ugly of migrating hundreds of legacy applications ...The good, the bad, and the ugly of migrating hundreds of legacy applications ...
The good, the bad, and the ugly of migrating hundreds of legacy applications ...
 
Patterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to KubernetesPatterns and Pains of Migrating Legacy Applications to Kubernetes
Patterns and Pains of Migrating Legacy Applications to Kubernetes
 
Istio By Example (extended version)
Istio By Example (extended version)Istio By Example (extended version)
Istio By Example (extended version)
 
Docker und Kubernetes Patterns & Anti-Patterns
Docker und Kubernetes Patterns & Anti-PatternsDocker und Kubernetes Patterns & Anti-Patterns
Docker und Kubernetes Patterns & Anti-Patterns
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Dataservices - Processing Big Data The Microservice Way
Dataservices - Processing Big Data The Microservice WayDataservices - Processing Big Data The Microservice Way
Dataservices - Processing Big Data The Microservice Way
 
Cloud Native und Java EE: Freund oder Feind?
Cloud Native und Java EE: Freund oder Feind?Cloud Native und Java EE: Freund oder Feind?
Cloud Native und Java EE: Freund oder Feind?
 
Big Data Landscape 2016
Big Data Landscape 2016Big Data Landscape 2016
Big Data Landscape 2016
 
Clickstream Analysis with Spark
Clickstream Analysis with Spark Clickstream Analysis with Spark
Clickstream Analysis with Spark
 
Software-Sanierung: Wie man kranke Systeme wieder gesund macht.
Software-Sanierung: Wie man kranke Systeme wieder gesund macht.Software-Sanierung: Wie man kranke Systeme wieder gesund macht.
Software-Sanierung: Wie man kranke Systeme wieder gesund macht.
 

Recently uploaded

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 

Recently uploaded (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 

JEE on DC/OS

  • 1. JEE ON DC/OS 101 AND FUN Dr. Josef Adersberger ( @adersberger)
  • 2. DC/OS = #GIFEE Google’s
 (and Facebook’s, Twitter’s, Airbnb’s, …)
 Infrastructure
 For
 Everyone
 Else
  • 3. #GIFEE => Cloud Native Applications
 (apps like Google’s, Facebook’s, …)
  • 4.
  • 5.
  • 7.
  • 8. The second largest monolith on earth!* *) only beaten by the guys who are writing PHP code at large scale
  • 10. JEE IS NEITHER UGLY NOR FOCUSED ON MONOLITHIC APPS ▸ Java EE by itself is modular und lightweight in the recent versions.
 (to be honest: Spring feels more heavyweight than JEE to me from time to time) ▸ Java EE micro containers allow to modularize applications into self-contained runnable units. ▸ How to develop enterprise applications based on Java EE is well understood and knowledge is widespread. ▸ API is mature and standardized. Implementations are battle proven.
  • 12.
  • 14. JEE IS NOT AN OVERALL MONOLITH. BUT PEOPLE TEND TO RUN JEE APPS AS MONOLITHS WITHIN HEAVY WEIGHT APP SERVERS. DESIGN CODE RUN startup-cluster.sh JEE Impl. JEE App Server
  • 15. JEE MICRO CONTAINER TO THE RESCUE: ENABLING MICROSERVICES ON JEE DESIGN CODE RUN main() JEE impl. parts
  • 16. A CLOUD OF JEE MICRO CONTAINERS. MISSION ACCOMPLISHED? image: https://www.dreamstime.com
  • 17. a cloud is not nothing! what’s inside our cloud?
  • 18. THE CLOUD NATIVE STACK CLOUD NATIVE STACK JEE MICROSERVICES
  • 19. CLUSTER VIRTUALIZATION (computing, network, storage, memory) CLUSTER RESOURCE MANAGER CLUSTER ORCHESTRATOR APPLICATIONS CONTAINER CLUSTER RESOURCES MICROSERVICE PLATFORM
 API Gateway Micro Container Configuration & Coordination Diagnosability &
 Monitoring Infrastructure-as-a-Service Bare Metal Local Host Service
 Client Service Discovery DevOps Interface ‣ deploy ‣ rollback ‣ scale ‣ configure Diagnose Interface ‣ analyze logs ‣ analyze metrics ‣ analyze traces Edge Interface ‣ request service ‣ authenticate
  • 20. CLUSTER VIRTUALIZATION (computing, network, storage, memory) CLUSTER RESOURCE MANAGER CLUSTER ORCHESTRATOR APPLICATIONS CONTAINER CLUSTER RESOURCES MICROSERVICE PLATFORM
 API Gateway Micro Container Configuration & Coordination Diagnosability &
 Monitoring Infrastructure-as-a-Service Bare Metal Local Host Service
 Client Service Discovery DevOps Interface ‣ deploy ‣ rollback ‣ scale ‣ configure Diagnose Interface ‣ analyze logs ‣ analyze metrics ‣ analyze traces Edge Interface ‣ request service ‣ authenticate how to provide the right resources for container execution? how to decouple from physical hardware? how to run (containerized) applications on a cluster? how to detect and solve operational anomalies? how to call other microservices resilient and responsive? how to execute a microservice and embed it within the platform? how to provide cluster-wide consensus on config values etc.? how to expose microservice endpoints to the internet? how to manage microservice endpoints within the whole platform?
  • 22. CLUSTER VIRTUALIZATION (computing, network, storage, memory) CLUSTER RESOURCE MANAGER CLUSTER ORCHESTRATOR APPLICATIONS CONTAINER CLUSTER RESOURCES MICROSERVICE PLATFORM
 API Gateway Micro Container Configuration & Coordination Diagnosability &
 Monitoring Infrastructure-as-a-Service Bare Metal Local Host Service
 Client Service Discovery DevOps Interface Diagnose InterfaceEdge Interface
  • 23. THE ZWITSCHER JEE SHOWCASE ZWITSCHER-APP-HISTORY ZWITSCHER-APP-WIKIPEDIAZWITSCHER-APP-CHUCK ZWITSCHER-APP-BOARD keyword results + keyword history random joke
 (because every chuck norris joke matches on every keyword) JDBC Open API ZWITSCHER-APP-CHUCK fallback https://github.com/adersberger/cloud-native-zwitscher-jee
  • 26. THE JEE MICRO CONTAINER ECOSYSTEM http://wildfly-swarm.io https://ee.kumuluz.com http://microprofile.io (to come) http://tomee.apache.org http://www.payara.fish/payara_micro EMBEDDED implements (unstable)
  • 27. JEE MICRO CONTAINER COMPARISON CHART Payara Micro Wildfly Swarm TomEE+ kumuluzEE Servlets et al. x x x x WebSockets x x x JSF x x x JAX-RS x x x x JAX-WS x x EJB *2 x x x CDI x x x x JTA x x x JCA x x JMS x x JPA x x x x Bean Validation x x x x JBatch x x Concurrency x x JCache x x JEE version JEE 7 JEE 7 JEE 6, JEE 7 part.*1 JEE 7 part. Packaging WAR + JAR JAR JAR classes + JARs Startup time 4s 4s 2s 1s Size 57MB 83 MB 44 MB 15 MB *1) http://tomee.apache.org/javaee7-status.html *2) http://stackoverflow.com/questions/13487987/where-to-use-ejb-3-1-and-cdi
  • 28. @Path(“/joke") @RequestScoped
 public class ChuckJokeResource {
 @Inject
 private IcndbIntegration icndb;
 @GET
 @Produces("application/json")
 public Response getJoke() {
 Map<String, String> json = new HashMap<>();
 json.put("message", icndb.getRandomJoke());
 return Response.ok(json).build();
 }
 } @ApplicationPath("/chuck")
 public class ChuckJokeApplication extends ResourceConfig {
 public ChuckJokeApplication() {
 super(); register(ChuckJokeResource.class);
 }
 } JAX-RS WITH CDI bean-discovery-mode="all"
  • 29. public class Main {
 
 /**
 * Starts the microservice container.
 *
 * Requires environment variable "PORT" according
 * on what port to listen.
 *
 * @param args no arguments evaluated
 */
 public static void main(String[] args) {
 com.kumuluz.ee.EeApplication.main(args);
 }
 } JEE MICRO CONTAINER STARTUP
  • 30. TESTING @RunWith(CdiTestRunner.class)
 public class TestChuckJokeResource {
 
 @Inject
 private ChuckJokeResource chuckJokeResource;
 
 @Test
 public void testChuckJokeResource() {
 Response response = chuckJokeResource.getJoke();
 assertThat( response.getStatusInfo().getStatusCode(), equalTo(200));
 }
 }
  • 31. SERVICE CLIENTSERVICE DISCOVERY LOAD BALANCING REQUEST MONITORING CIRCUIT BREAKING
  • 32. SERVICE CLIENT WITH JERSEY, RXJAVA AND HYSTRIX ‣ Circuit Breaker (Resiliency) ‣ Request Monitoring ‣ JAX-RS 2.0 compliant REST clients‣ Parallel & async execution 
 (Responsive)
  • 33. SERVICE CLIENT WITH JERSEY, RXJAVA AND HYSTRIX @RequestScoped
 public class IcndbIntegration implements IChuckNorrisJokes {
 
 @Override public String getRandomJoke() {
 IcndbIntegrationCommand cmd = new IcndbIntegrationCommand();
 return cmd.observe().toBlocking().toFuture().get();
 }
 
 private class IcndbIntegrationCommand extends HystrixObservableCommand<String> {
 
 IcndbIntegrationCommand() {
 super(Setter.withGroupKey(HystrixCommandGroupKey.Factory.asKey("zwitscher"))
 .andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
 .withExecutionTimeoutInMilliseconds(3000)));
 }
 
 @Override protected Observable<String> construct() {
 return RxObservable.newClient()
 .target("http://api.icndb.com").path("jokes/random").request(MediaType.APPLICATION_JSON_TYPE)
 .rx().get()
 .map(response -> {
 Map<String, Map<String, String>> json = response.readEntity(Map.class);
 return json.get("value").get("joke");
 });
 }
 }
 }
  • 34. FALLBACK JOKES @RequestScoped
 public class IcndbIntegration implements IChuckNorrisJokes { @Inject @Named("chucknorrisjoke-chucknorrisio")
 private IChuckNorrisJokes fallback; @Override public Observable<String> getRandomJokeObservable() { 
 return new IcndbIntegrationCommand().observe(); }
 
 //…
 
 private class IcndbIntegrationCommand extends HystrixObservableCommand<String> {
 
 //…
 
 @Override
 protected Observable<String> resumeWithFallback() {
 return fallback.getRandomJokeObservable();
 }
 }
 }
  • 35. MONITORING & DIAGNOSABILITYCOLLECT, STORE, ANALYZE METRICS COLLECT, STORE, ANALYZE LOGS COLLECT, STORE, ANALYZE TRACES DASHBOARDING & ALERTING
  • 36. THE MAGIC DIAGNOSABILITY TRIANGLE Metrics Logs Traces Cluster-wide
 Diagnosis
  • 38. INSTRUMENTING THE MICROSERVICE WITH DROPWIZARD METRICS @ApplicationPath("/chuck")
 public class ChuckJokeApplication extends ResourceConfig {
 public ChuckJokeApplication() {
 super();
 //Instrument application with metrics
 MetricRegistry METRIC_REGISTRY = MetricsProvider.getMetricRegistryInstance();
 register(new InstrumentedResourceMethodApplicationListener(METRIC_REGISTRY));
 HystrixPlugins.getInstance().registerMetricsPublisher(
 new HystrixCodaHaleMetricsPublisher(METRIC_REGISTRY));
 //Register Prometheus metric exporter
 CollectorRegistry.defaultRegistry.register(new DropwizardExports(METRIC_REGISTRY));
 }
 } Instrument inbound REST calls Instrument outbound REST calls Export all metrics to Prometheus Obtain the singleton Metric Registry
  • 39.
  • 41. SERVICE DISCOVERYSERVICE REGISTRATION SERVICE LOOKUP SERVICE HEALTH CHECKING & API GATEWAYAPI EXPOSITION & REQUEST ROUTING AUTHENTICATION & AUTORISATION LOAD BALANCING & SHEDDING RATE LIMITING REQUEST MONITORING & AUDITING
  • 42. THE BIG PICTURE MICRO SERVICE SERVICE DISCOVERY register 
 web-facing 
 services lookup 
 internal 
 endpoints web requests lookup routes API GATEWAY health
 checks (metrics servlet) java.security.Security.setProperty("networkaddress.cache.ttl", "0" );
  • 43. SERVICE REGISTRATION WITHIN A JEE MICROSERVICE @ApplicationPath("/chuck")
 public class ChuckJokeApplication extends ResourceConfig {
 
 @Inject
 public ChuckJokeApplication(
 @ConsulFabio IServiceDiscovery serviceDiscovery) {
 super();
 //Register service
 serviceDiscovery.registerService( "zwitscher-chuck", "/chuck/joke");
 }
 } Service Name URL Path to Service
  • 44. SERVICE REGISTRATION: THE HEAVY LIFTING /**
 * Registeres a service
 *
 * see https://github.com/eBay/fabio/wiki/Service-Configuration
 */
 public synchronized void registerService(String serviceName, String servicePath) {
 
 String applicationHost = getOutboundHost();
 int applicationPort = getOutboundPort();
 HostAndPort consulEndpoint = getConsulHostAndPort();
 logger.info("Will register service on host {} and port {} at consul endpoint {}",
 applicationHost, applicationPort, consulEndpoint.toString());
 
 //generate unique serviceId
 String serviceId = serviceName + "-" + applicationHost + ":" + applicationPort;
 String fabioServiceTag = "urlprefix-" + servicePath;
 
 //point healthcheck URL to dropwizard metrics healthcheck servlet
 URL serviceUrl = UrlBuilder.empty()
 .withScheme("http")
 .withHost(applicationHost)
 .withPort(applicationPort)
 .withPath("/metrics/ping").toUrl();
 
 // Service bei Consul registrieren inklusive einem Health-Check auf die URL des REST-Endpunkts.
 logger.info("Registering service with ID {} and NAME {} with healthcheck URL {} and inbound ROUTE {}",
 serviceId, serviceName, serviceUrl, fabioServiceTag);
 
 //use consul API to register service
 ConsulClient client = new ConsulClient(consulEndpoint.toString());
 NewService service = new NewService();
 service.setId(serviceId);
 service.setName(serviceName);
 service.setPort(applicationPort);
 service.setAddress(applicationHost);
 List<String> tags = new ArrayList<>();
 tags.add(fabioServiceTag);
 service.setTags(tags);
 //register health check
 NewService.Check check = new NewService.Check();
 check.setHttp(serviceUrl.toString());
 check.setInterval(ConsulFabioServiceDiscovery.HEALTHCHECK_INTERVAL + "s");
 service.setCheck(check);
 client.agentServiceRegister(service);
 }
 
 public static String getOutboundHost() {
 String hostName = System.getenv(HOSTNAME_ENVVAR);
 String host = System.getenv(HOST_ENVVAR);
 if (hostName == null && host == null) return DEFAULT_HOST;
 else if (host != null) return host;
 else {
 File etcHosts = new File("/etc/hosts");
 List<String> lines;
 try {
 lines = Files.readLines(etcHosts, Charset.defaultCharset());
 } catch (IOException e) {
 return DEFAULT_HOST;
 }
 for (String line: lines){
 if (!line.trim().startsWith("#") && !line.trim().isEmpty()) {
 String[] etcEntry = line.split("s+");
 if (etcEntry[1].equals(hostName)) return etcEntry[0];
 }
 }
 return DEFAULT_HOST;
 }
 }
 
 public static int getOutboundPort() {
 String portEnv = System.getenv(PORT_ENVVAR);
 if (portEnv == null) return DEFAULT_PORT;
 return Integer.valueOf(portEnv);
 }
 
 public static HostAndPort getConsulHostAndPort() {
 String consulEnv = System.getenv(CONSUL_ENVVAR);
 if (consulEnv == null) return HostAndPort.fromString(CONSUL_DEFAULT_HOSTANDPORT);
 else return HostAndPort.fromString(consulEnv);
 } @ConsulFabio
 @ApplicationScoped
 public class ConsulFabioServiceDiscovery implements IServiceDiscovery { figure out Consul-visible host name and port compose health check add meta data for Fabio register service at Consul 
 (as well as API doc and diagnosability endpoints)
  • 45. ET VOILA: CONSUL (STARTING 3 INSTANCES)
  • 48. SELF-DELIVERING SOFTWARE RUNNING
 TESTED
 SOFTWARE
 INCREMENT EVERYTHING AS CODE: ‣ codes application ‣ codes tests ‣ codes infrastructure ‣ codes delivery workflow{ }
  • 49. FOCUS ON SHORT ROUND TRIPS WITH MULTIPLE RUN MODES In-Process Local Cluster Remote Cluster ‣ longer round trip time ‣ but: more realistic Group with dependencies: Single applications:
  • 50. MARATHON APP DEFINITION {
 "id": "/zwitscher",
 "groups": [
 {
 "id": "/zwitscher/infrastructure",
 "apps": [
 {
 "id": "consul",
 "cpus": 1,
 "mem": 256,
 "disk": 0,
 "instances": 1,
 "cmd": "/bin/consul agent -server -ui -advertise=$HOST -config-dir=/config -data-dir=/tmp/consul -bootstrap-expect=1 -node=consul-server -client=0.0.0.0",
 "container": {
 "docker": {
 "image": "gliderlabs/consul-server:0.6",
 "forcePullImage": true,
 "privileged": false,
 "network": "HOST",
 "portDefinitions": [
 { "port": 8300, "protocol": "tcp", "name": "server-rpc" },
 { "port": 8301, "protocol": "tcp", "name": "serf-lan" },
 { "port": 8302, "protocol": "tcp", "name": "serf-wan" },
 { "port": 8400, "protocol": "tcp", "name": "cli-rpc" },
 { "port": 8500, "protocol": "tcp", "name": "http-api" },
 { "port": 8600, "protocol": "udp", "name": "dns" }
 ],
 "requirePorts" : true
 }
 },
 "env": {
 "GOMAXPROCS": "10"
 },
 "healthChecks": [
 {
 "protocol": "HTTP",
 "port": 8500,
 "path": "/v1/status/leader",
 "intervalSeconds": 10,
 "timeoutSeconds": 10,
 "maxConsecutiveFailures": 3
 }
 ]
 },
 {
 "id": "fabio",
 "cpus": 1,
 "mem": 256,
 "disk": 0,
 "instances": 1,
 "env": {
 "registry_consul_addr": "consul.infrastructure.zwitscher.marathon.mesos:8500"
 },
 "container": {
 "docker": {
 "image": "magiconair/fabio:latest",
 "forcePullImage": true,
 "privileged": false,
 "network": "HOST",
 "portDefinitions": [
 { "port": 9998, "protocol": "tcp", "name": "web-ui" },
 { "port": 9999, "protocol": "tcp", "name": "proxy-port" }
 ],
 "requirePorts" : true
 }
 },
 "acceptedResourceRoles":["slave_public"],
 "healthChecks": [
 {
 "protocol": "HTTP",
 "port": 9998,
 "path": "/health",
 "intervalSeconds": 10,
 "timeoutSeconds": 10,
 "maxConsecutiveFailures": 3
 }
 ]
 }
 ]
 },
 {
 "id": "/zwitscher/services",
 "apps": [
 {
 "id": "zwitscher-chuck",
 "cpus": 1,
 "mem": 256,
 "disk": 0,
 "instances": 1,
 "container": {
 "docker": {
 "image": "adersberger/zwitscher-app-chuck:1.0.0-SNAPSHOT",
 "forcePullImage": true,
 "privileged": false,
 "network": "HOST",
 "portDefinitions": [
 { "port": 12340, "protocol": "tcp", "name": "rest-api" }
 ],
 "requirePorts" : true
 }
 },
 "env": {
 "PORT": "12340",
 "CONSUL": "consul.infrastructure.zwitscher.marathon.mesos:8500",
 "CONFIG_ENV" : "zwitscher"
 },
 "args": [
 "-Xmx256m"
 ],
 "healthChecks": [
 {
 "protocol": "HTTP",
 "port": 12340,
 "path": "/metrics/ping",
 "intervalSeconds": 10,
 "timeoutSeconds": 10,
 "maxConsecutiveFailures": 3
 }
 ],
 "dependencies": [
 "/zwitscher/infrastructure/consul"
 ]
 }
 ]
 }
 ]
 } marathon-appgroup.json /zwitscher /infrastructure /consul /fabio /service /zwitscher-chuck dependency "healthChecks": [
 {
 "protocol": “HTTP", "port": 9998, "path": "/health",
 "intervalSeconds": 10, "timeoutSeconds": 10, "maxConsecutiveFailures": 3
 }
 ] Define health checks for every app: "network": "HOST",
 "ports": [9998, 9999],
 "requirePorts" : true HOST networking (so that Mesos-DNS works) with fixed ports: "acceptedResourceRoles":["slave_public"] Run API gateway on public slave (accessible from www): "env": {
 "PORT": "12340",
 "CONSUL": "consul.infrastructure.zwitscher.marathon.mesos:8500"
 },
 "args": ["-Xmx256m"] Configuration @ startup with env vars and args: "container": { "docker": {
 "image": "adersberger/zwitscher-app-chuck:1.0.0-SNAPSHOT",
 "forcePullImage": true forcePullImage = true to get the latest pushed docker image: "dependencies": [ "/zwitscher/infrastructure/consul"] Yes, sometimes you need dependencies (but you should avoid them to get more resilient):
  • 52.
  • 53. CLOUD NATIVE JEE 101 SUMMARY ▸ Implementing JEE microservices on DC/OS is simple & fun. ▸ The JEE APIs are out of the box not cloud native but can easily be enhanced with the required functionality. You can use our JCloudEE util classes to glue JEE together with cloud native tech.
 
 
 
 
 ▸ Short round trip times are essential to be productive. You need full portability and automation from local host up to the cloud.
  • 55. https://github.com/qaware/kubepad ‣ First things first: Will be renamed to 
 CloudPad soon! ‣ Controlling a DC/OS cluster 
 with a DJ pad. ‣ Written in fancy Kotlin. ‣ Turned out to be really helpful for cloud native newbies to better grasp cluster orchestration. ‣ Kicky colored lights and well-hidden snake game easter egg. Set colors with app label.
  • 56.
  • 57. MESSAGING JEE ON DC/OS 201 SNEAK PREVIEW SECURITY WEB USER INTERFACE STATEFUL SERVICES
  • 58. TWITTER.COM/QAWARE - SLIDESHARE.NET/QAWARE Thank you! Questions? josef.adersberger@qaware.de @adersberger https://github.com/adersberger/cloud-native-zwitscher-jee
  • 61. READING CONFIGURATION VALUES @Inject
 private ConfigurationProvider config;
 //…
 String messageTag = config.getProperty("messageTag", String.class); try to read config value in Consul fallback to file if Consul is not available or no config value is set in Consul
  • 62. THE CONSUL AGENT AND CONFIG ENVIRONMENT CAN BE SET WITH A ENV VAR. "env": {
 "CONFIG_ENV" : "zwitscher"
 } The config environment (e.g. “zwitscher”, “zwitscher-test”, “zwitscher-prod”). Refers to 
 a path in Consul or to a local path where the config file is.
  • 63. MONITORING & DIAGNOSABILITYCOLLECT, STORE, ANALYZE METRICS COLLECT, STORE, ANALYZE LOGS COLLECT, STORE, ANALYZE TRACES DASHBOARDING & ALERTING
  • 64. CUSTOM INSTRUMENTATIONS ▸ Logging
 
 ▸ Business Metrics
 
 
 
 ▸ Timers @Inject
 private Logger logger; @ApplicationScoped
 public class Slf4jLoggerProvider {
 
 @Produces
 public Logger produceLogger(InjectionPoint injectionPoint) {
 return LoggerFactory.getLogger(
 injectionPoint.getMember() .getDeclaringClass() .getName());
 }
 
 } @Inject
 MetricRegistry metrics;
 
 //…
 
 metrics.counter("fun counter").inc(); @GET
 @Timed
 @Produces("application/json")
 public Response getJoke() { //…