Beyond Local Resources – Scaling Genetic Algorithms in the Cloud
This chapter builds on the previous one, which focused on using multiprocessing to enhance genetic algorithm performance. It restructures the genetic algorithm into a client-server model, where the client employs asynchronous I/O, and the server manages fitness function calculations. The server component is then deployed to the cloud via AWS Lambda, demonstrating a practical application of serverless architecture in optimizing genetic algorithm computations.
This chapter starts by discussing the advantages of dividing genetic algorithms into client and server components. It then progresses to implementing this client-server model while using the same One-Max benchmark problem from the previous chapter. The server is built using Flask, while the client leverages Python’s asyncio
library for asynchronous operations. The chapter includes experiments with deploying the Flask application on production-grade...