Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Launching the Micro Future: Micronaut with GraalVM in Practice @ JUG.CH Berne 2019

Launching the Micro Future: Micronaut with GraalVM in Practice @ JUG.CH Berne 2019

Micronaut is a modern, JVM-based full-stack framework for building modular, easily testable microservice and serverless applications. Developed by the creators of the Grails framework and with the support of many Spring developers, who have used their experience in these areas to develop a framework specifically focused on microservices.

Oracle’s newly developed GraalVM will change our view of microservices and cloud capabilities in the Java ecosystem and enable us to compete with native compilations. When Micronaut and GraalVM come together, both architectures can take full advantage of each other, resulting in amazingly efficient applications.

This workshop is an introduction to development with Micronaut on the GraalVM to give you everything you need to get started right away. The following topics will be covered in the workshop:

- Project creation with Micronaut-CLI
- Non-blocking, reactive HTTP Clients and Servers
- Scheduled Task Execution
- Configuration using files and environment variables
- Unit-Tests with and without a server
- Dependency Injection (at compile time)
- Robust interfaces (Retries, Circuit Breakers, Fallback)
- GraalVM Native Image
- Build using Docker without local GraalVM installation

Marcus Fihlon

December 03, 2019

More Decks by Marcus Fihlon

Other Decks in Programming


  1. @McPringle Disclaimer The following presentation has been approved for open

    audiences only. Hypersensitivity to occasional profanity requires covering ears. All logos, photos etc. used in this presentation are the property of their respective copyright owners and are used here for educational purposes only. Any and all marks used throughout this presentation are trademarks of their respective owners. The presenter is not acting on behalf of CSS Insurance, neither as an official agent nor representative. The views expressed are those solely of the presenter. Marcus Fihlon disclaims all responsibility for any loss or damage which any person may suffer from reliance on this information or any opinion, conclusion or recommendation in this presentation whether the loss or damage is caused by any fault or negligence on the part of presenter or otherwise.
  2. @McPringle About me • Scrum Master and Code Warrior •

    International Speaker and Community Leader • Lecturer and Author • Java and Kotlin Fan • A German living in Switzerland • Cycling Junkie
  3. @McPringle Main Focus Micronaut focuses on the following aspects of

    applications for the JVM and tries to optimize them: • Fast application start-up • Reduced runtime memory footprint • Minimal use of Java Reflection • Minimal use of Java proxies • Simple, fast application tests
  4. @McPringle Introduction to Micronaut The lecture of Graeme Rocher yesterday

    at 5 pm in the Apollo room was recorded and will be available on YouTube (hopefully) soon. I don't want to repeat this and therefore concentrate on the practical side with some examples.
  5. @McPringle Cross your fingers and you might see: • Project

    creation • Configuration • Reactive HTTP Clients • Non-blocking HTTP Servers • Scheduled Task Execution • Component Testing • Dependency Injection • Retries, Circuit Breakers, Fallback • GraalVM Native Image • Building and Running using Docker
  6. @McPringle Notes All notes of the live coding are available

    online: https://docs.google.com/document/d/19RPIdQKkOfEqojQRg-VjJMRIBbiIua1oP7_QqIKiQVM GitHub Repo with file listing demo: https://github.com/McPringle/jbcnconf-2019-listfiles GitHub Repo with beer demo: https://github.com/McPringle/jbcnconf-2019-beers
  7. @McPringle Code Warriors wanted! About you • You are frighteningly

    awesome at what you do. • You can perform quick and deadly tactical strikes, as well as feats of epic badassery. Sometimes both at the same time. • You would rather refactor existing, mostly working, ugly code instead of rewriting it from scratch. OK nobody would really rather do that, but you know it's the right and honorable thing to do most of the time. • You know where your towel is. About us • Biggest Basic Health Insurance Company • 2800 Employees • 300 IT Professionals • 24 Scrum Teams • 130 Software Developers (and hiring) • Flexible working times • Personal development support • 6 weeks paid vacation • Great benefits • Located in Lucerne, Switzerland Contact me: marcus.fi[email protected]