SlideShare una empresa de Scribd logo
1 de 67
Descargar para leer sin conexión
© 2020 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI)
Micronaut:
Changing The Micro Future
micronaut.io
About Me
• Senior Software Engineer
• Web & JVM developer for 10+ years
• Husband and father
• OSS contributor
• 2GM Team Member at OCI
Zachary Klein
Agenda
❖ A Brief History
❖ Why Micronaut?
❖ What is Micronaut?
❖ An Introduction to…
‣ Creating an app
‣ Controllers
‣ Testing
‣ HTTP Clients
‣ Dependency Injection
‣ Application
configuration
‣ Annotations
‣ Micronaut Data
‣ Micronaut resources &
Community
❖ Q & A
Copyright © 2018 by Object Computing, Inc. (OCI).
All rights reserved.
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Rise of the Microservices
❖ Limitations of JVM
frameworks
❖ Not designed for
microservices or the cloud
❖ Provide a powerful
programming model, but
at high runtime cost
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
What [most] Frameworks Do
❖ Read Bytecode For Every Bean In The Context
❖ Synthesize Mirror Annotations
❖ Build Reflective Metadata
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
What’s Wrong With
Reflection?
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
What’s Wrong With
Reflection?
❖ Java’s Annotation API is limited
‣ (e.g, type erasure)
❖ Reflection has a performance cost
❖ Data caches are not shared (memory cost)
❖ Classpath scanning and dynamic class-
loading are slow
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
A modern, JVM-based, full-stack framework for building modular,
easily testable microservice and serverless applications.
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Goals of Micronaut
❖ Designed With Microservices In Mind
❖ Fast Startup Time - No reflection
❖ Low Memory Footprint - No reflection
❖ Small Executable Jar Files
❖ Zero Dependencies - AOT processing
• A framework for microservice & serverless
applications
• Leverages Ahead Of Time (AOT) for DI, AOP, and
configuration injection
• Reactive HTTP layer built on Netty
• Declarative HTTP Client
• “Natively Cloud Native”
• Accompanied by a suite of official and community-
contributed integrations and libraries
Introduction to Micronaut
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Natively Cloud Native
❖ Service Discovery
‣ Consul, Eureka, etc…
❖ Configuration Sharing
‣ AWS, GCP, etc…
❖ Client Side Load Balancing
❖ Serverless Computing
‣ AWS Lambda
‣ Azure
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
What is Micronaut?
• A Microservices and Serverless-
focused framework
• A Complete Application
Framework - suitable for any
type of Application
• A Set of Libraries providing
Dependency Injection, Aspect
Oriented Programming (AOP),
Configuration Management,
Bean Introspection and more..
14
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
What Can You Build With
Micronaut?
• Microservices
• Serverless Applications
• Message-Driven Applications with
Kafka/Rabbit
• CLI Applications
• Android Applications
• Anything with static void
main(String..args)
15
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Some Numbers
❖ Smallest Micronaut Hello World Jar
‣ ~8mb
❖ Minimum Heap Requirements
‣ ~10mb
❖ Startup Time
‣ ~1 second
❖ No Reflection!
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
No Reflection
❖Annotations Are Processed
At Compile Time
❖No Runtime Reflection
Unless Necessary
❖More Performant At
Runtime
❖Less Memory Consumption
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Compile-Time DI
Generated Bytecode
resides in the same
package as your
source code - your
code is never
altered by Micronaut
© 2020 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI)
Hello World!
© 2020 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI)
Demo
Creating a Micronaut App
• Micronaut Launch: https://
launch.micronaut.io
• SDKMan: https://sdkman.io
• Homebrew/MacPorts
• Binary or Source: https://
micronaut.io/download.html
https://launch.micronaut.io22
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Hello Micronaut
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
@Controller("/")
public class HelloController {
private MessageHelper messageHelper;
public HelloController(MessageHelper messageHelper) {
this.messageHelper = messageHelper;
}
@Get("/hello/{name}")
public String hello(String name) {
return messageHelper.createGreeting(name);
}
}
No Reflection!
Micronaut Controllers
Micronaut Controllers
❖Annotated With @Controller
❖Configured As Beans
‣Subjected To DI
❖Conceptually Similar To Controllers In Other
Frameworks
‣Grails
‣Spring
‣Etc…
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Hello Controller
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
@Controller("/")
public class HelloController {
@Get("/hello/{name}")
public String greet(String name) {
return "Hello " + name;
}
}
$ curl http://localhost:8080/hello/World
Hello World
RFC-6570 URI
Template
https://tools.ietf.org/html/
rfc6570
Copyright © 2018 by Object Computing, Inc. (OCI).
All rights reserved.
URI Templates
/books/{id} Simple match

Integer id
/books/1
/books/{id:2} A variable of 2 characters max

Integer id
/books/10
/books{/id} An optional URI variable

@Nullable Integer id
/books/10 or /books
/book{/id:[a-zA-Z]+} An optional URI variable with regex

@Nullable String id
/books/foo
/books{?max,offset} Optional query parameters

@Nullable Integer max
/books?max=10&offset=10
/books{/path:.*}{.ext} Regex path match with extension
@Nullable String path
/books/foo/bar.xml
Testing Micronaut
❖Micronaut is test-framework agnostic
❖No special tooling required for unit or integration/
functional tests
❖Simplest approach: start the ApplicationContext
and test away!
try (ApplicationContext context = ApplicationContext.run()) {
MyBean myBean = context.getBean(MyBean.class);
// test your MyBean
}
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Test Hello Controller
import io.micronaut.context.ApplicationContext
import io.micronaut.http.client.HttpClient
import io.micronaut.runtime.server.EmbeddedServer
import spock.lang.AutoCleanup
import spock.lang.Shared
import spock.lang.Specification
class HelloControllerSpec extends Specification {
@Shared
@AutoCleanup
EmbeddedServer embeddedServer = ApplicationContext.run(EmbeddedServer)
@Shared
HttpClient client = HttpClient.create(embeddedServer.URL)
void 'test greeting'() {
expect:
client.toBlocking().retrieve('/hello/James') == 'Hello James'
}
}
Could Also Write a
POJO Unit Test
Without Running
The Server
@MicronautTest
@Property(name = "greeting.prefix", value = "Hello")
class HelloControllerSpec extends Specification {
@Inject HelloClient client
void 'test greeting'() {
expect:
client.toBlocking().retrieve('/hello/James') == 'Hello James'
}
}
❖Testing library for Spock & JUnit 5
❖Starts up application (inc. embedded server) and
shuts it down automatically
❖Allows direct injection of beans into test classes
❖Set configuration properties with @Property
Micronaut Test
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Test Hello Controller
import io.micronaut.http.client.HttpClient
import io.micronaut.http.client.annotation.Client
import io.micronaut.test.annotation.MicronautTest
import spock.lang.Specification
import javax.inject.Inject
@MicronautTest
class HelloControllerSpec extends Specification {
@Inject
@Client('/')
HttpClient client
void 'test greeting'() {
expect:
client.toBlocking().retrieve('/hello/James') == 'Hello James'
}
}
testCompile “io.micronaut.test:micronaut-test-spock:$mnTestVersion"
Reactive Controllers
@Controller("/people")
public class PersonController {
Map<String, Person> inMemoryDatastore = new ConcurrentHashMap<>();
@Post("/saveReactive")
public Single<HttpResponse<Person>> save(@Body Single<Person> person) {
return person.map(p -> {
inMemoryDatastore.put(p.getFirstName(), p);
return HttpResponse.created(p);
}
);
}
}
❖Support for RxJava (2 & 3), Reactor,
CompleteableFuture
❖Leverages Micronaut & Netty’s reactive model
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut HTTP Client
33
❖Netty-Based HTTP Client
❖Low-level API and declarative
compile-time client
❖Uses @Introduction advice to
simplify writing clients
❖Reactive, CompletableFuture
and blocking I/O support
❖Built-in Service Discovery support
❖Support for multi-part uploads,
streaming data over HTTP, etc
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Declarative Client Interfaces
34
import io.micronaut.http.MediaType;
import io.micronaut.http.annotation.*;
@Client("/hello") //or absolute URL or service ID
public interface HelloClient {
@Get(produces = MediaType.TEXT_PLAIN)
String hello();
}
src/main/java/example/micronaut/HelloClient.java
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Declarative Client Interfaces
@MicronautTest
class HelloControllerSpec extends Specification {
@Inject HelloClient client
void 'test greeting'() {
expect:
client.hello() == 'Hello World!’
}
}
35
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Dependency Injection
❖Micronaut Contains A Full Featured Dependency
Injection (DI) Container
❖Uses javax.inject.* Annotations
❖JSR-330 Compliant
‣Passes The Full TCK
❖Supports Constructor Injection As Well As
Property And Field Injection
‣insert heated debate here…
36
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Compile-Time DI
Generated Bytecode
resides in the same
package as your
source code - your
code is never
altered by Micronaut
37
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Constructor Injection
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
@Controller("/")
public class HelloController {
private MessageHelper messageHelper;
public HelloController(MessageHelper messageHelper) {
this.messageHelper = messageHelper;
}
// ...
}
38
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Property Injection
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import javax.inject.Inject;
@Controller("/")
public class HelloController {
private MessageHelper messageHelper;
@Inject
public void setMessageHelper(MessageHelper messageHelper) {
this.messageHelper = messageHelper;
}
// ...
}
39
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Field Injection
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import javax.inject.Inject;
@Controller("/")
public class HelloController {
@Inject
// Could be private, protected,
// package-protected or public
private MessageHelper messageHelper;
// ...
}
40
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Dependency Injection
❖Bean Scopes
@Singleton Only one instance of the bean should exist
@Context Eagerly instantiated
@Prototype New instance is created each time it is injected
@Infrastructure Bean cannot be replaced
@ThreadLocal Bean per thread via a ThreadLocal
@Refreshable Bean's state to be refreshed via the `/refresh`
endpoint
@RequestScope New instance is created and associated with each
HTTP request
41
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Conditional Beans
❖Bean Definitions May Be Marked With @Requires
To Conditionally Load Them
❖Examples:
@Requires(classes = org.hibernate.classic.Lifecycle.class)
@Requires(property = “some.property")
@Requires(property = “some.property”, value = "some value")
@Requires(beans = javax.sql.DataSource.class)
@Requires(env = "test")
@Requires(notEnv = "test")
@Requires(sdk = Requires.Sdk.JAVA, version = “1.8")
42
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Replaceable Beans
❖ @Replaces May Be Used In Conjunction With
@Requires To Optionally Replace Beans
@Singleton
@Requires(beans = DataSource.class)
public class JdbcBookService implements BookService {
// Real BookService Impl...
}
@Singleton
@Requires(env = Environment.TEST)
@Replaces(JdbcBookService.class)
public class MockBookService implements BookService {
// Mock BookService Impl...
}
43
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
PostConstruct
@Refreshable
public static class WeatherService {
private String forecast;
@PostConstruct
public void init() {
forecast = "Scattered Clouds "
+ new SimpleDateFormat("dd/MMM/yy HH:mm:ss.SSS”)
.format(new Date());
}
public String latestForecast() {
return forecast;
}
}
44
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
PreDestroy
import javax.annotation.PreDestroy;
import javax.inject.Singleton;
import java.util.concurrent.atomic.AtomicBoolean;
@Singleton
public class PreDestroyBean implements AutoCloseable {
AtomicBoolean stopped = new AtomicBoolean(false);
@PreDestroy
@Override
public void close() throws Exception {
stopped.compareAndSet(false, true);
}
}
45
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Application Configuration
46
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Config Files
❖Micronaut Supports Multiple Formats
❖Defined In src/main/resources/
‣application.properties
‣application.yml
‣application.groovy
‣application.json
❖Environment specific configuration with -suffix:
‣application-test.yml
‣application-gcp.yml
https://docs.micronaut.io/latest/api/io/micronaut/context/env/Environment.html
47
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Alternate Config Sources
❖SPRING_APPLICATION_JSON
❖MICRONAUT_APPLICATION_JSON
❖System Properties
❖OS Environment Variables
❖Cloud Configuration
❖application-[env].[extension]
‣env = runtime environment
48
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Injecting Config Values
❖Config Values May Be Injected Into Property
References Using @Value(…)
import io.micronaut.context.annotation.Value;
@Controller(“/")
public class SomeController {
@Value("${some.config.value}")
protected String someProperty;
// ...
}
49
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Default Config Values
❖ @Value(…) Supports A Default Value
import io.micronaut.context.annotation.Value;
@Controller("/")
public class SomeController {
@Value("${some.config.value:99}")
protected String someProperty;
// ...
}
50
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Property Placeholders
❖ ${value:default} Syntax can be used in all
Micronaut annotations for config injection
❖Great for API versioning (but check out @Version first!)
import io.micronaut.context.annotation.Value;
@Controller(“${some.controller.path:/some}”)
public class SomeController {
@Value("${some.config.value:99}")
protected String someProperty;
// ...
}
51
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Retryable
❖Indicates that the method call should be re-
attempted for a configurable number of times,
before throwing an exception
52
@Retryable(
attempts = “5",
delay = “2s"
)
public Book findBook(String title) { //...
@Retryable(attempts = "${book.retry.attempts:3}",
delay = "${book.retry.delay:1s}" )
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Circuit Breaker
❖Variation of @Retryable which (after a set number
of failures) will immediately re-throw the exception
without waiting for the method to fail
53
@CircuitBreaker(
attempts = “5",
delay = “2s”
reset = “30s”
)
public Book findBook(String title) { //...
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Cacheable
❖Annotate classes and methods to specify caching
behavior
54
@Singleton
@CacheConfig("headlines")
public class NewsService {
@Cacheable
public List<String> headlines(Month month) {
//This method is cacheable
}
@CachePut(parameters = {"month"})
public List<String> addHeadline(Month month, String headline) {
//Return value is cached with name headlines for the supplied month.
}
@CacheInvalidate(parameters = {"month"})
public void removeHeadline(Month month, String headline) {
//invalidates the cache headlines for the supplied month.
}
}
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Scheduled
❖Annotation for scheduling background tasks (can
also be done programmatically via TaskScheduler)
55
@Scheduled(fixedDelay = "5m")
void fiveMinutesAfterLastExecution() {
System.out.println("Executing fiveMinutesAfterLastExecution()")
}
@Scheduled(cron = "0 15 10 ? * MON" )
void everyMondayAtTenFifteenAm() {
System.out.println("Executing everyMondayAtTenFifteenAm()")
}
@Scheduled(initialDelay = "1m" )
void onceOneMinuteAfterStartup() {
System.out.println("Executing onceOneMinuteAfterStartup()")
}
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Data
❖Database Access Toolkit
❖Developed By Micronaut Team
❖Key Distinguishing Factors:
‣Queries Computed At Compile Time
‣No Runtime Reflection
‣No Query Translation
‣GraalVM support!
❖GA release in February 2020
56
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Data JDBC
Dependencies
// ...
dependencies {
annotationProcessor “io.micronaut.data:micronaut-data-processor"
implementation "io.micronaut.data:micronaut-data-jdbc"
implementation “io.micronaut.sql:micronaut-jdbc-hikari"
runtimeOnly “com.h2database:h2"
// ...
}
57
JDBC
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Data Entity
// src/main/java/demo/Car.groovy
package demo;
import io.micronaut.data.annotation.MappedEntity;
import io.micronaut.data.annotation.GeneratedValue;
import io.micronaut.data.annotation.Id;
@MappedEntity
public class Car {
@Id
@GeneratedValue
private Long id;
private String make;
private String model;
// …
}
58
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Data Repository
package demo;
import io.micronaut.data.jdbc.annotation.JdbcRepository;
import io.micronaut.data.model.query.builder.sql.Dialect;
import io.micronaut.data.repository.CrudRepository;
@JdbcRepository(dialect = Dialect.MYSQL)
public interface CarRepository extends CrudRepository<Car, Long> {}
59
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Data Repository
package demo;
import io.micronaut.data.jdbc.annotation.JdbcRepository;
import io.micronaut.data.model.query.builder.sql.Dialect;
import io.micronaut.data.repository.CrudRepository;
@JdbcRepository(dialect = Dialect.MYSQL)
public interface CarRepository extends CrudRepository<Car, Long> {
void update(@Id long id, String make, String model);
Car save(String make, String model);
}
60
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Data Repository
package demo;
import io.micronaut.data.jdbc.annotation.JdbcRepository;
import io.micronaut.data.model.query.builder.sql.Dialect;
import io.micronaut.data.repository.CrudRepository;
@JdbcRepository(dialect = Dialect.MYSQL)
public interface CarRepository extends CrudRepository<Car, Long> {
CarDTO findById(Long id) // Will only query for fields in the DTO
}
61
<logger name="io.micronaut.data.query" level="trace" />
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Data Transactions
62
❖Programmatic: Micronaut or
Spring TransactionManager API
supported
❖Declarative: @Transactional on
the method
Micronaut Resources
❖https://micronaut.io/launch
❖docs.micronaut.io
❖guides.micronaut.io
❖micronaut.io/blog/index.html
❖micronaut.io/faq.html
❖github.com/micronaut-projects/micronaut-core
❖https://micronaut.io/foundation
Micronaut Community
Resources
❖gitter.im/micronautfw
❖https://github.com/jhipster/jhipster-sample-
app-micronaut
❖https://developer.okta.com/blog/
2020/08/17/micronaut-jhipster-heroku
❖https://github.com/JonasHavers/awesome-
micronaut
https://launch.micronaut.io65
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Questions?
Zachary Klein
Software Engineer at Object Computing
kleinz@objectcomputing.com
Twitter: @ZacharyAKlein
Gifthub: Zachary Klein
© 2020 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI)
OCI Contact Information
Zachary Klein
Software Engineer at Object Computing
2GM@objectcomputing.com
Twitter: @ZacharyAKlein
Gifthub: Zachary Klein
Jen Wiese
Micronaut and Grails Product Evangelist
wiesej@objectcomputing.com
(314) 579-0066
micronaut.io

Más contenido relacionado

La actualidad más candente

Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020Matt Raible
 
Spark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RSSpark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RSArun Gupta
 
JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011Shreedhar Ganapathy
 
Building Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksBuilding Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksMike Hugo
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopArun Gupta
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuVMware Tanzu
 
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
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13Fred Sauer
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
Grails Plugin Best Practices
Grails Plugin Best PracticesGrails Plugin Best Practices
Grails Plugin Best PracticesBurt Beckwith
 
If Hemingway Wrote JavaDocs
If Hemingway Wrote JavaDocsIf Hemingway Wrote JavaDocs
If Hemingway Wrote JavaDocsVMware Tanzu
 
The Past Year in Spring for Apache Geode
The Past Year in Spring for Apache GeodeThe Past Year in Spring for Apache Geode
The Past Year in Spring for Apache GeodeVMware Tanzu
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...Matt Raible
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web DevelopmentHong Jiang
 
Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Matt Raible
 
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019Matt Raible
 
Introduction to WebMvc.fn
Introduction to WebMvc.fnIntroduction to WebMvc.fn
Introduction to WebMvc.fnVMware Tanzu
 
What's New in Spring 3.1
What's New in Spring 3.1What's New in Spring 3.1
What's New in Spring 3.1Matt Raible
 
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Matt Raible
 

La actualidad más candente (20)

Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
 
Spark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RSSpark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RS
 
JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011
 
Building Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And TricksBuilding Grails Plugins - Tips And Tricks
Building Grails Plugins - Tips And Tricks
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 Workshop
 
Spring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFuSpring Boot Revisited with KoFu and JaFu
Spring Boot Revisited with KoFu and JaFu
 
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
 
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
Grails Plugin Best Practices
Grails Plugin Best PracticesGrails Plugin Best Practices
Grails Plugin Best Practices
 
Os Johnson
Os JohnsonOs Johnson
Os Johnson
 
If Hemingway Wrote JavaDocs
If Hemingway Wrote JavaDocsIf Hemingway Wrote JavaDocs
If Hemingway Wrote JavaDocs
 
The Past Year in Spring for Apache Geode
The Past Year in Spring for Apache GeodeThe Past Year in Spring for Apache Geode
The Past Year in Spring for Apache Geode
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web Development
 
Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018
 
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
 
Introduction to WebMvc.fn
Introduction to WebMvc.fnIntroduction to WebMvc.fn
Introduction to WebMvc.fn
 
What's New in Spring 3.1
What's New in Spring 3.1What's New in Spring 3.1
What's New in Spring 3.1
 
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
Mobile Development with Ionic, React Native, and JHipster - ACGNJ Java Users ...
 

Similar a Micronaut: Changing the Micro Future

Groovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with MicronautGroovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with MicronautZachary Klein
 
Native Cloud-Native: Building Agile Microservices with the Micronaut Framework
Native Cloud-Native: Building Agile Microservices with the Micronaut FrameworkNative Cloud-Native: Building Agile Microservices with the Micronaut Framework
Native Cloud-Native: Building Agile Microservices with the Micronaut FrameworkZachary Klein
 
Developing Micronaut Applications With IntelliJ IDEA
Developing Micronaut Applications With IntelliJ IDEADeveloping Micronaut Applications With IntelliJ IDEA
Developing Micronaut Applications With IntelliJ IDEAIván López Martín
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivRon Perlmuter
 
[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...
[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...
[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...Sanae BEKKAR
 
Building Hybrid Applications with VAST and WebView2
Building Hybrid Applications with VAST and WebView2Building Hybrid Applications with VAST and WebView2
Building Hybrid Applications with VAST and WebView2ESUG
 
Building Cloud Native Applications with Oracle Autonomous Database.
Building Cloud Native Applications with Oracle Autonomous Database.Building Cloud Native Applications with Oracle Autonomous Database.
Building Cloud Native Applications with Oracle Autonomous Database.Oracle Developers
 
IoT and Maker Crossover (IMCO) Conference 2015
IoT and Maker Crossover (IMCO) Conference 2015IoT and Maker Crossover (IMCO) Conference 2015
IoT and Maker Crossover (IMCO) Conference 2015Jollen Chen
 
Building and Deploying Cloud Native Applications
Building and Deploying Cloud Native ApplicationsBuilding and Deploying Cloud Native Applications
Building and Deploying Cloud Native ApplicationsManish Kapur
 
Cloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
Cloud Native Meetup Santa Clara 07-11-2019 by Manish KapurCloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
Cloud Native Meetup Santa Clara 07-11-2019 by Manish KapurOracle Developers
 
Internet of Things and Edge Compute at Chick-fil-A
Internet of Things and Edge Compute at Chick-fil-AInternet of Things and Edge Compute at Chick-fil-A
Internet of Things and Edge Compute at Chick-fil-ABrian Chambers
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmpEmily Jiang
 
Codecentric At Ajax World Conference San Jose
Codecentric At Ajax World Conference San JoseCodecentric At Ajax World Conference San Jose
Codecentric At Ajax World Conference San JoseFabian Lange
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoringOracle Korea
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringDonghuKIM2
 
Building Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonBuilding Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonLeon Stigter
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Matt Raible
 
O2 platform and ASP.NET MVC, by Michael Hidalgo
O2 platform and ASP.NET MVC, by Michael HidalgoO2 platform and ASP.NET MVC, by Michael Hidalgo
O2 platform and ASP.NET MVC, by Michael HidalgoDinis Cruz
 

Similar a Micronaut: Changing the Micro Future (20)

Groovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with MicronautGroovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with Micronaut
 
Native Cloud-Native: Building Agile Microservices with the Micronaut Framework
Native Cloud-Native: Building Agile Microservices with the Micronaut FrameworkNative Cloud-Native: Building Agile Microservices with the Micronaut Framework
Native Cloud-Native: Building Agile Microservices with the Micronaut Framework
 
Developing Micronaut Applications With IntelliJ IDEA
Developing Micronaut Applications With IntelliJ IDEADeveloping Micronaut Applications With IntelliJ IDEA
Developing Micronaut Applications With IntelliJ IDEA
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
 
[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...
[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...
[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...
 
Building Hybrid Applications with VAST and WebView2
Building Hybrid Applications with VAST and WebView2Building Hybrid Applications with VAST and WebView2
Building Hybrid Applications with VAST and WebView2
 
Building Cloud Native Applications with Oracle Autonomous Database.
Building Cloud Native Applications with Oracle Autonomous Database.Building Cloud Native Applications with Oracle Autonomous Database.
Building Cloud Native Applications with Oracle Autonomous Database.
 
IoT and Maker Crossover (IMCO) Conference 2015
IoT and Maker Crossover (IMCO) Conference 2015IoT and Maker Crossover (IMCO) Conference 2015
IoT and Maker Crossover (IMCO) Conference 2015
 
Building and Deploying Cloud Native Applications
Building and Deploying Cloud Native ApplicationsBuilding and Deploying Cloud Native Applications
Building and Deploying Cloud Native Applications
 
Cloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
Cloud Native Meetup Santa Clara 07-11-2019 by Manish KapurCloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
Cloud Native Meetup Santa Clara 07-11-2019 by Manish Kapur
 
Internet of Things and Edge Compute at Chick-fil-A
Internet of Things and Edge Compute at Chick-fil-AInternet of Things and Edge Compute at Chick-fil-A
Internet of Things and Edge Compute at Chick-fil-A
 
Build12 factorappusingmp
Build12 factorappusingmpBuild12 factorappusingmp
Build12 factorappusingmp
 
Codecentric At Ajax World Conference San Jose
Codecentric At Ajax World Conference San JoseCodecentric At Ajax World Conference San Jose
Codecentric At Ajax World Conference San Jose
 
2015 5-7-slide
2015 5-7-slide2015 5-7-slide
2015 5-7-slide
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
 
Spring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics MonitoringSpring Boot - Microservice Metrics Monitoring
Spring Boot - Microservice Metrics Monitoring
 
56k.cloud training
56k.cloud training56k.cloud training
56k.cloud training
 
Building Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonBuilding Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and Tekton
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
 
O2 platform and ASP.NET MVC, by Michael Hidalgo
O2 platform and ASP.NET MVC, by Michael HidalgoO2 platform and ASP.NET MVC, by Michael Hidalgo
O2 platform and ASP.NET MVC, by Michael Hidalgo
 

Último

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Micronaut: Changing the Micro Future

  • 1. © 2020 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI) Micronaut: Changing The Micro Future micronaut.io
  • 2. About Me • Senior Software Engineer • Web & JVM developer for 10+ years • Husband and father • OSS contributor • 2GM Team Member at OCI Zachary Klein
  • 3. Agenda ❖ A Brief History ❖ Why Micronaut? ❖ What is Micronaut? ❖ An Introduction to… ‣ Creating an app ‣ Controllers ‣ Testing ‣ HTTP Clients ‣ Dependency Injection ‣ Application configuration ‣ Annotations ‣ Micronaut Data ‣ Micronaut resources & Community ❖ Q & A
  • 4.
  • 5. Copyright © 2018 by Object Computing, Inc. (OCI). All rights reserved.
  • 6. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Rise of the Microservices ❖ Limitations of JVM frameworks ❖ Not designed for microservices or the cloud ❖ Provide a powerful programming model, but at high runtime cost
  • 7. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. What [most] Frameworks Do ❖ Read Bytecode For Every Bean In The Context ❖ Synthesize Mirror Annotations ❖ Build Reflective Metadata
  • 8. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. What’s Wrong With Reflection?
  • 9. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. What’s Wrong With Reflection? ❖ Java’s Annotation API is limited ‣ (e.g, type erasure) ❖ Reflection has a performance cost ❖ Data caches are not shared (memory cost) ❖ Classpath scanning and dynamic class- loading are slow
  • 10. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. A modern, JVM-based, full-stack framework for building modular, easily testable microservice and serverless applications.
  • 11. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Goals of Micronaut ❖ Designed With Microservices In Mind ❖ Fast Startup Time - No reflection ❖ Low Memory Footprint - No reflection ❖ Small Executable Jar Files ❖ Zero Dependencies - AOT processing
  • 12. • A framework for microservice & serverless applications • Leverages Ahead Of Time (AOT) for DI, AOP, and configuration injection • Reactive HTTP layer built on Netty • Declarative HTTP Client • “Natively Cloud Native” • Accompanied by a suite of official and community- contributed integrations and libraries Introduction to Micronaut
  • 13. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Natively Cloud Native ❖ Service Discovery ‣ Consul, Eureka, etc… ❖ Configuration Sharing ‣ AWS, GCP, etc… ❖ Client Side Load Balancing ❖ Serverless Computing ‣ AWS Lambda ‣ Azure
  • 14. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. What is Micronaut? • A Microservices and Serverless- focused framework • A Complete Application Framework - suitable for any type of Application • A Set of Libraries providing Dependency Injection, Aspect Oriented Programming (AOP), Configuration Management, Bean Introspection and more.. 14
  • 15. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. What Can You Build With Micronaut? • Microservices • Serverless Applications • Message-Driven Applications with Kafka/Rabbit • CLI Applications • Android Applications • Anything with static void main(String..args) 15
  • 16. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Some Numbers ❖ Smallest Micronaut Hello World Jar ‣ ~8mb ❖ Minimum Heap Requirements ‣ ~10mb ❖ Startup Time ‣ ~1 second ❖ No Reflection!
  • 17. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. No Reflection ❖Annotations Are Processed At Compile Time ❖No Runtime Reflection Unless Necessary ❖More Performant At Runtime ❖Less Memory Consumption
  • 18. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Compile-Time DI Generated Bytecode resides in the same package as your source code - your code is never altered by Micronaut
  • 19. © 2020 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI) Hello World!
  • 20. © 2020 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI) Demo
  • 21. Creating a Micronaut App • Micronaut Launch: https:// launch.micronaut.io • SDKMan: https://sdkman.io • Homebrew/MacPorts • Binary or Source: https:// micronaut.io/download.html
  • 23. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Hello Micronaut import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Get; @Controller("/") public class HelloController { private MessageHelper messageHelper; public HelloController(MessageHelper messageHelper) { this.messageHelper = messageHelper; } @Get("/hello/{name}") public String hello(String name) { return messageHelper.createGreeting(name); } } No Reflection!
  • 25. Micronaut Controllers ❖Annotated With @Controller ❖Configured As Beans ‣Subjected To DI ❖Conceptually Similar To Controllers In Other Frameworks ‣Grails ‣Spring ‣Etc…
  • 26. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Hello Controller import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Get; @Controller("/") public class HelloController { @Get("/hello/{name}") public String greet(String name) { return "Hello " + name; } } $ curl http://localhost:8080/hello/World Hello World RFC-6570 URI Template https://tools.ietf.org/html/ rfc6570
  • 27. Copyright © 2018 by Object Computing, Inc. (OCI). All rights reserved. URI Templates /books/{id} Simple match Integer id /books/1 /books/{id:2} A variable of 2 characters max Integer id /books/10 /books{/id} An optional URI variable @Nullable Integer id /books/10 or /books /book{/id:[a-zA-Z]+} An optional URI variable with regex @Nullable String id /books/foo /books{?max,offset} Optional query parameters @Nullable Integer max /books?max=10&offset=10 /books{/path:.*}{.ext} Regex path match with extension @Nullable String path /books/foo/bar.xml
  • 28. Testing Micronaut ❖Micronaut is test-framework agnostic ❖No special tooling required for unit or integration/ functional tests ❖Simplest approach: start the ApplicationContext and test away! try (ApplicationContext context = ApplicationContext.run()) { MyBean myBean = context.getBean(MyBean.class); // test your MyBean }
  • 29. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Test Hello Controller import io.micronaut.context.ApplicationContext import io.micronaut.http.client.HttpClient import io.micronaut.runtime.server.EmbeddedServer import spock.lang.AutoCleanup import spock.lang.Shared import spock.lang.Specification class HelloControllerSpec extends Specification { @Shared @AutoCleanup EmbeddedServer embeddedServer = ApplicationContext.run(EmbeddedServer) @Shared HttpClient client = HttpClient.create(embeddedServer.URL) void 'test greeting'() { expect: client.toBlocking().retrieve('/hello/James') == 'Hello James' } } Could Also Write a POJO Unit Test Without Running The Server
  • 30. @MicronautTest @Property(name = "greeting.prefix", value = "Hello") class HelloControllerSpec extends Specification { @Inject HelloClient client void 'test greeting'() { expect: client.toBlocking().retrieve('/hello/James') == 'Hello James' } } ❖Testing library for Spock & JUnit 5 ❖Starts up application (inc. embedded server) and shuts it down automatically ❖Allows direct injection of beans into test classes ❖Set configuration properties with @Property Micronaut Test
  • 31. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Test Hello Controller import io.micronaut.http.client.HttpClient import io.micronaut.http.client.annotation.Client import io.micronaut.test.annotation.MicronautTest import spock.lang.Specification import javax.inject.Inject @MicronautTest class HelloControllerSpec extends Specification { @Inject @Client('/') HttpClient client void 'test greeting'() { expect: client.toBlocking().retrieve('/hello/James') == 'Hello James' } } testCompile “io.micronaut.test:micronaut-test-spock:$mnTestVersion"
  • 32. Reactive Controllers @Controller("/people") public class PersonController { Map<String, Person> inMemoryDatastore = new ConcurrentHashMap<>(); @Post("/saveReactive") public Single<HttpResponse<Person>> save(@Body Single<Person> person) { return person.map(p -> { inMemoryDatastore.put(p.getFirstName(), p); return HttpResponse.created(p); } ); } } ❖Support for RxJava (2 & 3), Reactor, CompleteableFuture ❖Leverages Micronaut & Netty’s reactive model
  • 33. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Micronaut HTTP Client 33 ❖Netty-Based HTTP Client ❖Low-level API and declarative compile-time client ❖Uses @Introduction advice to simplify writing clients ❖Reactive, CompletableFuture and blocking I/O support ❖Built-in Service Discovery support ❖Support for multi-part uploads, streaming data over HTTP, etc
  • 34. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Declarative Client Interfaces 34 import io.micronaut.http.MediaType; import io.micronaut.http.annotation.*; @Client("/hello") //or absolute URL or service ID public interface HelloClient { @Get(produces = MediaType.TEXT_PLAIN) String hello(); } src/main/java/example/micronaut/HelloClient.java
  • 35. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Declarative Client Interfaces @MicronautTest class HelloControllerSpec extends Specification { @Inject HelloClient client void 'test greeting'() { expect: client.hello() == 'Hello World!’ } } 35
  • 36. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Dependency Injection ❖Micronaut Contains A Full Featured Dependency Injection (DI) Container ❖Uses javax.inject.* Annotations ❖JSR-330 Compliant ‣Passes The Full TCK ❖Supports Constructor Injection As Well As Property And Field Injection ‣insert heated debate here… 36
  • 37. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Compile-Time DI Generated Bytecode resides in the same package as your source code - your code is never altered by Micronaut 37
  • 38. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Constructor Injection import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Get; @Controller("/") public class HelloController { private MessageHelper messageHelper; public HelloController(MessageHelper messageHelper) { this.messageHelper = messageHelper; } // ... } 38
  • 39. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Property Injection import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Get; import javax.inject.Inject; @Controller("/") public class HelloController { private MessageHelper messageHelper; @Inject public void setMessageHelper(MessageHelper messageHelper) { this.messageHelper = messageHelper; } // ... } 39
  • 40. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Field Injection import io.micronaut.http.annotation.Controller; import io.micronaut.http.annotation.Get; import javax.inject.Inject; @Controller("/") public class HelloController { @Inject // Could be private, protected, // package-protected or public private MessageHelper messageHelper; // ... } 40
  • 41. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Dependency Injection ❖Bean Scopes @Singleton Only one instance of the bean should exist @Context Eagerly instantiated @Prototype New instance is created each time it is injected @Infrastructure Bean cannot be replaced @ThreadLocal Bean per thread via a ThreadLocal @Refreshable Bean's state to be refreshed via the `/refresh` endpoint @RequestScope New instance is created and associated with each HTTP request 41
  • 42. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Conditional Beans ❖Bean Definitions May Be Marked With @Requires To Conditionally Load Them ❖Examples: @Requires(classes = org.hibernate.classic.Lifecycle.class) @Requires(property = “some.property") @Requires(property = “some.property”, value = "some value") @Requires(beans = javax.sql.DataSource.class) @Requires(env = "test") @Requires(notEnv = "test") @Requires(sdk = Requires.Sdk.JAVA, version = “1.8") 42
  • 43. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Replaceable Beans ❖ @Replaces May Be Used In Conjunction With @Requires To Optionally Replace Beans @Singleton @Requires(beans = DataSource.class) public class JdbcBookService implements BookService { // Real BookService Impl... } @Singleton @Requires(env = Environment.TEST) @Replaces(JdbcBookService.class) public class MockBookService implements BookService { // Mock BookService Impl... } 43
  • 44. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. PostConstruct @Refreshable public static class WeatherService { private String forecast; @PostConstruct public void init() { forecast = "Scattered Clouds " + new SimpleDateFormat("dd/MMM/yy HH:mm:ss.SSS”) .format(new Date()); } public String latestForecast() { return forecast; } } 44
  • 45. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. PreDestroy import javax.annotation.PreDestroy; import javax.inject.Singleton; import java.util.concurrent.atomic.AtomicBoolean; @Singleton public class PreDestroyBean implements AutoCloseable { AtomicBoolean stopped = new AtomicBoolean(false); @PreDestroy @Override public void close() throws Exception { stopped.compareAndSet(false, true); } } 45
  • 46. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Application Configuration 46
  • 47. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Config Files ❖Micronaut Supports Multiple Formats ❖Defined In src/main/resources/ ‣application.properties ‣application.yml ‣application.groovy ‣application.json ❖Environment specific configuration with -suffix: ‣application-test.yml ‣application-gcp.yml https://docs.micronaut.io/latest/api/io/micronaut/context/env/Environment.html 47
  • 48. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Alternate Config Sources ❖SPRING_APPLICATION_JSON ❖MICRONAUT_APPLICATION_JSON ❖System Properties ❖OS Environment Variables ❖Cloud Configuration ❖application-[env].[extension] ‣env = runtime environment 48
  • 49. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Injecting Config Values ❖Config Values May Be Injected Into Property References Using @Value(…) import io.micronaut.context.annotation.Value; @Controller(“/") public class SomeController { @Value("${some.config.value}") protected String someProperty; // ... } 49
  • 50. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Default Config Values ❖ @Value(…) Supports A Default Value import io.micronaut.context.annotation.Value; @Controller("/") public class SomeController { @Value("${some.config.value:99}") protected String someProperty; // ... } 50
  • 51. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Property Placeholders ❖ ${value:default} Syntax can be used in all Micronaut annotations for config injection ❖Great for API versioning (but check out @Version first!) import io.micronaut.context.annotation.Value; @Controller(“${some.controller.path:/some}”) public class SomeController { @Value("${some.config.value:99}") protected String someProperty; // ... } 51
  • 52. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Retryable ❖Indicates that the method call should be re- attempted for a configurable number of times, before throwing an exception 52 @Retryable( attempts = “5", delay = “2s" ) public Book findBook(String title) { //... @Retryable(attempts = "${book.retry.attempts:3}", delay = "${book.retry.delay:1s}" )
  • 53. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Circuit Breaker ❖Variation of @Retryable which (after a set number of failures) will immediately re-throw the exception without waiting for the method to fail 53 @CircuitBreaker( attempts = “5", delay = “2s” reset = “30s” ) public Book findBook(String title) { //...
  • 54. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Cacheable ❖Annotate classes and methods to specify caching behavior 54 @Singleton @CacheConfig("headlines") public class NewsService { @Cacheable public List<String> headlines(Month month) { //This method is cacheable } @CachePut(parameters = {"month"}) public List<String> addHeadline(Month month, String headline) { //Return value is cached with name headlines for the supplied month. } @CacheInvalidate(parameters = {"month"}) public void removeHeadline(Month month, String headline) { //invalidates the cache headlines for the supplied month. } }
  • 55. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Scheduled ❖Annotation for scheduling background tasks (can also be done programmatically via TaskScheduler) 55 @Scheduled(fixedDelay = "5m") void fiveMinutesAfterLastExecution() { System.out.println("Executing fiveMinutesAfterLastExecution()") } @Scheduled(cron = "0 15 10 ? * MON" ) void everyMondayAtTenFifteenAm() { System.out.println("Executing everyMondayAtTenFifteenAm()") } @Scheduled(initialDelay = "1m" ) void onceOneMinuteAfterStartup() { System.out.println("Executing onceOneMinuteAfterStartup()") }
  • 56. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Data ❖Database Access Toolkit ❖Developed By Micronaut Team ❖Key Distinguishing Factors: ‣Queries Computed At Compile Time ‣No Runtime Reflection ‣No Query Translation ‣GraalVM support! ❖GA release in February 2020 56
  • 57. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Data JDBC Dependencies // ... dependencies { annotationProcessor “io.micronaut.data:micronaut-data-processor" implementation "io.micronaut.data:micronaut-data-jdbc" implementation “io.micronaut.sql:micronaut-jdbc-hikari" runtimeOnly “com.h2database:h2" // ... } 57 JDBC
  • 58. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Data Entity // src/main/java/demo/Car.groovy package demo; import io.micronaut.data.annotation.MappedEntity; import io.micronaut.data.annotation.GeneratedValue; import io.micronaut.data.annotation.Id; @MappedEntity public class Car { @Id @GeneratedValue private Long id; private String make; private String model; // … } 58
  • 59. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Data Repository package demo; import io.micronaut.data.jdbc.annotation.JdbcRepository; import io.micronaut.data.model.query.builder.sql.Dialect; import io.micronaut.data.repository.CrudRepository; @JdbcRepository(dialect = Dialect.MYSQL) public interface CarRepository extends CrudRepository<Car, Long> {} 59
  • 60. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Data Repository package demo; import io.micronaut.data.jdbc.annotation.JdbcRepository; import io.micronaut.data.model.query.builder.sql.Dialect; import io.micronaut.data.repository.CrudRepository; @JdbcRepository(dialect = Dialect.MYSQL) public interface CarRepository extends CrudRepository<Car, Long> { void update(@Id long id, String make, String model); Car save(String make, String model); } 60
  • 61. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Data Repository package demo; import io.micronaut.data.jdbc.annotation.JdbcRepository; import io.micronaut.data.model.query.builder.sql.Dialect; import io.micronaut.data.repository.CrudRepository; @JdbcRepository(dialect = Dialect.MYSQL) public interface CarRepository extends CrudRepository<Car, Long> { CarDTO findById(Long id) // Will only query for fields in the DTO } 61 <logger name="io.micronaut.data.query" level="trace" />
  • 62. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Data Transactions 62 ❖Programmatic: Micronaut or Spring TransactionManager API supported ❖Declarative: @Transactional on the method
  • 66. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Questions? Zachary Klein Software Engineer at Object Computing kleinz@objectcomputing.com Twitter: @ZacharyAKlein Gifthub: Zachary Klein
  • 67. © 2020 Object Computing, Inc. (OCI) All rights reserved. No part of these notes may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior, written permission of Object Computing, Inc. (OCI) OCI Contact Information Zachary Klein Software Engineer at Object Computing 2GM@objectcomputing.com Twitter: @ZacharyAKlein Gifthub: Zachary Klein Jen Wiese Micronaut and Grails Product Evangelist wiesej@objectcomputing.com (314) 579-0066 micronaut.io