Posts

Showing posts with the label native

Spring-Boot Native Image

Image
Spring Boot is the most popular java stack nowadays. New languages like Go and Rust are capable of creating a single binary, self-contained with all deps to run the application. This is great for deployment simplicity but also easier to maintain. As time pass we want to have fast bootup times and do more with less. The native solutions are fast since they are statically compiled for a target platform or OS(in the case of UniKernels). Java was designed to be better as time pass(Runtime) and optimizations kick in. However thats not ideal for Serverless applications. GraalVM changes that since allowing us to compile JVM applications(Java, Scala, Kotlin) to native applications. Today I want to share a simple Video + POC using a new project called Spring Boot Native which allows us to create native images to spring boot apps.  Native images have some challenges like Type Erause for C++ and Reflections in Java. So Let's get started!

Microservices Contracts: REST vs Native

Image
This is not a new discussion is very old. I remember back into the SOA days - always was something like REST VS SOAP. SOAP is dead and REST own but now is something different. To be clear - I think REST is the only thing you should use when we talk about External consumers. Like and external API thats would be accessed by a mobile or website. There are other scenarios like INTERNAL consumers. For this case you can consider using a NATIVE driver instead of REST. So whats is a NATIVE driver? Is just code into a language you are using - so could be Java, Scala, Clojure, Ruby, Go, whatever it does not matter. This idea is similar to the JDBC java driver you have java code to access the database.  So thats the real question when i have internal consumers for my microservices, should they talk to each other tought REST or native driver? It really depends because both approach have PROS and CONS like everything in life - there are trade offs - but i consider REST in general a ...