Win a copy of Emmy in the Key of Code this week in the General Computing forum!

Ganesh kher

+ Follow
since Jul 10, 2019
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ganesh kher

We have a scenario where we are polling users from Active directory to keycloak and this works perfectly fine and any recently changed user automatically gets added in keycloak .But here I have to load same users from Keycloak to my SpringBoot application DB on certain interval say 1 hour . So the high level data flow is like below Active Directory -> KeyCloak ->Spring Boot Service Poll->Application DB Need to find a best way to process only users who have recently been modified in keycloak so that I shall have less number of records to update in Application DB.
Keycloak keycloakInstance=// pass Keycloak URL to KeycloakBuilder
Userresource userResource=// using keycloakInstance pass realmName and getUsers List uersListFfromkeyCLoak// Here need only users who have changed in last one hour
3 weeks ago

Al Hobbs wrote:You could commit them both after they are both successful

Agree .But here under the hood updateTeacherServiceAPI(request); is call to microservice 1 &    updateStudentServiceAPI(request);is call to microservice 2 . Here how to treat this transaction as 1 as microservice 1
shall have code something like
getConnction of Microservice DB1 commit the txn and reply which is isolated transaction and if  updateStudentServiceAPI(request); fails because of some reason I have to reinitiate a txn to microservice 1  saying undo the record update done in updateTeacherServiceAPI(). Which is quite difficult if by the time microservice 1 goes down then ? System shall remain in unConsistent state. I wish to do it with some standard framework if there is already in Springboot distributed Transaction management they way it is in EJB i.e. TransactionalAttributes.
4 months ago
We need to find best way to address distributed transaction management in our microservices architecture.
Here is the Problem Statement.
We have one Composite microservice which shall interact with underlying other 2 Atomic microservices (Which are meant for specific purpose obviously) and have separate database e.g. We can consider these 2 microservices as
Here in Composite Service Usecase is like user
(Administrator) can assign a Teacher to a student for the specific course etc.
I wonder how can we address this problem in one transaction as each servie (STUDENT_SERVICE and TEACHER_SERVICE ) has separate DB and all should happen in one transaction either commit or rollback.
Since those 2 services are separate and I see JTA would not be of help as it is meant for having these 2 applications (services) deployed on same application server!
I have opted out JTA as mentioned above

//Pseudo Code
4 months ago