Reputation: 189
I am currently developing a service and its current architecture is monolithic. So, when a client clicks, the front end connects with the backend service. On the backend, currently it is designed in such a way that it calls a master method which then manages other methods sequentially waiting for its response. The API calling the master would start a thread and give HTTP response as 202 immediately. Currently the backend is in single pod. Logic is something like
master(request):
m1 = callMethod1(request)
if m1.message == 'OK':
m2 = callMethod2(request)
if m2.message == 'OK':
m3 = callMethod3(request)
#around 10 methods like this
else:
#fail
callMethod1(request):
#do something with request
#update database
#return the status
callMethod2(request):
#do something with request
#update database if pass(OK) or fail(ERROR)
#return the status
Concurrent users for this application would be not more than 150.
Tech stack:
My questions:
Upvotes: 0
Views: 255
Reputation: 6890
This use case looks simpler using orchestration. Check out the temporal.io open source project that would allow converting your code to a workflow withou logical changes.
Upvotes: 0