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
Partner Zones AWS Cloud
by AWS Developer Relations
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
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. Databases
  4. How to Build and Deploy Fat or Thin Vert.x Microservice Applications to the Cloud

How to Build and Deploy Fat or Thin Vert.x Microservice Applications to the Cloud

This tutorial for microservices development shows how to build a Vert.x application and deploy it to the cloud.

Tetiana Fydorenchyk user avatar by
Tetiana Fydorenchyk
·
Sep. 11, 18 · Tutorial
Like (5)
Save
Tweet
Share
5.38K Views

Join the DZone community and get the full member experience.

Join For Free

Eclipse Vert.x started to promote microservices even before this buzzword appeared and continues to showcase the benefits of such an approach. This toolkit is designed for building reactive applications using any language that runs on the JVM, including Java, Groovy, Ceylon, Ruby, JavaScript, Kotlin, and Scala.

Basically, a Vert.x application is a plain JAR file, so the application can be packaged in two different ways:

  • Fat: a self-contained single JAR file with all the necessary dependencies inside. Usually, the archive is big, as it contains everything, including the application server runtime.
  • Thin: a JAR file that doesn’t contain runtime and dependencies by default but automatically downloads them during the first launch. It is considered the most widely-used approach nowadays, as it was the only one well-standardized for many years and provides a set of advantages like a faster and more efficient process of building and packaging.

In this article, we will cover build and deploy processes for Vert.x Java applications using both approaches, Fat and Thin. The application will be packaged in the required format automatically with the help of Builder add-ons prepared by Jelastic. The topology will consist of a Maven build node and JVM containers for running microservices.build web application

Vert.x Fat JAR Builder Installation

To get started, log into a Jelastic dashboard, find the Vert.x Fat Jar Builder in the Marketplace and click Install.microservice tutorialOr, you can import a Vert.x Fat manifest from GitHub with this link:

https://github.com/jelastic-jps/vertx/blob/master/microservice-fat-jar/manifest.jps

To do that, press Import on the Dashboard then paste the link in the URL tab and confirm installation by clicking the Import button in the opened window.ready packIf required, change the installation settings such as environment name or Git repository link to a custom Vert.x Fat project. Then press Install.maven project in eclipseWhen the installation and building of the project are completed, a corresponding message appears. You still need to wait a few minutes for the deploy to be finished (feel free to track the process in the Tasks panel). In the default implementation, it is done under the api/greeting context.maven javaAfterward, you can make sure that the application is up and running by pressing the Open in browser button.vertx java

Vert.x Thin Jar Builder Installation

Find the Vert.x Thin Jar Builder in the Marketplace and click Install.java maven tutorialOr import the Vert.x Thin manifest from GitHub:

https://github.com/jelastic-jps/vertx/blob/master/microservice-thin-jar/manifest.jpsbuild jarIf required, change installation settings such as environment name or Git repository link to a custom Vert.x Thin project. Then press Install. thin client issuesWait a few minutes for the deploy to be finished, tracking the process in the Tasks panel. Then click Open in browser to see your application under the stated context (by default, api/greeting).maven jar pluginthin jar

Running Multiple Microservices With Vert.x Projects

You can use our recently created Maven node to build extra projects and deploy them to different environments to get a set of distributed microservices.microservice application

First of all, create a separate environment with Java Engine.java vmThen click Add Project next to the Maven node in the initial environment.maven jar pluginSpecify the name and link to the project, and choose the environment where it should be deployed. Additionally, you can activate automatic updates. Then confirm pressing Add + Deploy.jvm programmingMore details on how to build and deploy Java applications can be found in the Maven node documentation.

In this way, you can easily build and deploy your Vert.x-based applications. Register and try out the automated JAR packaging with the Jelastic Builder add-on for your custom projects to feel the benefits of microservices running in the cloud.

application Vert.x microservice Build (game engine) Cloud

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Testing Level Dynamics: Achieving Confidence From Testing
  • Introduction To OpenSSH
  • 19 Most Common OpenSSL Commands for 2023
  • Create a CLI Chatbot With the ChatGPT API and Node.js

Comments

Partner Resources

X

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: