I am in the process of learning Vert.x.
So I want to create a dashboard app for GPS tracker. I intend to create 3 verticles:
- 1 for getting data from the device and serializing it. And then this vertices will publish it to others via the event bus
- 1 for reading and writing the database. This vertices will be used as a normal Web API for web client, too.
- 1 for giving real time update (using websocket) to the web client.
I want only 1 verticle have access to the database. But the other two sometimes need access to the database (authorization mostly). And I thought, I just request it, using the request-reply pattern, from this 1 verticle with database access.
But isn't req-rep pattern a blocking operation?? Does it affecting performance in long term?? Or should I just let every verticles have acccess to database??