In Chapter 10, we met several core Chef objects, such as Chef::Node and Chef::Environment that provide us with an abstraction layer around the underlying API used to communicate with the Chef server. In this chapter, we’re going to look at the API itself and how and why you might want to use it. We’ll learn about:
We’ll also look at a number of examples of using the Chef API as we work through the chapter.
If you take another look at the Chef architecture diagram in Chef Architecture, you’ll see the Erchef component, which provides the core API that enables both Chef’s client tools and the outside world to communicate with Chef server. To use the technical definition, this is an HTTP-based RESTful API that accepts and returns JSON data to allow us to read from and write to a Chef server.
Entire books have been written about exactly what the term REST means, but for the purposes of this book we’re going to use the definition “structured to make it easy for our code to talk to the API efficiently while still allowing us mere mortals to understand the information that is being exchanged.”
One of the effects of using MQ at a large scale is that because we
can build distributed architectures so much faster than before, the
limitations of our software engineering processes become more visible.
Mistakes in slow motion are often harder to see (or rather, easier to
My experience when teaching MQ to groups of engineers is that its
rarely sufficient to just explain how MQ works and then expect them to
start building successful products. Like any technology that removes
friction, MQ opens the door to big blunders. If MQ is the ACME
rocket-propelled shoe of distributed software development, a lot of us are
like Wile E. Coyote, slamming full speed into the proverbial desert
We saw in Chapter6that MQ itself uses a formal
process for changes. One reason we built this process, over some years, was
to stop the repeated cliff-slamming that happened in the library
Partially its about slowing down, and partially its about ensuring
that when you move fast, you goand this is essential, dear readerin the
right direction. Its my standard interview riddle:
whats the rarest property of any software system, the absolute hardest
thing to get right, the lack of which causes the slow or fast death of the
vast majority of projects? The answer is not code quality, funding,
performance, or even (though its a close answer) popularity. The answer is
“Although forgiveness is often regarded as an expression of weakness, the decision to forgive can paradoxically elevate a victim to a position of strength as the one who holds the key to a perpetrator's wish”
(Gobodo-Madikizela, 2003, p. 117)
“To ask for recognition, or to offer it, is precisely not to ask for recognition of what one already is. It is to solicit a becoming, to instigate a transformation, to petition the future always in relation to the Other:
(Butler, 2006, p. 44)
The connections between racism and loss have been one of the main themes of this book. We have argued that getting to grips with these connections can help us to gain a fuller understanding of the phenomenon of racially motivated crime, the contexts in which it occurs, and the circumstances under which the tangle of psychological and social factors all too commonly but reductively referred to as “racial motivation” might be unravelled. In attempting to do this, we started out by drawing on a range of intellectual and empirical resources: the typological, identity, and shame-based approaches to racially motivated offending to be found in the “hate crime” literature; the concept of “institutional racism” adopted by Sir William Macpherson in the Lawrence Inquiry report; the many “why questions” posed by the killing of Stephen Lawrence and other high profile cases; interview-based material derived from research we conducted in and around the city of Stoke-on-Trent; and, finally, our own personal experiences of racism and the difficulties of losing “race” from our everyday thoughts and conversations. We tried to look at racism, loss, and the connections between them in the wider context of white working-class people's perception that they are misunderstood and disrespected, not only by certain minority ethnic groups, but also by their own political leaders. However, we believe that it is important not to limit our search for a clearer understanding of these connections to the conflict between competing interest groups for two reasons: first, because people of similar social backgrounds tend to position themselves rather differently in relation to anti-immigration rhetoric, racism, violence, and feelings of community belonging; second, because we are all inherently conflicted beings, our subjective inner worlds informed by multiple and competing patterns of identification, and by thoughts, fears, and feelings of which we are not always consciously aware.