vertx dao best-practices

345 views
Skip to first unread message

Christian T

unread,
Aug 5, 2014, 3:08:20 PM8/5/14
to ve...@googlegroups.com
Hi everyone,

i'm playing around with vertx at the moment to evaluate a possible architecture for an application in our company.
I like the idea of tying verticles together, that, connected through the eventbus, form our application. 
That enables very modular designs.

But I'm struggling a bit with the "persistence" - layer.
In a classical spring-application i would have my repositories which allow more or less direct interaction with the database and my service - layer which encapsulates business-logic and make calls to the repositories.

Whats the recommended approach with vertx?

  • Writing a "repository"-verticle, which accepts database-object-messages and persists them?
  • Having a separate address for each database-object-type?
  • Or writing a "repository-message"-class which has a action(CRUD) and a database-object (with type field in json) as payload, that enables my worker-verticle to dispatch it to the right method which actually does the action on the database?

A lot of questions.

General question is: Does anyone have experience or better, examples for writing larger vertx application with a layered architecture like this?

Regards,
Christian
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages