Migration to Quarkus from Spring Boot PetClinic REST
In this presentation I will introduce Quarkus and also show which were the steps followed to migrate Spring PetClinic REST application to Quarkus using the standard libraries : resteasy, microprofile metrics, hibernate, openapi, .... GraalVM
Barcelona ) Software Engineer at Red Hat App. Modernisation and Migration team @vilojona [email protected] aytartana.wordpress.com github.com/jonathanvila
easy CDI, REST, … long startup times, eternal tests heavyweight too many things happen under the hood easy to develop applications fast lightweight GraalVM compatible QUARKUS ✅ FaaS compatible ( lambdas ) ✅ less money on public cloud
Spring Web ( REST ) Spring Security Spring documentation ( Swagger ) Spring actuators Spring micrometer Spring CDI Spring AOP Spring cache Hibernate Panache JaxRS Quarkus Security OpenAPI SmallRye Health Microprofile Metrics CDI Spec ( Arc ) --- Quarkus cache ( Caffeine ) QUARKUS
to work with Inserts, Updates…. * no equivalent to org.springframework.jdbc.core classes * we need to reimplement everything using AGROAL JMX * not supported by GraalVM definition
DI Annotations Supported @Autowired @Repository @Qualifier @Scope @Value @Component * doesn’t support an expression language @Configuration @Service @Bean
Supported Any interface of : Repository, CrudRepository, PagingAndSortingRepository, JpaRepository Derived Query Methods User defined Queries Not Supported Invocations to any method of QueryByExampleExecutor QueryDSL
( MTA 5.0 ) ◦ Opensource tool to help on applications migrations ▪ https://developers.redhat.com/products/mta/overview ▪ https://github.com/windup ◦ 26 rules , covering ▪ DI ▪ Integration ▪ Metrics ▪ JPA ▪ Security ▪ Web ▪ Shell ▪ …. Red Hat MTA (Migration Toolkit for Applications)
( MTA 5.0 ) ◦ Opensource tool to help on applications migrations ▪ https://developers.redhat.com/products/mta/overview ▪ https://github.com/windup ◦ 26 rules , covering ▪ DI ▪ Integration ▪ Metrics ▪ JPA ▪ Security ▪ Web ▪ Shell ▪ …. Red Hat MTA (Migration Toolkit for Applications)
( MTA 5.0 ) ◦ Opensource tool to help on applications migrations ▪ https://developers.redhat.com/products/mta/overview ▪ https://github.com/windup ◦ 26 rules , covering ▪ DI ▪ Integration ▪ Metrics ▪ JPA ▪ Security ▪ Web ▪ Shell ▪ …. Red Hat MTA (Migration Toolkit for Applications)
( MTA 5.0 ) ◦ Opensource tool to help on applications migrations ▪ https://developers.redhat.com/products/mta/overview ▪ https://github.com/windup ◦ 26 rules , covering ▪ DI ▪ Integration ▪ Metrics ▪ JPA ▪ Security ▪ Web ▪ Shell ▪ …. ◦ Plugin for Eclipse (Che), VSCode Red Hat MTA (Migration Toolkit for Applications)
( MTA 5.0 ) ◦ Opensource tool to help on applications migrations ▪ https://developers.redhat.com/products/mta/overview ▪ https://github.com/windup ◦ 26 rules , covering ▪ DI ▪ Integration ▪ Metrics ▪ JPA ▪ Security ▪ Web ▪ Shell ▪ …. Red Hat MTA (Migration Toolkit for Applications)
( MTA 5.0 ) ◦ Opensource tool to help on applications migrations ▪ https://developers.redhat.com/products/mta/overview ▪ https://github.com/windup ◦ 26 rules , covering ▪ DI ▪ Integration ▪ Metrics ▪ JPA ▪ Security ▪ Web ▪ Shell ▪ …. ◦ Plugin for Eclipse (Che), VSCode Red Hat MTA (Migration Toolkit for Applications)
savings by moving to Kubernetes-native Quarkus (link) Suomen Asiakastieto Oy chooses Quarkus for their microservices development (link) Vodafone Greece replaces Spring Boot with Quarkus (link) • “Quarkus offers by default (without trying to optimize it) is 50%-60% more lightweight (in JVM mode) that what Spring offers” • “30 to 40% better developer productivity vis-a-vis Spring Boot,” Public Clouds exp. -- Internal Labs --- Save up to : • 37 % on Cloud ( Quarkus JVM ) • 71 % on Cloud ( Quarkus + GraalVM )