Skip to main content

Microservices & Vaadin

·309 words·2 mins
Vaadin
Alejandro Duarte
Author
Alejandro Duarte
Alejandro Duarte is a Software Engineer, published author, and award winner. He currently works for MariaDB plc as a Developer Relations Engineer. Starting his coding journey at 13 with BASIC on a rudimentary black screen, Alejandro quickly transitioned to C, C++, and Java during his academic years at the National University of Colombia. Relocating first to the UK and then to Finland, Alejandro deepened his involvement in the open-source community. He’s a recognized figure in Java circles, credited with articles and videos amassing millions of views, and presentations at international events.

During the last months, I’ve been researching and experimenting with microservices and Vaadin applications. My goal was to test Vaadin “compatibility” with some of the techniques associated with microservices. In short, Vaadin is as compatible with microservices as any other component-based web framework. Moreover, many of the challenges you would face when implementing microservices with Vaadin you would face with any JavaScript/HTML framework.

Microservices bring advantages such as independent development and deployment of services, but they come with a cost, mainly, an increase in complexity, brilliantly explained by Dave Kerr in his article The Death of Microservice Madness in 2018, a highly recommended read for everyone evaluating microservices. One of the key technical challenges with microservices which is related to web frameworks is how to create a “mash-up” UI that combines two or more web applications.

Ignoring the fact that microservices embrace technology independence to some extent (that is, teams can decide which technologies to use, including web frameworks), I was interested in how to render two independently deployed Vaadin applications into one single page in the browser. It turned out, again, the challenges I faced were almost the same I would have faced with any other web framework, especially, dealing with CSS and JavaScript collisions and HTTP session management.

I was able to develop an application using Spring Boot with Spring Cloud to show a web page with a CRUD UI on the left and a Twitter feed on the right, both developed with Vaadin:

Screenshot of an application running from several microservices

Running this application requires starting at least 7 processes, 3 orchestration services, 1 back-end service, and 3 web applications:

Terminals running microservices

You can find detailed information about my experiment in this series of articles:

  1. Getting Started with Microservices
  2. Microservices: Service Registration and Discovery
  3. Microservices: Externalized Configuration
  4. Microservices: Consuming stateless services from Vaadin UIs
  5. Microservices: Fault Tolerance
  6. Microservices: UI composition
  7. Microservices: High availability
  8. Microservices: Health monitoring

Related

New book about Vaadin Framework 8 coming out
·177 words·1 min
Vaadin News
As some of you may already know, I started writing a book about Vaadin 8 for Packt Publishing almost a year ago.
Enterprise-app for Vaadin
·314 words·2 mins
Vaadin News
Some years ago I published the Enterprise-app add-on for Vaadin. The most awarded feature was the CrudComponent class that allowed you could add a CRUD-like interface to any Hibernate entity by writing one line of code.
Vaadin video tutorials
·57 words·1 min
Vaadin News
Finally! After endless hours of rehearsal, screen recordings, audio recordings, film recordings, audio-image synchronization, editing work, and do it all over again, we have published the first 6 videos of the Vaadin Tutorial series.