Skip to content
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

MIDAZ reorganization structures #488

Closed
MartinezAvellan opened this issue Jan 24, 2025 · 6 comments
Closed

MIDAZ reorganization structures #488

MartinezAvellan opened this issue Jan 24, 2025 · 6 comments
Assignees
Labels
domain:transactions Responsible for transactions and operations refactor Refactor the code

Comments

@MartinezAvellan
Copy link
Member

MartinezAvellan commented Jan 24, 2025

Context

We will implement structural changes in Midaz with the goal of improving transaction performance, enabling the application to achieve higher TPS (Transactions per Second).

We currently work with two applications in Midaz, isolating domains and data access. This isolation has caused performance issues during transactions, as any communication related to accounts involves the transactions application communicating through gRPC requests.

How to do it?

Given the context above, we have decided to simplify the application and remove the gRPC connection, allowing the applications to communicate directly with the database and reduce processes during a transaction.

We have also decided to rename the app ledger to onboarding, as the application’s focus will be on managing CRUD operations within the Onboarding and Portfolio domains, while the transaction application will directly handle account balances.

Below is a brief overview of the change:

Now:

Image

New:

Image

@MartinezAvellan MartinezAvellan self-assigned this Jan 24, 2025
@MartinezAvellan MartinezAvellan added the refactor Refactor the code label Jan 24, 2025
@tonicospinelli
Copy link

tonicospinelli commented Jan 24, 2025

Could you share what kind of reorganization is needed?
I'm thinking of contributing to the project in my free time

@MartinezAvellan
Copy link
Member Author

MartinezAvellan commented Jan 25, 2025

I’m glad! Soon after this transition, we will resume with more tickets.

This restructuring has two types:
• an implementation to align with business rules,
• removal of code to improve the performance of the transactional layer.

This ticket is already being worked on with these changes.

@fredcamaral
Copy link
Member

fredcamaral commented Jan 25, 2025

Making it a bit more detailed for archive: this is a structural change that is needed to improve transactions' TPS. We are currently storing balance in a domain different from the transaction domain. This requires a gRPC comms between two different domains that could be better fine-tuned (the POST transaction). The idea is to make the transaction to be authorized within the same domain context to avoid the gRPC just to check the balance.

@gitfelipegomes
Copy link
Member

@tonicospinelli I’ve added the context of the changes to provide greater visibility. Feel free to reach out with any additional questions if needed.

@gitfelipegomes gitfelipegomes added the domain:transactions Responsible for transactions and operations label Jan 27, 2025
@fredcamaral
Copy link
Member

(syncing github issues with jira)

@gitfelipegomes
Copy link
Member

We decided not to proceed with the change mentioned above. Instead, we will implement a token cache solution in Auth to avoid low performance in call authorization, which was impacting transaction performance.

@gitfelipegomes gitfelipegomes closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:transactions Responsible for transactions and operations refactor Refactor the code
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants