PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 24, 2022

[FIXED] When to use Vert.x cluster

 August 24, 2022     cluster-computing, module, vert.x     No comments   

Issue

I have a java (gradle) project with multiple modules. All of the modules run on the same server but I want them to be independent, i.e. module A should be started and stopped no matter if module B is running or stopped and vice versa. Each module is a vert.x verticle and the modules should be able to communicate with each other. I read that if the verticles run on the same machine, it's not a good practice to create a clustered vertx instance, but if I don't cluster them, then I got different instances and therefore different eventbusses.

What would you recommend?

(1) Cluster the verticles on the same machine

(2) let the verticles communicate via a router (is this a bad practice?)

(3) Restructure the project in some way


Solution

You can deploy verticles to get a deployment id and also undeploy them using the same id. That means they are already independent.

The simplest way would be to have them running in the same process communicating via the event bus.

Options 1 & 2 that you listed would introduce unnecessary latency and make your application perform worse.



Answered By - Selim
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing