SlideShare a Scribd company logo
A new way to build microservices
Luram Archanjo
Who am I?
● Software Engineer at Sensedia
● MBA in java projects
● Java and microservice enthusiastic
Agenda
● Microservices
● Java & Frameworks
● Ahead of Time (AOT) Compilation
● GraalVM
● Micronaut
● Questions
Moving to Microservices
Feature A
Feature B
Feature C
Monolith
Microservice Microservice
Microservices
Microservice
Scalability
Feature A
Monolith Scalability
Microservice Microservice
Microservices Scalability
Microservice
Microservice
Microservice
Microservice
Microservice
Microservice
Microservice
Microservice
Feature B Feature C
Feature A Feature B Feature C
Feature A Feature B Feature C
Our resources are finite!
How to use less resources
using Java language?
Our frameworks are design to
low memory footprint?
No, because we’ve tried to
adapt existing legacy
technologies for
Microservices
What do Spring and Jakarta EE undertaking? What are the results about it?
Spring is an amazing technical achievement and does so many things, but does them at Runtime.
● Reads the byte code of every bean it finds.
● Synthesizes new annotations for each annotation on each bean method, constructor, field etc.
to support Annotation metadata.
● Builds Reflective Metadata for each bean for every method, constructor, field etc.
The rise of Java
Microframeworks
Microframeworks
A microframework is a term used to refer to minimalistic web application frameworks:
● Without authentication and authorization
● Without database abstraction via an object-relational mapping.
● Without input validation and input sanitation.
Less modules, functions and
dependencies are not enough!
Ahead of Time (AOT) Compilation
Ahead-of-time compilation (AOT compilation) is the act of compiling a higher-level programming
language, or an intermediate representation such as Java bytecode, into a native machine code so
that the resulting binary file can execute natively.
Web Android
Java
Google Dagger 2
?
uses Ahead of Time (AOT)
Compilation
What are the results of using
Ahead of Time (AOT)
Compilation?
The results of using Ahead of Time (AOT) Compilation
Data from Micronaut website:
● Startup time around a second.
● All Dependency Injection, AOP and Proxy generation happens
at compile time.
● Can be run with as little as 10mb Max Heap.
I don't believe, show me!
Is it possible to improve
more?
Yes, with
GraalVM
GraalVM is an universal virtual machine:
● Runs Java, Scala, Kotlin etc.
● Native image compiled with ahead-of-time improves the startup time and reduce the memory
footprint of JVM-based applications.
GraalVM works well when:
● Little or no runtime reflection is used.
○ Use third party libraries selectively.
● Limited or no dynamic classloading.
Demo
+
What else does Micronaut
do?
Blocking or Non-Blocking HTTP server built on Netty
With a smooth learning curve, Micronaut HTTP server makes it as easy as possible to expose APIs
that can be consumed by HTTP clients.
Blocking
@Controller("/hello")
public class HelloController {
@Get
public String hello() {
return "Hello Micronaut";
}
}
Non-Blocking (RxJava + Netty)
@Controller("/hello")
public class HelloController {
@Get
public Single<String> hello() {
return Single.just("Hello Micronaut");
}
}
Dependency Injection and Inversion of Control (IoC)
This is a similar approach taken by Spring and Google Dagger, but without reflection and proxies.
All the injections are done in compile time.
@Singleton
public class HelloService {
public String hello() {
return "Hello Micronaut";
}
}
@Controller("/hello")
public class HelloController {
@Inject
private HelloService helloService;
@Get
public String hello() {
return helloService.hello();
}
}
Cloud Native Features
Distributed Tracing
When operating Microservices in production it can be challenging to troubleshoot interactions
between Microservices in a distributed architecture. Micronaut features integration with both Zipkin
and Jaeger (via the Open Tracing API).
@Controller("/hello")
public class HelloController {
@Inject
private HelloService helloService;
@Get("/{name}")
@NewSpan("hello")
public String hello(@SpanTag String name) {
return helloService.hello();
}
}
Serverless Functions
Serverless architectures where as a developer you deploy functions that are fully managed by the
Cloud environment and are executed in ephemeral processes require a unique approach.
@FunctionBean("hello-function")
public class HelloFunction implements Supplier<String> {
@Override
public String hello() {
return "Hello world";
}
}
@FunctionClient
public interface HelloFunctionClient {
String hello();
}
Summary
2º Place
1º Place
3º PlaceAhead of Time (AOT)
Compilation
● Low memory
footprint
● Fast Startup
● IoC
● Productivity with
annotations
● Blocking or Non-
Blocking HTTP
server built on
Netty
Cloud Native Features
● Service Discovery
● Distributed
Tracing
● Serveless
● Distributed
Configuration
Thanks a million!
Questions?
/larchanjo
/luram-archanjo

More Related Content

What's hot

Battle of the frameworks : Quarkus vs SpringBoot
Battle of the frameworks : Quarkus vs SpringBootBattle of the frameworks : Quarkus vs SpringBoot
Battle of the frameworks : Quarkus vs SpringBoot
Christos Sotiriou
 
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
Zachary Klein
 
Azure DevOps
Azure DevOpsAzure DevOps
Azure DevOps
Felipe Artur Feltes
 
Building .NET Microservices
Building .NET MicroservicesBuilding .NET Microservices
Building .NET Microservices
VMware Tanzu
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
Araf Karsh Hamid
 
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
Paulo Clavijo
 
Dart presentation
Dart presentationDart presentation
Dart presentation
Lucas Leal
 
Hexagonal architecture - message-oriented software design
Hexagonal architecture  - message-oriented software designHexagonal architecture  - message-oriented software design
Hexagonal architecture - message-oriented software design
Matthias Noback
 
Microsoft DevOps Solution - DevOps
Microsoft DevOps Solution - DevOps  Microsoft DevOps Solution - DevOps
Microsoft DevOps Solution - DevOps
Chetan Gordhan
 
DevOps & SRE at Google Scale
DevOps & SRE at Google ScaleDevOps & SRE at Google Scale
DevOps & SRE at Google Scale
Kaushik Bhattacharya
 
Quarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniquesQuarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniques
Red Hat Developers
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
CloudOps2005
 
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Edureka!
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
Arvind Kumar G.S
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
Dhrubaji Mandal ♛
 
Introduction to Prometheus
Introduction to PrometheusIntroduction to Prometheus
Introduction to Prometheus
Julien Pivotto
 
Prometheus - Intro, CNCF, TSDB,PromQL,Grafana
Prometheus - Intro, CNCF, TSDB,PromQL,GrafanaPrometheus - Intro, CNCF, TSDB,PromQL,Grafana
Prometheus - Intro, CNCF, TSDB,PromQL,Grafana
Sridhar Kumar N
 
Treinamento Docker Básico
Treinamento Docker BásicoTreinamento Docker Básico
Treinamento Docker Básico
André Justi
 
Grafana 7.0
Grafana 7.0Grafana 7.0
Grafana 7.0
Juraj Hantak
 
Terraform 0.12 Deep Dive: HCL 2.0 for Infrastructure as Code, Remote Plan & A...
Terraform 0.12 Deep Dive: HCL 2.0 for Infrastructure as Code, Remote Plan & A...Terraform 0.12 Deep Dive: HCL 2.0 for Infrastructure as Code, Remote Plan & A...
Terraform 0.12 Deep Dive: HCL 2.0 for Infrastructure as Code, Remote Plan & A...
Mitchell Pronschinske
 

What's hot (20)

Battle of the frameworks : Quarkus vs SpringBoot
Battle of the frameworks : Quarkus vs SpringBootBattle of the frameworks : Quarkus vs SpringBoot
Battle of the frameworks : Quarkus vs SpringBoot
 
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
 
Azure DevOps
Azure DevOpsAzure DevOps
Azure DevOps
 
Building .NET Microservices
Building .NET MicroservicesBuilding .NET Microservices
Building .NET Microservices
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
 
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
 
Dart presentation
Dart presentationDart presentation
Dart presentation
 
Hexagonal architecture - message-oriented software design
Hexagonal architecture  - message-oriented software designHexagonal architecture  - message-oriented software design
Hexagonal architecture - message-oriented software design
 
Microsoft DevOps Solution - DevOps
Microsoft DevOps Solution - DevOps  Microsoft DevOps Solution - DevOps
Microsoft DevOps Solution - DevOps
 
DevOps & SRE at Google Scale
DevOps & SRE at Google ScaleDevOps & SRE at Google Scale
DevOps & SRE at Google Scale
 
Quarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniquesQuarkus tips, tricks, and techniques
Quarkus tips, tricks, and techniques
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
 
Introduction to Prometheus
Introduction to PrometheusIntroduction to Prometheus
Introduction to Prometheus
 
Prometheus - Intro, CNCF, TSDB,PromQL,Grafana
Prometheus - Intro, CNCF, TSDB,PromQL,GrafanaPrometheus - Intro, CNCF, TSDB,PromQL,Grafana
Prometheus - Intro, CNCF, TSDB,PromQL,Grafana
 
Treinamento Docker Básico
Treinamento Docker BásicoTreinamento Docker Básico
Treinamento Docker Básico
 
Grafana 7.0
Grafana 7.0Grafana 7.0
Grafana 7.0
 
Terraform 0.12 Deep Dive: HCL 2.0 for Infrastructure as Code, Remote Plan & A...
Terraform 0.12 Deep Dive: HCL 2.0 for Infrastructure as Code, Remote Plan & A...Terraform 0.12 Deep Dive: HCL 2.0 for Infrastructure as Code, Remote Plan & A...
Terraform 0.12 Deep Dive: HCL 2.0 for Infrastructure as Code, Remote Plan & A...
 

Similar to Micronaut: A new way to build microservices

Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
VMware Tanzu
 
Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018
graemerocher
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2
JooinK
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
VMware Tanzu
 
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Building Microservices with Micronaut:  A Full-Stack JVM-Based FrameworkBuilding Microservices with Micronaut:  A Full-Stack JVM-Based Framework
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Michael Redlich
 
GraalVM Native and Spring Boot 3.0
GraalVM Native and Spring Boot 3.0GraalVM Native and Spring Boot 3.0
GraalVM Native and Spring Boot 3.0
MoritzHalbritter
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Jakarta_EE
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
The Eclipse Foundation
 
Reactive Amsterdam - Maxim Burgerhout - Quarkus Intro
Reactive Amsterdam - Maxim Burgerhout - Quarkus IntroReactive Amsterdam - Maxim Burgerhout - Quarkus Intro
Reactive Amsterdam - Maxim Burgerhout - Quarkus Intro
Fabio Tiriticco
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present futurelolopetit
 
TechEvent Graal(VM) Performance Interoperability
TechEvent Graal(VM) Performance InteroperabilityTechEvent Graal(VM) Performance Interoperability
TechEvent Graal(VM) Performance Interoperability
Trivadis
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On
Ram G Suri
 
1.INTRODUCTION TO JAVA_2022 MB.ppt .
1.INTRODUCTION TO JAVA_2022 MB.ppt      .1.INTRODUCTION TO JAVA_2022 MB.ppt      .
1.INTRODUCTION TO JAVA_2022 MB.ppt .
happycocoman
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
VMware Tanzu
 
Peru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVMPeru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVM
Domingo Suarez Torres
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
kloia
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Tools
barciszewski
 
Introduction to Performance APIs
Introduction to Performance APIsIntroduction to Performance APIs
Introduction to Performance APIs
Shogo Sensui
 
Red Hat Java Update and Quarkus Introduction
Red Hat Java Update and Quarkus IntroductionRed Hat Java Update and Quarkus Introduction
Red Hat Java Update and Quarkus Introduction
John Archer
 

Similar to Micronaut: A new way to build microservices (20)

Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018Introduction to Micronaut at Oracle CodeOne 2018
Introduction to Micronaut at Oracle CodeOne 2018
 
Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2Javascript as a target language - GWT KickOff - Part 2/2
Javascript as a target language - GWT KickOff - Part 2/2
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Building Microservices with Micronaut:  A Full-Stack JVM-Based FrameworkBuilding Microservices with Micronaut:  A Full-Stack JVM-Based Framework
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
 
GraalVM Native and Spring Boot 3.0
GraalVM Native and Spring Boot 3.0GraalVM Native and Spring Boot 3.0
GraalVM Native and Spring Boot 3.0
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
 
Reactive Amsterdam - Maxim Burgerhout - Quarkus Intro
Reactive Amsterdam - Maxim Burgerhout - Quarkus IntroReactive Amsterdam - Maxim Burgerhout - Quarkus Intro
Reactive Amsterdam - Maxim Burgerhout - Quarkus Intro
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
 
TechEvent Graal(VM) Performance Interoperability
TechEvent Graal(VM) Performance InteroperabilityTechEvent Graal(VM) Performance Interoperability
TechEvent Graal(VM) Performance Interoperability
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On
 
1.INTRODUCTION TO JAVA_2022 MB.ppt .
1.INTRODUCTION TO JAVA_2022 MB.ppt      .1.INTRODUCTION TO JAVA_2022 MB.ppt      .
1.INTRODUCTION TO JAVA_2022 MB.ppt .
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
 
Peru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVMPeru JUG Micronaut & GraalVM
Peru JUG Micronaut & GraalVM
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Tools
 
Introduction to Performance APIs
Introduction to Performance APIsIntroduction to Performance APIs
Introduction to Performance APIs
 
Red Hat Java Update and Quarkus Introduction
Red Hat Java Update and Quarkus IntroductionRed Hat Java Update and Quarkus Introduction
Red Hat Java Update and Quarkus Introduction
 
Gwt Presentation1
Gwt Presentation1Gwt Presentation1
Gwt Presentation1
 

Recently uploaded

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 

Recently uploaded (20)

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 

Micronaut: A new way to build microservices

  • 1. A new way to build microservices Luram Archanjo
  • 2. Who am I? ● Software Engineer at Sensedia ● MBA in java projects ● Java and microservice enthusiastic
  • 3. Agenda ● Microservices ● Java & Frameworks ● Ahead of Time (AOT) Compilation ● GraalVM ● Micronaut ● Questions
  • 4. Moving to Microservices Feature A Feature B Feature C Monolith Microservice Microservice Microservices Microservice
  • 5. Scalability Feature A Monolith Scalability Microservice Microservice Microservices Scalability Microservice Microservice Microservice Microservice Microservice Microservice Microservice Microservice Feature B Feature C Feature A Feature B Feature C Feature A Feature B Feature C
  • 7. How to use less resources using Java language?
  • 8. Our frameworks are design to low memory footprint?
  • 9. No, because we’ve tried to adapt existing legacy technologies for Microservices
  • 10. What do Spring and Jakarta EE undertaking? What are the results about it? Spring is an amazing technical achievement and does so many things, but does them at Runtime. ● Reads the byte code of every bean it finds. ● Synthesizes new annotations for each annotation on each bean method, constructor, field etc. to support Annotation metadata. ● Builds Reflective Metadata for each bean for every method, constructor, field etc.
  • 11. The rise of Java Microframeworks
  • 12. Microframeworks A microframework is a term used to refer to minimalistic web application frameworks: ● Without authentication and authorization ● Without database abstraction via an object-relational mapping. ● Without input validation and input sanitation.
  • 13. Less modules, functions and dependencies are not enough!
  • 14. Ahead of Time (AOT) Compilation Ahead-of-time compilation (AOT compilation) is the act of compiling a higher-level programming language, or an intermediate representation such as Java bytecode, into a native machine code so that the resulting binary file can execute natively. Web Android Java Google Dagger 2 ?
  • 15. uses Ahead of Time (AOT) Compilation
  • 16. What are the results of using Ahead of Time (AOT) Compilation?
  • 17. The results of using Ahead of Time (AOT) Compilation Data from Micronaut website: ● Startup time around a second. ● All Dependency Injection, AOP and Proxy generation happens at compile time. ● Can be run with as little as 10mb Max Heap.
  • 18. I don't believe, show me!
  • 19. Is it possible to improve more?
  • 21. GraalVM GraalVM is an universal virtual machine: ● Runs Java, Scala, Kotlin etc. ● Native image compiled with ahead-of-time improves the startup time and reduce the memory footprint of JVM-based applications. GraalVM works well when: ● Little or no runtime reflection is used. ○ Use third party libraries selectively. ● Limited or no dynamic classloading.
  • 23. What else does Micronaut do?
  • 24. Blocking or Non-Blocking HTTP server built on Netty With a smooth learning curve, Micronaut HTTP server makes it as easy as possible to expose APIs that can be consumed by HTTP clients. Blocking @Controller("/hello") public class HelloController { @Get public String hello() { return "Hello Micronaut"; } } Non-Blocking (RxJava + Netty) @Controller("/hello") public class HelloController { @Get public Single<String> hello() { return Single.just("Hello Micronaut"); } }
  • 25. Dependency Injection and Inversion of Control (IoC) This is a similar approach taken by Spring and Google Dagger, but without reflection and proxies. All the injections are done in compile time. @Singleton public class HelloService { public String hello() { return "Hello Micronaut"; } } @Controller("/hello") public class HelloController { @Inject private HelloService helloService; @Get public String hello() { return helloService.hello(); } }
  • 27. Distributed Tracing When operating Microservices in production it can be challenging to troubleshoot interactions between Microservices in a distributed architecture. Micronaut features integration with both Zipkin and Jaeger (via the Open Tracing API). @Controller("/hello") public class HelloController { @Inject private HelloService helloService; @Get("/{name}") @NewSpan("hello") public String hello(@SpanTag String name) { return helloService.hello(); } }
  • 28. Serverless Functions Serverless architectures where as a developer you deploy functions that are fully managed by the Cloud environment and are executed in ephemeral processes require a unique approach. @FunctionBean("hello-function") public class HelloFunction implements Supplier<String> { @Override public String hello() { return "Hello world"; } } @FunctionClient public interface HelloFunctionClient { String hello(); }
  • 29. Summary 2º Place 1º Place 3º PlaceAhead of Time (AOT) Compilation ● Low memory footprint ● Fast Startup ● IoC ● Productivity with annotations ● Blocking or Non- Blocking HTTP server built on Netty Cloud Native Features ● Service Discovery ● Distributed Tracing ● Serveless ● Distributed Configuration

Editor's Notes

  1. A praticamente 5 anos a arquitetura de microservices vem sendo adotada por inúmeros fatores como: 1 - Manutenibilidade 2 - Heterogeneidade Tecnologica 3 - Paralelismo de times 4 - Escalabilidade Em outros fatores. Eu acabei de citar um termo que é uns dos principais fatores da adoção da arquitetura de microservices que é… próximo slide
  2. Estamos gerenciando melhor nossos recursos, pois conseguimos escalar separadamente módulo\microservice que necessite.
  3. Nossos recursos são finitos..e continuamos sendo cobrados por melhoria de utilização de recursos
  4. E como melhorar a utilização de recursos utilizado a liguagem java? Java 9 > Modules Java 10 > Java 11 >
  5. Antes de falar da linguagem, será que nossos frameworks foram desenhados para baixo consumo de memória?