AI Blueprints
上QQ阅读APP看书,第一时间看更新

Chapter 2. A Blueprint for Planning Cloud Infrastructure

Electronic computing was once so rarefied and expensive that few people had ever seen such a machine. Elaborate public displays such as IBM's Selective Sequence Electronic Calculator (The IBM Selective Sequence Electronic Calculator, Columbia University Computing History, http://www.columbia.edu/cu/computinghistory/ssec.html), placed behind glass on the ground floor of their New York headquarters in 1948, attest to the esteemed introduction of computing. Yet, through the most remarkable technological progression of human history, computing power has grown while hardware size and power usage have shrunk in equally spectacular orders of magnitude – today, chips less than a billionth the size have more computing power than the original electro-mechanical marvels, and equally, machines nominally the size of a refrigerator have billions of times the speed and memory.

Originally, computing resources were rented from large firms such as IBM, UNIVAC, and Honeywell, but eventually, businesses purchased and installed commodity servers on-premises as a cost-saving measure. Now, ironically, computing power and network connectivity are so cheap that businesses again find it more cost effective to rent from big companies such as Amazon, Google, and Microsoft.

But no business is willing to throw money around. Now that computing is again rented, every minute counts. Cloud providers allow (virtual) machines to be created and destroyed on demand. Cloud providers also have many configurations available, ranging from cheap but slow machines to specialized high-performance machines for specialized workloads. The price and performance of cloud machines continually change as hardware and software improve and cloud providers compete in an innovative and low-margin market. Buying machine time up-front in fixed quantities can also reduce cost. Deciding how many machines and what kinds are needed to complete some task within some budget is virtually impossible to do by hand – perhaps AI can help us?

Given some collection of independent tasks to complete, how do we decide which and how many machines are needed to complete them in the smallest amount of time and within a certain monetary budget? The answer: use a constraint solver!

In this chapter, we will cover:

  • The characteristics of a cloud infrastructure planning problem
  • A technique for solving the problem using the free and open source constraint solver OptaPlanner
  • Deployment scripts and a method for evaluating the accuracy of the planner