DEV Community

Bimo Prasetyo Afif
Bimo Prasetyo Afif

Posted on

1 2

Golang gRPC handler with 2 service/usecase. should use transaction?

Hi guys, i have backend golang. i build 1 gRPC handler that calling 2 usecase/service with 2 different repository of course.

i confuse how to implement transaction in handler.

let say in gRPC handler, it calling Create Order service and Create New User service. when the first service successful store data, but the second failed.

any suggestion? or wanna discuss about it? let me know :)

Top comments (1)

Collapse
 
bimbimprasetyoafif profile image
Bimo Prasetyo Afif

nevermind, i have solve this with seperate domain

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay