12.4 Summary
This chapter integrated a number of application programs under the cover of a single RESTful API. To build a proper API, there were several important groups of skills:
Creating an OpenAPI specification.
Writing a web service application to implement the OpenAPI specification.
Using a processing pool to delegate long-running background tasks. In this example, we used
concurrent.futures
to create a future promise of results, and then compute those results.
The number of processes involved can be quite daunting. In addition to the web service, there is a processing pool, with a number of sub-processes to do the work of acquiring and cleaning data.
In many cases, additional tools are built to monitor the API to be sure it’s running properly. Further, it’s also common to allocate dedicated servers to this work, and configure supervisord
to start the overall service and ensure the service continues to run properly.