SlideShare ist ein Scribd-Unternehmen logo
1 von 88
Downloaden Sie, um offline zu lesen
© 2023 Object Computing, Inc. 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.
Natively Cloud Native
Building Agile Microservices with the
Micronaut Framework™
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
About Me
Zachary Klein
• Principal Software Engineer,
Object Computing
• Speaker/instructor
• OSS Contributor to Grails &
Micronaut frameworks
@ZacharyAKlein
kleinz@objectcomputing.com
2
Copyright © 2023 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 © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
History of Micronaut
4
• Micronaut announced in March 2018
• Framework open-sourced in May 2018, 1.0 release in
October 2018
• Triggered a wave of excitement and innovation
around the JVM - Quarkus, Spring Fu, etc
• Micronaut 3.0 released in August 2021 - Micronaut
4.0 expected in Q2
• Micronaut continues to point the path forwards for
server-side Java frameworks
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Goals of Micronaut
5
• Designed With Microservices In Mind
• Fast Startup Time - No reflection
• Low Memory Footprint - No reflection
• Small Executable Jar Files
• AOT Compilation - Minimal runtime dependencies
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Introduction To The
Micronaut Framework
• A framework for microservice & serverless apps
• Leverages Ahead Of Time (AOT) compilation:
• DI, AOP, code introspection
• Reactive HTTP layer built on Netty: https://netty.io
• Declarative HTTP Client
• Collection of framework integrations and libraries
• Build-tool agnostic (Maven & Gradle plugins
provided)
• Natively Cloud Native
6
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Natively Cloud Native
7
• Service Discovery
• Consul, Eureka, K8s…
• Distributed Configuration
• AWS, GCP, K8s, etc…
• Client-Side Load Balancing
• Serverless Computing
• AWS Lambda, Azure, GCF, etc
• Distributed Tracing
• Token propagation… and more!
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
What Can You Build With
The Micronaut Framework?
• Microservices
• Serverless Applications
• Message-Driven Applications with
Kafka/RabbitMQ
• CLI Applications
• Android Applications
• Anything with static void
main(String..args)
8
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Why Should I Care About
Micronaut?
• Java and Traditional Java frameworks were not
designed with microservices & serverless in mind
• JVM-based DI/AOP solutions make heavy use of
reflection, runtime caches, and proxies
• Not optimized for fast cold starts (severless) or low
memory usage (microservices/containers)
9
Reflection
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Ahead of Time Compilation
Generated Bytecode
resides in the same
package as your
source code - your
code is never
altered by Micronaut
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
GraalVM
• "A high-performance JDK designed to accelerate
Java application performance while consuming fewer
resources”
• Allows generation of light-weight native images
• Minimal support for reflection
• Micronaut is officially “Ready for Native Image”
(tested by framework maintainers)
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
GraalVM
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
What is a Micronaut App?
• Micronaut-Inject: Core DI, AOP
• Micronaut-Runtime: ApplicationContext,
configuration
• HTTP-Server & Client: Reactive HTTP layer*
• A suite of configurations & libraries providing
advanced features (security, data access, messaging,
etc)
* Servlet containers are supported: https://micronaut-
projects.github.io/micronaut-servlet/1.0.2/guide/
index.html
14
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
• Micronaut-Inject: Core DI, AOP
• Micronaut-Runtime: ApplicationContext,
configuration
• HTTP-Server & Client: Reactive HTTP layer*
• A suite of configurations & libraries providing
advanced features (security, data access, messaging,
etc)
Can be used in any JVM-based
application!
What is a Micronaut App?
15
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
• Micronaut-Inject: Core DI, AOP
• Micronaut-Runtime: ApplicationContext,
configuration
• HTTP-Server & Client: Reactive HTTP layer*
• A suite of configurations & libraries providing
advanced features (security, data access, messaging,
etc)
Included in a standard Micronaut
Application (via CLI or Launch)
What is a Micronaut App?
16
Plus your choice of build tool:
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
• Micronaut-Inject: Core DI, AOP
• Micronaut-Runtime: ApplicationContext,
configuration
• HTTP-Server & Client: Reactive HTTP layer*
• A suite of configurations & libraries providing
advanced features (security, data access, messaging,
etc)
Added to your project manually OR
specified as “features” when creating
the app via CLI or Launch
What is a Micronaut App?
17
https://launch.micronaut.io
IntelliJ IDEA (Ultimate)
Creating a Micronaut App
• Micronaut Launch: https://
launch.micronaut.io
• SDKMan: https://sdkman.io
• Homebrew/MacPorts
• Binary or Source: https://
micronaut.io/download.html
Copyright © 2023 by Object Computing, Inc.
All rights reserved.
Non-blocking HTTP Server
Copyright © 2023 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
23
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Reactive Controllers
24
Copyright © 2023 by Object Computing, Inc.
All rights reserved.
Declarative HTTP Clients
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut HTTP Client
26
❖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 © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut HTTP Client
27
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut HTTP Client
28
https://guides.micronaut.io/latest/tag-json-streams.html
Copyright © 2023 by Object Computing, Inc.
All rights reserved.
Fast & Easy Testing
© 2023 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)
DEPENDENCY INJECTION
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Dependency Injection
❖Micronaut Contains A Full Featured Dependency
Injection (DI) Container
❖Uses jakarta.inject.* Annotations
❖JSR-330 Compliant
‣ Passes The Full TCK
❖Supports Constructor Injection As Well As
Property And Field Injection
‣ insert heated debate here…
31
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Ahead of Time Compilation
Generated Bytecode
resides in the same
package as your
source code - your
code is never
altered by Micronaut
Copyright © 2023 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;
// ...
}
33
Copyright © 2023 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 final MessageHelper messageHelper;
public HelloController(MessageHelper messageHelper) {
this.messageHelper = messageHelper;
}
// ...
}
RECOMMENDED! 34
Copyright © 2023 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")
35
Copyright © 2023 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...
}
36
Copyright © 2023 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;
}
}
37
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
PreDestroy
import javax.annotation.PreDestroy;
import jakarta.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);
}
}
38
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Application Configuration
39
Copyright © 2023 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
40
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Config Files
41
Copyright © 2023 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;
// ...
}
42
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Random Config Properties
❖Micronaut provides a set of randomly assigned
properties that you can use within your config
Property Value
random.port An available random port number
random.int Random int
random.integer Random int
random.long Random long
random.float Random float
random.shortuuid Random UUID of only 10 chars in length
random.uuid Random UUID with dashes
random.uuid2 Random UUID without dashes
micronaut:
application:
name: myapplication
instance:
id: ${random.shortuuid}
43
Copyright © 2023 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
44
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Configuration Annotations
❖ io.micronaut.context.annotation.ConfigurationProperties
❖ io.micronaut.context.annotation.EachProperty
❖ io.micronaut.context.annotation.EachBean
45
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Management Endpoints
❖Micronaut Provides A Set Of Management
Endpoints
❖Requires A Dependency On The management
Library
‣ "io.micronaut:micronaut-management"
❖Applications May Contribute Custom Endpoints
As Beans
46
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Management Endpoints
47
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Management Endpoints
/beans Returns information about the loaded bean
definitions in the application
/info Returns static information from the state of the
application
/health Returns information about the "health" of the
application
/metrics Return the application metrics. Requires the
micrometer-core configuration on the classpath
/refresh Refreshes bean state
/routes Returns information about URIs available to be
called for your application
/stop Shuts down the application server (disabled by
default)
/loggers View and mutate logging configuration (e.g, POST to
change log levels at runtime)
/env Returns all currently resolved configuration
properties
48
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Service Discovery
❖Support for Consul, Kubernetes and Eureka
❖Configuration Support for Consul, Kubernetes,
Vault, Spring Cloud Config Server and AWS
ParameterStore
❖Native Client-Side Load-Balancing
implementation ‘io.micronaut:micronaut-discovery-client'
49
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Service Discovery
micronaut:
application:
name: service-a
consul:
client:
registration:
enabled: true
defaultZone: "${CONSUL_HOST:localhost}:${CONSUL_PORT:8500}"
$ docker run -p 8500:8500 consul:1.2.4
src/main/resources/application.yml
Start up Consul with Docker
50
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Cacheable
❖Annotate classes and methods to specify caching
behavior
51
@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 © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Scheduled
❖Annotation for scheduling background tasks (can
also be done programmatically via TaskScheduler)
52
@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 © 2023 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
53
@Retryable(
attempts = “5",
 ​
delay = “2s"
)
public Book findBook(String title) { //...
@Retryable(attempts = "${book.retry.attempts:3}",
 ​
delay = "${book.retry.delay:1s}" )
Copyright © 2023 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
54
@CircuitBreaker(
attempts = “5",
 ​
delay = “2s”
 ​
reset = “30s”
)
public Book findBook(String title) { //...
Copyright © 2020 by Object Computing, Inc. (OCI).
All rights reserved.
Distributed Tracing
Catalog Inventory
Storefront
55
Copyright © 2023 by Object Computing, Inc.
All rights reserved.
Distributed Tracing
@NewSpan("productList")
List<Product> productList() {
//Get products
}
@ContinueSpan
@Get(“/{id}”)
HttpResponse<Product> show(Long id) {
//Get product
}
@Get("/{productNumber}")
HttpResponse<Integer> hits(
@SpanTag("product") String product
) {}
❖ @NewSpan begins a
new tracing segment
at this method
❖ @ContinueSpan
includes this method
within the current
span
❖ @SpanTag allows
metadata to be
added to the (new or
current) span
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Tracing UI
57
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
OpenAPI Documentation
58
https://dzone.com/articles/a-quick-guide-to-microservices-with-the-micronaut
micronaut:
router:
static-resources:
swagger:
paths: classpath:META-INF/swagger
mapping: /swagger/**
src/main/resources/application.yml
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Data
❖Precomputes Queries at compilation
time.
❖Solution for Static Queries
❖Uses Micronaut's reflection-free AOP.
❖Zero runtime overhead database
access solution
❖Compilation time checking
❖Smaller stack traces
59
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Data JPA
❖Support for Hibernate JPA
❖Precomputes JPA-QL queries
❖Provides a full ORM experience
❖Hibernate’s dialect support and
features
❖Con: Hibernate relies on runtime
reflection
60
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Data JDBC
❖Support for native JDBC
❖Data Mapper vs ORM
❖Focused on DTOs
❖Light-weight and reflection/
proxy-free
61
JDBC
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
JPA vs JDBC
62
JDBC Hibernate/JPA
More efficient Higher memory requirements
Few Dialects Greater dialect support
DTO-oriented Entity to Table
Optimized for reads Optimized for writes
Better for serverless Not optimized for cold starts
JDBC
Copyright © 2023 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;
// …
}
63
Copyright © 2023 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> {}
64
Copyright © 2023 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);
List<Car> findAllByMake(String make, String model);
Integer countAllByMakeAndModel(String make, String model);
}
65
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Security
66
❖Official security solution for
Micronaut apps
❖Follows similar pattern to Spring
Security (also implements JSR
250 annotations)
❖Makes use of HTTP filters
❖Supports basic auth, session
auth, JWT & OAuth 2.0
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Micronaut Kafka
• https://micronaut-projects.github.io/micronaut-kafka/
• Provides declarative API for publishing/consuming
events in Kafka
• Reflection-free serialization/deserialization of events
• Create messaging apps without a HTTP server
67
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Producer
68
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Consumer
69
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Kafka Summit Presentation
70
https://www.confluent.io/events/kafka-summit-
europe-2021/event-driven-applications-with-kafka-
micronaut-and-aws-lambda/
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
❖Micronaut applications can be deployed as JAR
files, containerized microservices; (optionally) as
native images
❖Cloud-Provider specific features available in
Micronaut Launch for:
‣ AWS Lambda
‣ Google Cloud Run / Functions / Compute /
AppEngine
‣ Oracle Cloud Infrastructure
‣ Microsoft Azure
71
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
72
❖Micronaut Guides
includes step-by-
step tutorials for
deploying to major
Cloud Platforms
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
https://guides.micronaut.io/latest/micronaut-google-cloud-
platform-cloud-run.html
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
Create the Google Cloud project (use gcloud to
authenticate and set the project ID)
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
gcloud auth configure-docker - sets up your local
Docker to point to Google Container Registry
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
Add Docker image info to build.gradle:
Push image to the Google Container Registry:
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
Deploy Google Cloud Run
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Deploying to the Cloud
Invoke deployed service:
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Summary
❖Micronaut is a full-featured
framework designed for cloud-
native architectures
❖Offers features that are useful in
every sort of application
❖Micronaut is actively evolving - 4.0
due in Q2!
❖Micronaut community is growing
and is super helpful - join the Gitter
channel! https://app.gitter.im/#/
micronautfw
84
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Resources
❖micronaut.io/launch
❖micronaut.io/docs
❖micronaut.io/guides
❖micronaut.io/blog
❖micronaut.io/foundation
❖https://app.gitter.im/#/micronautfw
85
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Resources
86
https://micronautpodcast.com/
Copyright © 2023 by Object Computing, Inc. (OCI).
All rights reserved.
Resources
87
https://groovypodcast.podbean.com/
© 2023 Object Computing, Inc. 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.
Thank You!
Zachary Klein - kleinz@objectcomputing.com

Weitere ähnliche Inhalte

Was ist angesagt?

Swagger AEM - An OpenAPI Specification for AEM
Swagger AEM - An OpenAPI Specification for AEMSwagger AEM - An OpenAPI Specification for AEM
Swagger AEM - An OpenAPI Specification for AEMCliffano Subagio
 
Practical Application of the API Security Top Ten: A Tester's Perspective
Practical Application of the API Security Top Ten: A Tester's PerspectivePractical Application of the API Security Top Ten: A Tester's Perspective
Practical Application of the API Security Top Ten: A Tester's PerspectiveRajniHatti
 
Single Sign-On for APEX apps (Important: latest version on edocr!)
Single Sign-On for APEX apps (Important: latest version on edocr!)Single Sign-On for APEX apps (Important: latest version on edocr!)
Single Sign-On for APEX apps (Important: latest version on edocr!)Niels de Bruijn
 
RESTFul API Design and Documentation - an Introduction
RESTFul API Design and Documentation - an IntroductionRESTFul API Design and Documentation - an Introduction
RESTFul API Design and Documentation - an IntroductionMiredot
 
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Niels de Bruijn
 
Asynchronous programming patterns in Perl
Asynchronous programming patterns in PerlAsynchronous programming patterns in Perl
Asynchronous programming patterns in Perldeepfountainconsulting
 
Going realtime with Socket.IO
Going realtime with Socket.IOGoing realtime with Socket.IO
Going realtime with Socket.IOChristian Joudrey
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Deepak Gupta
 
Dive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented ProgrammingDive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented ProgrammingSaumil Shah
 
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...Edureka!
 
Secrets of Google VRP by: Krzysztof Kotowicz, Google Security Team
Secrets of Google VRP by: Krzysztof Kotowicz, Google Security TeamSecrets of Google VRP by: Krzysztof Kotowicz, Google Security Team
Secrets of Google VRP by: Krzysztof Kotowicz, Google Security TeamOWASP Delhi
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express Jeetendra singh
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Gunith Devasurendra
 
Introduction to Apache Maven
Introduction to Apache MavenIntroduction to Apache Maven
Introduction to Apache MavenRajind Ruparathna
 

Was ist angesagt? (20)

Swagger AEM - An OpenAPI Specification for AEM
Swagger AEM - An OpenAPI Specification for AEMSwagger AEM - An OpenAPI Specification for AEM
Swagger AEM - An OpenAPI Specification for AEM
 
Introdução Vue JS
Introdução Vue JSIntrodução Vue JS
Introdução Vue JS
 
Practical Application of the API Security Top Ten: A Tester's Perspective
Practical Application of the API Security Top Ten: A Tester's PerspectivePractical Application of the API Security Top Ten: A Tester's Perspective
Practical Application of the API Security Top Ten: A Tester's Perspective
 
Single Sign-On for APEX apps (Important: latest version on edocr!)
Single Sign-On for APEX apps (Important: latest version on edocr!)Single Sign-On for APEX apps (Important: latest version on edocr!)
Single Sign-On for APEX apps (Important: latest version on edocr!)
 
RESTFul API Design and Documentation - an Introduction
RESTFul API Design and Documentation - an IntroductionRESTFul API Design and Documentation - an Introduction
RESTFul API Design and Documentation - an Introduction
 
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
Single Sign-On for APEX applications based on Kerberos (Important: latest ver...
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Asynchronous programming patterns in Perl
Asynchronous programming patterns in PerlAsynchronous programming patterns in Perl
Asynchronous programming patterns in Perl
 
Going realtime with Socket.IO
Going realtime with Socket.IOGoing realtime with Socket.IO
Going realtime with Socket.IO
 
AWS CodeBuild Demo
AWS CodeBuild DemoAWS CodeBuild Demo
AWS CodeBuild Demo
 
Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)Real time Communication with Signalr (Android Client)
Real time Communication with Signalr (Android Client)
 
Dive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented ProgrammingDive into ROP - a quick introduction to Return Oriented Programming
Dive into ROP - a quick introduction to Return Oriented Programming
 
What is Swagger?
What is Swagger?What is Swagger?
What is Swagger?
 
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
What is Django | Django Tutorial for Beginners | Python Django Training | Edu...
 
Secrets of Google VRP by: Krzysztof Kotowicz, Google Security Team
Secrets of Google VRP by: Krzysztof Kotowicz, Google Security TeamSecrets of Google VRP by: Krzysztof Kotowicz, Google Security Team
Secrets of Google VRP by: Krzysztof Kotowicz, Google Security Team
 
RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)
 
Bug bounty
Bug bountyBug bounty
Bug bounty
 
Introduction to Apache Maven
Introduction to Apache MavenIntroduction to Apache Maven
Introduction to Apache Maven
 
log4j.pdf
log4j.pdflog4j.pdf
log4j.pdf
 

Ähnlich wie Native Cloud-Native: Building Agile Microservices with the Micronaut Framework

Micronaut: Changing the Micro Future
Micronaut: Changing the Micro FutureMicronaut: Changing the Micro Future
Micronaut: Changing the Micro FutureZachary Klein
 
Getting Groovy with JHipster and Micronaut
Getting Groovy with JHipster and MicronautGetting Groovy with JHipster and Micronaut
Getting Groovy with JHipster and MicronautZachary Klein
 
2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdf2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdfDimitrisFinas1
 
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...Juarez Junior
 
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...Juarez Junior
 
20191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 220191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 2makker_nl
 
Machine to Machine Communication with Microsoft Azure IoT Edge & HiveMQ
Machine to Machine Communication with Microsoft Azure IoT Edge & HiveMQMachine to Machine Communication with Microsoft Azure IoT Edge & HiveMQ
Machine to Machine Communication with Microsoft Azure IoT Edge & HiveMQHiveMQ
 
SUGCON EU 2023 - Secure Composable SaaS.pptx
SUGCON EU 2023 - Secure Composable SaaS.pptxSUGCON EU 2023 - Secure Composable SaaS.pptx
SUGCON EU 2023 - Secure Composable SaaS.pptxVasiliy Fomichev
 
The Kubernetes WebLogic revival (part 2)
The Kubernetes WebLogic revival (part 2)The Kubernetes WebLogic revival (part 2)
The Kubernetes WebLogic revival (part 2)Simon Haslam
 
The ultimate Kubernetes Deployment Checklist - Infra to Microservices
The ultimate Kubernetes Deployment Checklist - Infra to MicroservicesThe ultimate Kubernetes Deployment Checklist - Infra to Microservices
The ultimate Kubernetes Deployment Checklist - Infra to MicroservicesPrakarsh -
 
Groovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with MicronautGroovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with MicronautZachary Klein
 
Container security within Cisco Container Platform
Container security within Cisco Container PlatformContainer security within Cisco Container Platform
Container security within Cisco Container PlatformSanjeev Rampal
 
Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...Hitachi, Ltd. OSS Solution Center.
 
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)Miguel Araújo
 
Tokyo Azure Meetup #4 - Build 2016 Overview
Tokyo Azure Meetup #4 -  Build 2016 OverviewTokyo Azure Meetup #4 -  Build 2016 Overview
Tokyo Azure Meetup #4 - Build 2016 OverviewTokyo Azure Meetup
 
Connect a chips to Azure
Connect a chips to AzureConnect a chips to Azure
Connect a chips to AzureMirco Vanini
 
Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Christian Posta
 
Revolutionizing IoT Testing - A Sneak Peek of HiveMQ Swarm
Revolutionizing IoT Testing - A Sneak Peek of HiveMQ SwarmRevolutionizing IoT Testing - A Sneak Peek of HiveMQ Swarm
Revolutionizing IoT Testing - A Sneak Peek of HiveMQ SwarmHiveMQ
 
Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...
Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...
Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...VMware Tanzu
 

Ähnlich wie Native Cloud-Native: Building Agile Microservices with the Micronaut Framework (20)

Micronaut: Changing the Micro Future
Micronaut: Changing the Micro FutureMicronaut: Changing the Micro Future
Micronaut: Changing the Micro Future
 
Getting Groovy with JHipster and Micronaut
Getting Groovy with JHipster and MicronautGetting Groovy with JHipster and Micronaut
Getting Groovy with JHipster and Micronaut
 
2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdf2307 - DevBCN - Otel 101_compressed.pdf
2307 - DevBCN - Otel 101_compressed.pdf
 
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...SevillaJUG - Unleash the power of your applications with Micronaut®  ,GraalVM...
SevillaJUG - Unleash the power of your applications with Micronaut® ,GraalVM...
 
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
GeeCon Prague 2023 - Unleash the power of your applications with Micronaut®, ...
 
20191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 220191201 kubernetes managed weblogic revival - part 2
20191201 kubernetes managed weblogic revival - part 2
 
Machine to Machine Communication with Microsoft Azure IoT Edge & HiveMQ
Machine to Machine Communication with Microsoft Azure IoT Edge & HiveMQMachine to Machine Communication with Microsoft Azure IoT Edge & HiveMQ
Machine to Machine Communication with Microsoft Azure IoT Edge & HiveMQ
 
SUGCON EU 2023 - Secure Composable SaaS.pptx
SUGCON EU 2023 - Secure Composable SaaS.pptxSUGCON EU 2023 - Secure Composable SaaS.pptx
SUGCON EU 2023 - Secure Composable SaaS.pptx
 
The Kubernetes WebLogic revival (part 2)
The Kubernetes WebLogic revival (part 2)The Kubernetes WebLogic revival (part 2)
The Kubernetes WebLogic revival (part 2)
 
The ultimate Kubernetes Deployment Checklist - Infra to Microservices
The ultimate Kubernetes Deployment Checklist - Infra to MicroservicesThe ultimate Kubernetes Deployment Checklist - Infra to Microservices
The ultimate Kubernetes Deployment Checklist - Infra to Microservices
 
Groovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with MicronautGroovy-Powered Microservices with Micronaut
Groovy-Powered Microservices with Micronaut
 
Securing k8s With Kubernetes Goat
Securing k8s With Kubernetes GoatSecuring k8s With Kubernetes Goat
Securing k8s With Kubernetes Goat
 
Container security within Cisco Container Platform
Container security within Cisco Container PlatformContainer security within Cisco Container Platform
Container security within Cisco Container Platform
 
Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...
 
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
MySQL Router - Explore The Secrets (MySQL Belgian Days 2024)
 
Tokyo Azure Meetup #4 - Build 2016 Overview
Tokyo Azure Meetup #4 -  Build 2016 OverviewTokyo Azure Meetup #4 -  Build 2016 Overview
Tokyo Azure Meetup #4 - Build 2016 Overview
 
Connect a chips to Azure
Connect a chips to AzureConnect a chips to Azure
Connect a chips to Azure
 
Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)Kubernetes Ingress to Service Mesh (and beyond!)
Kubernetes Ingress to Service Mesh (and beyond!)
 
Revolutionizing IoT Testing - A Sneak Peek of HiveMQ Swarm
Revolutionizing IoT Testing - A Sneak Peek of HiveMQ SwarmRevolutionizing IoT Testing - A Sneak Peek of HiveMQ Swarm
Revolutionizing IoT Testing - A Sneak Peek of HiveMQ Swarm
 
Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...
Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...
Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...
 

Mehr von Zachary Klein

Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Zachary Klein
 
Groovy for Java Devs
Groovy for Java DevsGroovy for Java Devs
Groovy for Java DevsZachary Klein
 
Micronaut For Single Page Apps
Micronaut For Single Page AppsMicronaut For Single Page Apps
Micronaut For Single Page AppsZachary Klein
 
Grails Launchpad - From Ground Zero to Orbit
Grails Launchpad - From Ground Zero to OrbitGrails Launchpad - From Ground Zero to Orbit
Grails Launchpad - From Ground Zero to OrbitZachary Klein
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsZachary Klein
 
Shields Up! Securing React Apps
Shields Up! Securing React AppsShields Up! Securing React Apps
Shields Up! Securing React AppsZachary Klein
 
Using React with Grails 3
Using React with Grails 3Using React with Grails 3
Using React with Grails 3Zachary Klein
 

Mehr von Zachary Klein (7)

Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!Grails 4: Upgrade your Game!
Grails 4: Upgrade your Game!
 
Groovy for Java Devs
Groovy for Java DevsGroovy for Java Devs
Groovy for Java Devs
 
Micronaut For Single Page Apps
Micronaut For Single Page AppsMicronaut For Single Page Apps
Micronaut For Single Page Apps
 
Grails Launchpad - From Ground Zero to Orbit
Grails Launchpad - From Ground Zero to OrbitGrails Launchpad - From Ground Zero to Orbit
Grails Launchpad - From Ground Zero to Orbit
 
Room with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.jsRoom with a Vue - Introduction to Vue.js
Room with a Vue - Introduction to Vue.js
 
Shields Up! Securing React Apps
Shields Up! Securing React AppsShields Up! Securing React Apps
Shields Up! Securing React Apps
 
Using React with Grails 3
Using React with Grails 3Using React with Grails 3
Using React with Grails 3
 

Kürzlich hochgeladen

Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Skynet Technologies
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxjbellis
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdfMuhammad Subhan
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxMasterG
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهMohamed Sweelam
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimaginedpanagenda
 

Kürzlich hochgeladen (20)

Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 

Native Cloud-Native: Building Agile Microservices with the Micronaut Framework

  • 1. © 2023 Object Computing, Inc. 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. Natively Cloud Native Building Agile Microservices with the Micronaut Framework™
  • 2. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. About Me Zachary Klein • Principal Software Engineer, Object Computing • Speaker/instructor • OSS Contributor to Grails & Micronaut frameworks @ZacharyAKlein kleinz@objectcomputing.com 2
  • 3. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. A modern, JVM-based, full-stack framework for building modular, easily testable microservice and serverless applications.
  • 4. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. History of Micronaut 4 • Micronaut announced in March 2018 • Framework open-sourced in May 2018, 1.0 release in October 2018 • Triggered a wave of excitement and innovation around the JVM - Quarkus, Spring Fu, etc • Micronaut 3.0 released in August 2021 - Micronaut 4.0 expected in Q2 • Micronaut continues to point the path forwards for server-side Java frameworks
  • 5. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Goals of Micronaut 5 • Designed With Microservices In Mind • Fast Startup Time - No reflection • Low Memory Footprint - No reflection • Small Executable Jar Files • AOT Compilation - Minimal runtime dependencies
  • 6. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Introduction To The Micronaut Framework • A framework for microservice & serverless apps • Leverages Ahead Of Time (AOT) compilation: • DI, AOP, code introspection • Reactive HTTP layer built on Netty: https://netty.io • Declarative HTTP Client • Collection of framework integrations and libraries • Build-tool agnostic (Maven & Gradle plugins provided) • Natively Cloud Native 6
  • 7. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Natively Cloud Native 7 • Service Discovery • Consul, Eureka, K8s… • Distributed Configuration • AWS, GCP, K8s, etc… • Client-Side Load Balancing • Serverless Computing • AWS Lambda, Azure, GCF, etc • Distributed Tracing • Token propagation… and more!
  • 8. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. What Can You Build With The Micronaut Framework? • Microservices • Serverless Applications • Message-Driven Applications with Kafka/RabbitMQ • CLI Applications • Android Applications • Anything with static void main(String..args) 8
  • 9. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Why Should I Care About Micronaut? • Java and Traditional Java frameworks were not designed with microservices & serverless in mind • JVM-based DI/AOP solutions make heavy use of reflection, runtime caches, and proxies • Not optimized for fast cold starts (severless) or low memory usage (microservices/containers) 9
  • 11. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Ahead of Time Compilation Generated Bytecode resides in the same package as your source code - your code is never altered by Micronaut
  • 12. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. GraalVM • "A high-performance JDK designed to accelerate Java application performance while consuming fewer resources” • Allows generation of light-weight native images • Minimal support for reflection • Micronaut is officially “Ready for Native Image” (tested by framework maintainers)
  • 13. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. GraalVM
  • 14. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. What is a Micronaut App? • Micronaut-Inject: Core DI, AOP • Micronaut-Runtime: ApplicationContext, configuration • HTTP-Server & Client: Reactive HTTP layer* • A suite of configurations & libraries providing advanced features (security, data access, messaging, etc) * Servlet containers are supported: https://micronaut- projects.github.io/micronaut-servlet/1.0.2/guide/ index.html 14
  • 15. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. • Micronaut-Inject: Core DI, AOP • Micronaut-Runtime: ApplicationContext, configuration • HTTP-Server & Client: Reactive HTTP layer* • A suite of configurations & libraries providing advanced features (security, data access, messaging, etc) Can be used in any JVM-based application! What is a Micronaut App? 15
  • 16. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. • Micronaut-Inject: Core DI, AOP • Micronaut-Runtime: ApplicationContext, configuration • HTTP-Server & Client: Reactive HTTP layer* • A suite of configurations & libraries providing advanced features (security, data access, messaging, etc) Included in a standard Micronaut Application (via CLI or Launch) What is a Micronaut App? 16 Plus your choice of build tool:
  • 17. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. • Micronaut-Inject: Core DI, AOP • Micronaut-Runtime: ApplicationContext, configuration • HTTP-Server & Client: Reactive HTTP layer* • A suite of configurations & libraries providing advanced features (security, data access, messaging, etc) Added to your project manually OR specified as “features” when creating the app via CLI or Launch What is a Micronaut App? 17
  • 18.
  • 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
  • 22. Copyright © 2023 by Object Computing, Inc. All rights reserved. Non-blocking HTTP Server
  • 23. Copyright © 2023 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 23
  • 24. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Reactive Controllers 24
  • 25. Copyright © 2023 by Object Computing, Inc. All rights reserved. Declarative HTTP Clients
  • 26. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Micronaut HTTP Client 26 ❖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
  • 27. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Micronaut HTTP Client 27
  • 28. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Micronaut HTTP Client 28 https://guides.micronaut.io/latest/tag-json-streams.html
  • 29. Copyright © 2023 by Object Computing, Inc. All rights reserved. Fast & Easy Testing
  • 30. © 2023 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) DEPENDENCY INJECTION
  • 31. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Dependency Injection ❖Micronaut Contains A Full Featured Dependency Injection (DI) Container ❖Uses jakarta.inject.* Annotations ❖JSR-330 Compliant ‣ Passes The Full TCK ❖Supports Constructor Injection As Well As Property And Field Injection ‣ insert heated debate here… 31
  • 32. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Ahead of Time Compilation Generated Bytecode resides in the same package as your source code - your code is never altered by Micronaut
  • 33. Copyright © 2023 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; // ... } 33
  • 34. Copyright © 2023 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 final MessageHelper messageHelper; public HelloController(MessageHelper messageHelper) { this.messageHelper = messageHelper; } // ... } RECOMMENDED! 34
  • 35. Copyright © 2023 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") 35
  • 36. Copyright © 2023 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... } 36
  • 37. Copyright © 2023 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; } } 37
  • 38. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. PreDestroy import javax.annotation.PreDestroy; import jakarta.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); } } 38
  • 39. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Application Configuration 39
  • 40. Copyright © 2023 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 40
  • 41. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Config Files 41
  • 42. Copyright © 2023 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; // ... } 42
  • 43. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Random Config Properties ❖Micronaut provides a set of randomly assigned properties that you can use within your config Property Value random.port An available random port number random.int Random int random.integer Random int random.long Random long random.float Random float random.shortuuid Random UUID of only 10 chars in length random.uuid Random UUID with dashes random.uuid2 Random UUID without dashes micronaut: application: name: myapplication instance: id: ${random.shortuuid} 43
  • 44. Copyright © 2023 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 44
  • 45. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Configuration Annotations ❖ io.micronaut.context.annotation.ConfigurationProperties ❖ io.micronaut.context.annotation.EachProperty ❖ io.micronaut.context.annotation.EachBean 45
  • 46. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Management Endpoints ❖Micronaut Provides A Set Of Management Endpoints ❖Requires A Dependency On The management Library ‣ "io.micronaut:micronaut-management" ❖Applications May Contribute Custom Endpoints As Beans 46
  • 47. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Management Endpoints 47
  • 48. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Management Endpoints /beans Returns information about the loaded bean definitions in the application /info Returns static information from the state of the application /health Returns information about the "health" of the application /metrics Return the application metrics. Requires the micrometer-core configuration on the classpath /refresh Refreshes bean state /routes Returns information about URIs available to be called for your application /stop Shuts down the application server (disabled by default) /loggers View and mutate logging configuration (e.g, POST to change log levels at runtime) /env Returns all currently resolved configuration properties 48
  • 49. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Service Discovery ❖Support for Consul, Kubernetes and Eureka ❖Configuration Support for Consul, Kubernetes, Vault, Spring Cloud Config Server and AWS ParameterStore ❖Native Client-Side Load-Balancing implementation ‘io.micronaut:micronaut-discovery-client' 49
  • 50. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Service Discovery micronaut: application: name: service-a consul: client: registration: enabled: true defaultZone: "${CONSUL_HOST:localhost}:${CONSUL_PORT:8500}" $ docker run -p 8500:8500 consul:1.2.4 src/main/resources/application.yml Start up Consul with Docker 50
  • 51. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Cacheable ❖Annotate classes and methods to specify caching behavior 51 @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. } }
  • 52. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Scheduled ❖Annotation for scheduling background tasks (can also be done programmatically via TaskScheduler) 52 @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()") }
  • 53. Copyright © 2023 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 53 @Retryable( attempts = “5", ​ delay = “2s" ) public Book findBook(String title) { //... @Retryable(attempts = "${book.retry.attempts:3}", ​ delay = "${book.retry.delay:1s}" )
  • 54. Copyright © 2023 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 54 @CircuitBreaker( attempts = “5", ​ delay = “2s” ​ reset = “30s” ) public Book findBook(String title) { //...
  • 55. Copyright © 2020 by Object Computing, Inc. (OCI). All rights reserved. Distributed Tracing Catalog Inventory Storefront 55
  • 56. Copyright © 2023 by Object Computing, Inc. All rights reserved. Distributed Tracing @NewSpan("productList") List<Product> productList() { //Get products } @ContinueSpan @Get(“/{id}”) HttpResponse<Product> show(Long id) { //Get product } @Get("/{productNumber}") HttpResponse<Integer> hits( @SpanTag("product") String product ) {} ❖ @NewSpan begins a new tracing segment at this method ❖ @ContinueSpan includes this method within the current span ❖ @SpanTag allows metadata to be added to the (new or current) span
  • 57. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Tracing UI 57
  • 58. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. OpenAPI Documentation 58 https://dzone.com/articles/a-quick-guide-to-microservices-with-the-micronaut micronaut: router: static-resources: swagger: paths: classpath:META-INF/swagger mapping: /swagger/** src/main/resources/application.yml
  • 59. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Data ❖Precomputes Queries at compilation time. ❖Solution for Static Queries ❖Uses Micronaut's reflection-free AOP. ❖Zero runtime overhead database access solution ❖Compilation time checking ❖Smaller stack traces 59
  • 60. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Data JPA ❖Support for Hibernate JPA ❖Precomputes JPA-QL queries ❖Provides a full ORM experience ❖Hibernate’s dialect support and features ❖Con: Hibernate relies on runtime reflection 60
  • 61. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Data JDBC ❖Support for native JDBC ❖Data Mapper vs ORM ❖Focused on DTOs ❖Light-weight and reflection/ proxy-free 61 JDBC
  • 62. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. JPA vs JDBC 62 JDBC Hibernate/JPA More efficient Higher memory requirements Few Dialects Greater dialect support DTO-oriented Entity to Table Optimized for reads Optimized for writes Better for serverless Not optimized for cold starts JDBC
  • 63. Copyright © 2023 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; // … } 63
  • 64. Copyright © 2023 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> {} 64
  • 65. Copyright © 2023 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); List<Car> findAllByMake(String make, String model); Integer countAllByMakeAndModel(String make, String model); } 65
  • 66. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Security 66 ❖Official security solution for Micronaut apps ❖Follows similar pattern to Spring Security (also implements JSR 250 annotations) ❖Makes use of HTTP filters ❖Supports basic auth, session auth, JWT & OAuth 2.0
  • 67. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Micronaut Kafka • https://micronaut-projects.github.io/micronaut-kafka/ • Provides declarative API for publishing/consuming events in Kafka • Reflection-free serialization/deserialization of events • Create messaging apps without a HTTP server 67
  • 68. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Producer 68
  • 69. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Consumer 69
  • 70. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Kafka Summit Presentation 70 https://www.confluent.io/events/kafka-summit- europe-2021/event-driven-applications-with-kafka- micronaut-and-aws-lambda/
  • 71. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud ❖Micronaut applications can be deployed as JAR files, containerized microservices; (optionally) as native images ❖Cloud-Provider specific features available in Micronaut Launch for: ‣ AWS Lambda ‣ Google Cloud Run / Functions / Compute / AppEngine ‣ Oracle Cloud Infrastructure ‣ Microsoft Azure 71
  • 72. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud 72 ❖Micronaut Guides includes step-by- step tutorials for deploying to major Cloud Platforms
  • 73. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud https://guides.micronaut.io/latest/micronaut-google-cloud- platform-cloud-run.html
  • 74. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud
  • 75. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud
  • 76. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud
  • 77. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud
  • 78. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud
  • 79. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud Create the Google Cloud project (use gcloud to authenticate and set the project ID)
  • 80. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud gcloud auth configure-docker - sets up your local Docker to point to Google Container Registry
  • 81. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud Add Docker image info to build.gradle: Push image to the Google Container Registry:
  • 82. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud Deploy Google Cloud Run
  • 83. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Deploying to the Cloud Invoke deployed service:
  • 84. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Summary ❖Micronaut is a full-featured framework designed for cloud- native architectures ❖Offers features that are useful in every sort of application ❖Micronaut is actively evolving - 4.0 due in Q2! ❖Micronaut community is growing and is super helpful - join the Gitter channel! https://app.gitter.im/#/ micronautfw 84
  • 85. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Resources ❖micronaut.io/launch ❖micronaut.io/docs ❖micronaut.io/guides ❖micronaut.io/blog ❖micronaut.io/foundation ❖https://app.gitter.im/#/micronautfw 85
  • 86. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Resources 86 https://micronautpodcast.com/
  • 87. Copyright © 2023 by Object Computing, Inc. (OCI). All rights reserved. Resources 87 https://groovypodcast.podbean.com/
  • 88. © 2023 Object Computing, Inc. 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. Thank You! Zachary Klein - kleinz@objectcomputing.com