DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Data
  4. Getting Started With Microservices: An Example Application
Content provided by MariaDB logo

Getting Started With Microservices: An Example Application

Learn how to achieve scalability, high availability, and resilience by creating a microservice architecture in an application with the Vaadin framework.

Alejandro Duarte user avatar by
Alejandro Duarte
CORE ·
Jan. 09, 18 · Tutorial
Like (9)
Save
Tweet
Share
22.48K Views

In my previous article about Microservices and User Interfaces, I discussed strategies for developing Vaadin-based applications in microservices architectures. In this article, I’ll show you an example application developed with a microservices architecture using Spring Boot and Vaadin Framework. The following is a screenshot of the application:

Image title

The left side is a completely separate and independent Vaadin application. The same is true for the right side of the page.

Downloading and Running the Application

Download the code from GitHub or from the command line with Git:

git clone https://github.com/alejandro-du/vaadin-microservices-demo.git

Compile the project using Maven:

cd vaadin-microservices-demo
mvn package

Start the discovery server:

cd vaadin-microservices/discovery-server
java -jar target/discovery-server-0.0.1-SNAPSHOT.jar

Start the configuration server:

cd vaadin-microservices/config-server
java -jar target/config-server-0.0.1-SNAPSHOT.jar

Run the microservices serving the actual functionality of the application:

cd vaadin-microservices/biz-application
java -Dserver.port=9601 -jar target/biz-application-0.0.1-SNAPSHOT.jar

cd vaadin-microservices/admin-application
java -Dserver.port=9401 -jar target/admin-application-0.0.1-SNAPSHOT.jar

cd vaadin-microservices/news-application
java -Dserver.port=9201 -jar target/news-application-0.0.1-SNAPSHOT.jar

cd vaadin-microservices/website-application
java -Dserver.port=9001 -jar target/website-application-0.0.1-SNAPSHOT.jar

And finally, start the proxy server:

cd vaadin-microservices-demo/proxy-server
java -jar target/proxy-server-0.0.1-SNAPSHOT.jar

Now you can request the proxy server at http://localhost:8080 and start using the application. Keep in mind that for simplicity, this demo doesn’t use any event bus communication and push features to update the tweets shown on the left. You have to reload the page to see the new data after using the CRUD web interface on the left of the page.

Scalability, High Availability, and Resilience

In order to scale parts of the system, you can simply start additional instances. For example, you can run more instances of  the admin-application (the one shown on the left side in the browser):

cd vaadin-microservices-demo/admin-application
java -Dserver.port=9401 -jar target/admin-application-0.0.1-SNAPSHOT.jar

Try stopping all instances of the biz-application and see what happens in the browser. The web applications should show error messages, when appropriate, without blocking the use of other parts of them. The news-application (the one on the right side in the browser) shows a predefined set of companies when the biz-application is not up.

You can find a more detailed tutorial at vaadin.com.


Comments

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: