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

No information while transaction is being executed at client-side #34

Open
maestre3d opened this issue Jul 9, 2020 · 4 comments
Open
Assignees
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@maestre3d
Copy link
Owner

Describe the bug
Whenever we start a distributed transaction (SAGAs mostly), the client is not able to see what is the current state in real-time and even worst, if something fails, there is no way to know what happened.

To Reproduce
Steps to reproduce the behavior:

  1. Make a POST HTTP request or a gRPC action call to any endpoint with dependencies (almost all).
  2. Wait for response, you shall see the created entity with state set to PENDING.
  3. You need to execute a short-polling retry policy if you want "real-time" state. Aside of that technique, there's no actual way to know the entity's state explicitly (if failed, then be able to see what happened)

Expected behavior
We must have a way to see entity's state in real-time while a distributed transaction is being executed along with following error information if a failing scenario happened.

Additional context
No.

@maestre3d maestre3d added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Jul 9, 2020
@maestre3d maestre3d self-assigned this Jul 9, 2020
@maestre3d
Copy link
Owner Author

We could take advantage of Redis and Apache Kafka capabilities to design and build a nice distributed environment for declarative transaction execution,

@maestre3d
Copy link
Owner Author

maestre3d commented Jul 21, 2020

Now considering using synchronous inter-service communication when a transaction is needed using resiliency patterns such as rate-limit for received requests and circuit breaker (w/ Netflix Hystrix) and a retry strategy for external calls (outbound) to avoid cascading failures and many more problems.

We would be still using asynchronous communication for side-effect distributed propagation.

This is due the complex implementation (e.g. dist. tracing and metrics for each event bus) and maintenance of each distributed transaction using pure events.

@maestre3d
Copy link
Owner Author

In addition, we could take advantage of event sourcing and CQRS when required to avoid these issues.
More details here.

@maestre3d
Copy link
Owner Author

A well-tested approach is a Self-Contained service, more information about it here.

Thus, we will have two options and this kind of approach could be used whenever an operation must be tracked by the client.

This could be a definitive standard, almost closing this issue.

@github-staff github-staff deleted a comment Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant