-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model relations and tables to microservices, nodes and services #29
Comments
This is my first approach as model in Cassandra to our application. Obviously we will have to iterate over this version but I would like to know if I can start to code with this model.
The only doubt that I have is how I am going to join both tables. I have to compare the performance between make one query to Cassandra by each microservice or store in memory the result of two queries whose retrieve all rows from both tables. In function of the rows of both tables, I will make a decision. What do you think @juanpedromoreno @FPerezP @raulraja ? |
I don't have enough background on this, however, my initial perception would be that we shouldn't configure one |
Since nodes may be elastic on a MS I'm not sure we can rely on embedding them and keeping them up to date on an actual property. I'd prefer if Nodes were modeled in a different table in the same way you have modeled |
The right people to review this is @fedefernandez and @FPerezP |
At first glance, I would say that the information of these two tables could be defined in a single table. In Cassandra, joins are discouraged. On the other hand, the tables should be defined to satisfy queries, therefore we should define all queries we want to support and then model the tables. That makes sense? |
Agree with Fede, inserts in Cassandra are really fast, so even we can consider inserting in 2 different tables if we need to extract information in 2 different ways rather than having 2 tables to join them later. Related to having a UUID as a primary key, it's gonna depend on how we want to partition our data in the cluster. With the current definition, and considering we are gonna have more than one row per service/microservice, defining the UUID as PK will group all rows for the same UUID in the same node, which could make sense depending on the amount of rows per UUID we are gonna have. But as Fede mentioned, I recommend to define all queries we need to run against cassandra before, and based on those queries we can help you to define the tables ;) |
Makes sense @fedefernandez @FPerezP. Initially, I only would need define one query. The main goal of this query would be fetch all the microservices with their nodes and services. This information could be enought so far I thought two tables because the services are common between microservices, for example, cassandra, kafka, etc .... and for this reason, I made the decision to split the information in two tables and not duplicate the information. So with this approach, would are your thoughts @fedefernandez @FPerezP ? In am thinking in something like this
|
@eperinan sounds good. 2 more comments:
|
We need to create the model and relations in Cassandra to our model.
Basically, our approach is the next:
The text was updated successfully, but these errors were encountered: