Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Micronaut Deep Dive - Codeone 2019

Micronaut Deep Dive presentation by Graeme Rocher at Oracle CodeOne 2019

  • Be the first to comment

Micronaut Deep Dive - Codeone 2019

  1. 1. Micronaut Deep Dive 10 Things You Can Do with Micronaut
  2. 2. About Me • Graeme Rocher • Creator of Grails and Micronaut • Principal Engineer at Object Computing • 2018 Oracle Groundbreaker Award Winner • Java Champion
  3. 3. Agenda • Brief Introduction to Micronaut • 10 Things You Can Do with Micronaut • Demos, Demos and more demos • Summary • Q & A
  4. 4. Micronaut • A Microservices and Serverless Focused framework (hence the branding) • Also a Complete Application Framework for any type of Application • Dependency Injection, Aspect Oriented Programming (AOP), Configuration Management, Bean Introspection and more..
  5. 5. With Micronaut You Can Build • Microservices • Serverless Applications • Message-Driven Applications with Kafka/Rabbit • CLI Applications • Even Android Applications • Anything with static void main(String..args)
  6. 6. So What is Micronaut? Really? • An Application Framework for the Future • Reflection Free, Runtime Proxy Free, No Dynamic Classloading (in 1.1) • Ahead of Time (AOT) Compilation AOT APIs • ... oh and let's you build Microservices
  7. 7. ONEJust Use Dependency Injection
  8. 8. Dependency Injection • Reflection and Runtime Proxy Free • Supports Configuration Injection • Supports Aspect Oriented Programming (AOP) • Constructor, field, method injection all supported
  9. 9. TWOBuild CLI Applications
  10. 10. CLI Apps • Integration with PicoCLI > https://picocli.info/ • Can use any Micronaunt component, like the HTTP client. • Supports going native with GraalVM for ultra fast execution
  11. 11. THREEAs an HTTP Client
  12. 12. HTTP Client • Low level, flexible client • Also declaring compile time client • Just declare an interface and have it implemented for you! • Uses Micronaut's low overead AOP
  13. 13. FOURBuild Microservices
  14. 14. FIVEBuild a Native Image with Graal
  15. 15. Micronaut Startup and Memory Runtime Memory Startup JDK 11 75MB 1.1s JDK 13 75MB 900ms JDK 13 + CDS 75MB 400ms GraalVM Substrate 15MB 21ms
  16. 16. SIXGenerate Swagger / Open API
  17. 17. Swagger / OpenAPI Support • Compilation time computed • Adds no overhead to the runtime • Generated YAML can be imported into Swagger UI • Or use AutoREST to generate a JS client
  18. 18. SEVENMessage Driven Microservices with Kafka
  19. 19. Kafka Support • Write headless Microservices that just listen for Kafka messages • Great for real time processing • Send Kafka messages with @KafkaClient, implemented automatically for you.
  20. 20. EIGHTQuery with Micronaut Data JDBC
  21. 21. Micronaut Data • Precomputed SQL or JPA-QL queries • Uses Micronaut's zero overhead AOP • The JDBC implementation completely reflection free • Support for Oracle DB, MySQL, Postgres and SQL Server
  22. 22. NINESchedule Jobs
  23. 23. TENGather Metrics and Traces
  24. 24. Metrics and Tracing • Tracing: Support for Open Tracing, Zipkin and Jaeger • Metrics: Based on Micrometer with support for ever metric registry imaginable • Instrumentation for the whole framework (client and server requests)
  25. 25. Where to Learn More • Website: https://micronaut.io • Github: https://github.com/ micronaut-projects/micronaut-core • Comprehensive Guides: https:// guides.micronaut.io • Talk to us on Gitter: https://gitter.im/ micronautfw
  26. 26. Summary • Micronaut provides a wealth of features • Tackles a range of uses cases • General purpose for whatever your needs • Optimizes for reduced memory usage and startup time • Works well with Graal native image
  27. 27. Q & A

×