Book Image

Clojure Reactive Programming

Book Image

Clojure Reactive Programming

Overview of this book

Table of Contents (19 chapters)
Clojure Reactive Programming
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Bibliography
Index

Designing the solution


We now have all the information we need to start designing our application. We need to coordinate four different API calls per CloudFormation stack:

  • describeStacks: To list all available stacks

  • describeStackResources: To retrieve details of all resources contained in a stack

  • describeInstances: To retrieve details of all EC2 instances in a stack

  • describeDBInstances: To retrieve details of all DB2 instances in a stack

Next, I would like you to step back for a moment and think about how you would design code like this. Go ahead, I'll wait.

Now that you're back, let's have a look at one possible approach.

If we recall the screenshot of what the dashboard would look like, we realize that, for the purposes of our application, the difference between EC2 and RDS resources can be completely ignored so long as each one has the attributes ID, type, and status.

This means whatever our solution may be, it has to somehow provide a uniform way of abstracting the different resource types...