Integrating with event-driven systems
In the previous sections, we discussed how to interact with network devices and network management systems using the request-response model. In this model, a client sends a request to a server and the server sends a response as a reply to the request. The HTTP (REST API) and SSH protocols are based on a request-response-based model. This model works well for configuring a system or getting the operational state of the network on an ad hoc basis or periodically. But what about if something happens in the network that requires the operation team's attention? For example, let's say a hardware failure on a device or a line cable has been cut. Network devices typically raise alarms in such situations, and these alarms have to reach the operator (via an email, an SMS, or a dashboard) immediately.
We can use the request-response model to poll the network device every second (or every few seconds) to check if there has been any change in...