Event Source Example 2

Process large dataset on server scenario

Below button will send api call send asynchronous call to server that start processing large dataset. & API will return 200 status code immediately. Server will start processing large dataset. Rather than waiting for the status of processing i.e. completed or not, or creating pulling mechanism to check status is bad user experience. We can take advantage of Event Source Object where server can send notification to client once processing is completed.


Output