lundi 28 août 2023

Suggestion on design pattern for event driven webapi development [closed]

I need experts' suggestion here to decide the disign to construct the Web Api. All I know is RESTful API where user can GET/POST/PUT/DELETE to manipulate data and response usually been sent to the client caller.

We have a requirement when API is called by a client, it may not receive the response immediately. In different words, the API has to perform some complex logic which may take few seconds and then this processed message requires to pass as Kafka message, where different clients receive the message and process it.

Once this is done, API can say that work is done and send response back to the clients.

Can anyone suggest the best design to overcome this requirement? (Technology chosen so far is .Net 6 Web API)

if I develop RESTful API in conventional way, the response does not matter to the client as this is just like.. 'Hey, wait please.. work in progress' kind of message. I am attaching basic diagram to give the idea how we want
enter image description here

Aucun commentaire:

Enregistrer un commentaire