100% found this document useful (1 vote)
15 views

Get RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data 1st Edition Mike Amundsen PDF ebook with Full Chapters Now

The document promotes the 'RESTful Web API Patterns and Practices Cookbook' by Mike Amundsen, which provides over 70 recipes for designing and implementing scalable web APIs. It includes praise from industry experts highlighting its practical approach to API design challenges and the importance of hypermedia. The book is aimed at software designers and developers looking to create reliable service interfaces that leverage the strengths of the web.

Uploaded by

lentogunst8k
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
15 views

Get RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data 1st Edition Mike Amundsen PDF ebook with Full Chapters Now

The document promotes the 'RESTful Web API Patterns and Practices Cookbook' by Mike Amundsen, which provides over 70 recipes for designing and implementing scalable web APIs. It includes praise from industry experts highlighting its practical approach to API design challenges and the importance of hypermedia. The book is aimed at software designers and developers looking to create reliable service interfaces that leverage the strengths of the web.

Uploaded by

lentogunst8k
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Get the full ebook with Bonus Features for a Better Reading Experience on ebookmeta.

com

RESTful Web API Patterns and Practices Cookbook


Connecting and Orchestrating Microservices and
Distributed Data 1st Edition Mike Amundsen

https://ebookmeta.com/product/restful-web-api-patterns-and-
practices-cookbook-connecting-and-orchestrating-
microservices-and-distributed-data-1st-edition-mike-
amundsen/

OR CLICK HERE

DOWLOAD NOW

Download more ebook instantly today at https://ebookmeta.com


Praise for RESTful Web API Patterns and Practices
Cookbook
Creating scalable and reliable web APIs and efficiently consuming
them is challenging, maybe even more challenging than you think.
This cookbook is full of recipes and principles to help you face
those known and unknown challenges.
Arnaud Lauret, API Handyman, OpenAPI Lead, Postman
This book does an excellent job of making good API design more
accessible. Look up the challenge you’re facing, and you’ll find a
recipe with a solution and an explanation of how it works.
Erik Wilde, Catalyst, Axway
Mike Amundsen did it again with excellent best practices and
examples of best of breed API patterns. Easy to read, understand,
and apply.
Vicki Reyzelman, Director of Platform and Governance
Amundsen has delivered a valuable resource that addresses
common and complex API design choices in an easy-to-
understand format. The book contains plenty of examples and
diagrams to demonstrate the purpose and application of each
recipe. Along the way, he helps the reader tap into the power of
the HTTP protocol and hypermedia. Anyone faced with designing
evolvable web-based APIs that will stand the test of time should
read this book.
James Higginbotham, Author of Principles of Web API Design,
Executive API Consultant, LaunchAny
More Books by Mike Amundsen
API Strategy for Decision Makers (2022) with Derric Gilling

Continuous API Management, 2nd ed. (2021) with Medjaoui, Wilde,


and Mitra

Design and Build Great Web APIs (2020)

What Is Serverless? (2020)

API Traffic Management 101 (2019)

Continuous API Management, 1st ed. (2018) with Medjaoui, Wilde,


and Mitra

RESTful Web Clients (2017)

Microservice Architecture (2016) with Nadareishvili, Mitra, and


McLarty

RESTful Web APIs (2013) with Leonard Richardson

Building Hypermedia APIs with HTML5 and Node (2011)


RESTful Web API Patterns
and Practices Cookbook
Connecting and Orchestrating Microservices and Distributed Data

Mike Amundsen
RESTful Web API Patterns and Practices Cookbook
by Mike Amundsen
Copyright © 2023 Amundsen.com, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales
promotional use. Online editions are also available for most titles
(http://oreilly.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
[email protected].

Acquisitions Editor: Melissa Duffield Indexer: WordCo Indexing Services,


Inc.

Development Editor: Angela Rufino Interior Designer: David Futato

Production Editor: Katherine Tozer Cover Designer: Karen Montgomery

Copyeditor: Sonia Saruba Illustrator: Kate Dullea

Proofreader: Piper Editorial Consulting,


LLC

October 2022: First Edition


Revision History for the First Edition
2022-10-14: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781098106744 for
release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
RESTful Web API Patterns and Practices Cookbook, the cover image,
and related trade dress are trademarks of O’Reilly Media, Inc.
The views expressed in this work are those of the author, and do not
represent the publisher’s views. While the publisher and the author
have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and
the author disclaim all responsibility for errors or omissions,
including without limitation responsibility for damages resulting from
the use of or reliance on this work. Use of the information and
instructions contained in this work is at your own risk. If any code
samples or other technology this work contains or describes is
subject to open source licenses or the intellectual property rights of
others, it is your responsibility to ensure that your use thereof
complies with such licenses and/or rights.
978-1-098-10674-4
[LSI]
Dedication
This book is dedicated to the memory of architect and design
theorist
Christopher Alexander (1936–2022).
Thanks for helping me see the big picture while I continue to focus
on the possible.
Foreword
Oh, what a tangled web we’ve woven!
I started my career in technology when the World Wide Web was
first being used in the business arena. In fact, the common thread
throughout my career has been applying the lessons of the web to
the complex world of enterprise architecture and digital business
strategy, especially those web APIs that seem to be at the center of
everything.
In 2012, I had the pleasure of teaming up with Mike Amundsen.
We’ve partnered on many API-themed endeavors since, and I’ve
never stopped learning from him. It was Mike who taught me the
fundamental principles of the web and so much more. It never
ceases to amaze me how Mike is able to find insights I overlooked
that seem so obvious in hindsight. RESTful Web API Patterns and
Practices Cookbook puts many of these principles and insights into
one very practical package.
When the internet first hit the mainstream back in the early ’90s, I
was at a small undergraduate school getting a mathematics degree.
My professors were the ones most excited at first, which makes
sense, I guess, given the web’s academic roots. I used to have to
pry them away from reading other people’s movie reviews to get
back to our algebra lessons. In those musty, book-laden campus
offices, it wasn’t obvious at all that the World Wide Web would
become the most transformative human invention of my lifetime,
and arguably of all time.
So how did we go from pixelated bulletin boards of personal
interests to a world where 70% of business transactions take place
digitally? A lot of the credit has to go to the fact that the web was
cooked up using a fairly simple set of ingredients: clients, servers,
networks, open protocols, and, of course, APIs. No matter how
complex and ubiquitous the web gets, those ingredients remain at
its core.
Hyperlinks—or hypermedia, as a more encompassing term—have
had a particularly profound impact on technology. Originally modeled
after academic citations (the professors again), not only were
hyperlinks the ingredient that brought the network effect to the web,
but they have also shaped user expectations for all technology since.
There was no user manual for the web, just some blue underlined
text that encouraged users to rely on intuition. This “follow your
nose” principle is something Mike has always emphasized, and it
provides an important perspective when considering APIs and the
role of hypermedia.
So the world may not need a user manual for the web, but it
certainly needs a developer guide. On this topic, Mike has already
authored or coauthored a number of essential books: RESTful Web
APIs, RESTful Web Clients, Microservice Architecture, and
Continuous API Management to name a few. RESTful Web API
Patterns and Practices Cookbook continues this work. Here, you will
not only learn how the technologies of the web are foundational to
current computing, but also how the way that the web works is
fundamental to scalable architecture in current software ecosystems.
Mike parallels the principles of the web with de rigueur API design,
illustrating how these principles can be applied successfully. Most of
all, you will learn how to architect and build systems that are
resilient to change and last the test of time.
Every organization is compounding the complexity of their software
landscapes on a continual basis, and increasingly connecting with
partners and suppliers in a digital ecosystem. If you want the recipes
to thrive in that reality, this is the cookbook for you.
Matt McLarty, Global Field CTO of MuleSoft at Salesforce Vancouver,
August 2022
Preface

Welcome to the world of the RESTful Web API Patterns and Practices
Cookbook.
That’s quite a moniker—one worth explaining and exploring. And
that’s what we’ll be doing in this preface. I will tell you now that I’m
going to break the rules a bit and include a substantial amount of
pertinent text in the front matter of this book (front matter is all
these pages with roman numerals as page numbers). I’ll save the
details for the next section (Part I). Let’s first take care of some
logistics.

About This Book


The goal of this book is to enable software designers, architects,
developers, and maintainers to build service interfaces (APIs) that
take advantage of the strengths of the web, while lowering the costs
and risks of creating reliable high-level services that hold
dependencies on other APIs and services reachable only over the
network.
To do that, I’ve gathered a collection of more than 70 recipes and
patterns that I’ve learned and used over the several decades I’ve
spent helping clients design, build, and deploy successful business
services on the open web. I suspect you will be familiar with at least
some of the recipes you’ll find here—possibly by other names or in
different forms. I also hope that you will find novel approaches to
similar problems.
NOTE
Over the years, I’ve found that the challenges of software design rarely change.
The solutions to those problems change frequently based on technology
advances and fashion trends. We’ll focus on the challenges in this book, and I’ll
leave the up-to-date technology and fashion choices to you, the reader.

Since this is a cookbook, there won’t be much runnable code. There


will, however, be lots of diagrams, code snippets, and network
message examples along with explanations identifying the problems.
The challenges and discussion will always be technology and
platform agnostic. These recipes are presented in a way that will let
you translate them into code and components that will work within
your target environment.

Who Should Read This Book


The primary audience for the book is the people tasked with
planning, architecting, and implementing service interfaces that run
over HTTP. For some, that will mean focusing on creating enterprise-
wide service producers and consumers. For others, it will mean
building services that can live on the open web and run in a scalable
and reliable way for consumers across the globe. For all, it will mean
creating usable application programming interfaces that allow
programmers to solve the challenges before them.
Whether you are hosting your solutions locally on your own
hardware or creating software that will run in the cloud, the recipes
here will help you understand the challenges and will offer a set of
techniques for anticipating problems and building in recovery to
handle cases where the unanticipated occurs.
What’s Covered
Since the book is meant to be useful to a wide audience, I’ve divided
it into chapters focused on related topics. To start, Chapters 1 and 2
make up Part I of the book, where we explore the background and
foundations of shared services on the web. To stretch the cookbook
analogy, consider Part I as the story behind the “hypermedia cusine”
we’ll be exploring in Part II. Like any good cookbook, each of the
main chapters in Part II contains a set of self-contained recipes that
you can use to meet particular challenges as you design, build, and
deploy your web API “dishes.”

ONLINE RESOURCES
The book has a number of associated online resources, including a GitHub
repository and related web pages, some examples, and the latest updates to
the recipe catalog. You can reach all these resources via
http://WebAPICookbook.com.

Here is a quick listing of the chapters and what they cover.

Part I: Understanding RESTful Hypermedia


The opening chapters (Chapters 1 and 2) describe the foundation
that underpins all the recipes in the book. They are a mix of history,
philosophy, and pragmatic thinking. These are the ideas and
principles that reflect the lessons I’ve learned over my years of
designing, building, and supporting network software applications
running on the web.
Chapter 1, Introducing RESTful Web APIs
This is a general overview of the rationale behind the selected
recipes in this book. It includes a section answering the question
“what are RESTful web APIs (RWAs)?,” reasons hypermedia plays
such an important role in the creation of RWAs, and some base-
level shared principles that guide the selection and explanation of
the recipes in this book. This chapter “sets the table” for all the
material that follows.
Chapter 2, Thinking and Designing in Hypermedia
This chapter explores the background of hypermedia-driven
distributed systems that form the foundation for web
applications. Each recipe collection covered in Part II (design,
clients, services, data, and workflow) is explored with a mix of
history, philosophy, and pragmatic thinking. Reading this chapter
will help you understand some of the key design ideas and
technical bases for all the patterns and practices outlined in the
rest of the book.

Part II: Hypermedia Recipe Catalog


Part II holds all the recipes I’ve selected for this volume. You’ll notice
that most of the chapters start with the word “hypermedia.” This
should give you a clue to the overall approach we’ll be taking
throughout the book.
Chapter 3, Hypermedia Design
Reliable and resilient services start with thoughtful designs. This
chapter covers a set of common challenges you’ll need to deal
with before you even get to the level of coding and releasing
your services. This chapter will be particularly helpful to
architects as well as service designers, and helps set the tone for
the various recipes that follow.

Chapter 4, Hypermedia Clients


This chapter focuses on challenges you’ll face when creating
service/API consumer applications. I made a point of discussing
client apps before talking about recipes for service interfaces
themselves. A common approach for creating flexible and
resilient service consumers is necessary for any program that
plans on creating a stable and reliable platform for open services
that can live on the web as well as within an enterprise.
Chapter 5, Hypermedia Services
With a solid foundation of design principles and properly
architected client applications, it can be easier to build and
release stable service producers that can be safely updated over
time without breaking existing API consumers. This set of recipes
focuses not only on principles of solid service interface design but
also on the importance of supporting runtime error recovery and
reliability patterns to make sure your solutions stay up and
running even when parts of your system experience failures.
Chapter 6, Distributed Data
This chapter focuses on the challenges of supporting persisted
data in an online, distributed environment. Most of the recipes
here are aimed at improving the responsiveness, scalability, and
reliability of your data services by ensuring data integrity—even
when changing internal data models and implementations at
runtime.

Chapter 7, Hypermedia Workflow


The last set of recipes focuses on creating and managing service
workflow on the web. The key challenge to face for open services
workflow is to create a safe and reliable set of solutions for
enlisting multiple unrelated services into a single, resilient
workflow to solve a problem none of the individual services
knows anything about. I saved this chapter for last since it relies
on many of the recipes covered earlier in the book.

Chapter 8, Closing Remarks


The final chapter is a short wrap-up of the material as well as a
“call-forward” to help you decide on your own “next steps” as
you set out to apply these recipes to your environment.
Appendices
There are a series of appendices for the book that you can use as
additional support materials. These are sometimes referred to in the
text but can also be treated as stand-alone references.
Appendix A, Guiding Principles
This appendix is a short “motivational poster” version of the
single guiding principle behind the selected recipes, as well as
some secondary principles used to shape the description and,
ultimately, the implementation of these patterns in general.

Appendix B, Additional Reading


Throughout the book, I’ll be recommending additional reading,
quoting from books and articles, and calling out presentations
and videos that are the source of much of the advice in the book.
This appendix contains a self-standing list of reading and viewing
materials that you can use as references and a guide when
working through the recipes.
Appendix C, Related Standards
Since the goal of this book is to create services that can
successfully live “on the web,” the recipes depend upon a number
of important open web standards. This appendix contains a list of
the related standards documents.
Appendix D, Using the HyperCLI
In several places in the book, I reference a command-line
interface tool called HyperCLI. You can use this tool to interact
with hypermedia-aware services. This appendix provides a short
introduction to the tool and some pointers to other online
resources on how to take advantage of HyperCLI and HyperLang.
Other documents randomly have
different content
säästääksesi omia vaivojasi jäljensit sinä hänen laskuesimerkkinsä.
Tästä rikoksesta olet sinä saanut hyvin ansaitun kuutosen — niinkuin
jokainen poika sinun sijassasi olisi saanut. Vaikka sinä vielä sitä
paitsi koetat välttää rangaistusta jutellen paperilappusista ja muista,
niin olemme, opettaja Lange ja minä, kumminkin yksimielisesti
päättäneet, ettemme anna sinulle lisää rangaistusta siitä. Useimmat
sinun opettajasi ovat, niinkuin minäkin, tulleet kovin pahoille mielin
kuultuaan sinusta tällaisia asioita. Sinä olet sellainen poika, jota me
kaikki kunnioitamme ja josta me paljon pidämme. Minä luulen
myöskin huomanneeni, että toveriesi tunteet sinua kohtaan ovat
samanlaisia. Me olemme siitä ymmärtäneet, että sinun on ehkä
vaikeampi kuin muiden tunnustaa tehneesi halpamaista petosta. Kun
sinä nyt yrität valheella päästä eroon asiasta, olet sinä väärässä
luulossa, jos uskot valheen itseäsi paremmin auttavan kuin suoran,
rehellisen tunnustuksen. Me olemme päättäneet antaa sinulle
anteeksi tämän väärän luulon. Me toivomme, että sinä annat sille
oikean arvon, tajuat, että meidän hyvä mielipiteemme sinusta
velvoittaa sinua.

Antti Bech seisoi, taistellen itkua vastaan, rehtorin puhuessa. Kun


puhe oli loppunut, nieli hän itkunsa suurella ponnistuksella ja sanoi:

— Minä en ole tehnyt petosta.

Rehtori tarkasti häntä tutkivalla katseellaan.

— Etkö sinä itse ole tunnustanut ottaneesi vihkosi lauantaina


laatikosta — ja kirjoittaneesi laskut vihkoon laulutunnilla.

— O — olen, mutta…

— So, sanoi rehtori, kumarsi hiukan Svenningsenille ja meni.


Antti Bech pikemmin putosi kuin istui tuolilleen; hän laski päänsä
käsivarsilleen pöydälle ja voihki.

Svenningsen seisoi selin luokkaan ja katseli ulos akkunasta. Pari


kertaa hän kääntyi katsoen Anttiin päin, joka nyyhki ääneen. Pojat
istuivat hiljaa.

Lopulta Svenningsen sanoi: — Ellet sinä voi hillitä itseäsi, Antti


Bech, niin mene ulos, kunnes tyynnyt.

Antti Bech meni.

Vielä kesti hetkisen, ennenkuin opettaja Svenningsen antoi jatkaa


käännöstä.

Antti Bech ei tullut takaisin; eikä hän seuraavalla tunnillakaan ollut


paikallaan.

Hän oli mennyt kotiin.

*****

Mikko Tiukkatuuli astui kotiin päin. Hänestä tuntui kuin eivät jalat
kannattaisi häntä; polvet notkuivat ja letkahtelivat.

Päivällispöydässä hän kertoi ykkösestään kotilaskuissa. Ruoka


tarttui kurkkuun; hän nieli ja nieli.

Ruualta hän meni huoneeseensa. Täällä hän heittäytyi sänkyynsä


— vatsalleen, haudaten päänsä tyynyyn. Hänellä oli kauhea halu
saada itkeä, mutta ei mitenkään voinut. Rinnan alla tuska pakotti —
ontto, kiertävä tuska.
Näin hän makasi tunnin ajan liikahtamatta. Sitten hän nousi
vitkaan. Hän katsahti ympärilleen huoneessa, istui sängyn laidalle
antaen jalkojensa veltosti roikkua. Taaskin kului pitkän pitkä hetki.

Sitten hän nousi, meni vitkaan alas portaita, otti lakkinsa eteisestä.
Hän pysähtyi konttoorin oven taakse ja kuunteli. Isä oli sisällä. Hän
tarttui ovenripaan, pysähtyi, päästi irti taas ja meni ulos kadulle.

Hiljakseen hän astui katua; ajoneuvot tärskyivät ja kolisivat,


ihmiset kulkivat hänen ohitsensa; hän ei näyttänyt niitä näkevän eikä
kuulevan, hän kuvitteli olevansa kosteassa jääpuvussa.

Hän tuli aivan koulun ovelle saakka. Täällä hän pysähtyi ja pyyhki
otsaansa nenäliinalla; se tuli likomäräksi tuskanhiestä.

Kun hän tarttui raskaaseen ovenripaan, teki mieli pysähtyä ja


miettiä; mutta hän riensi avaamaan. Hän kulki kaikkien autioiden
käytävien lävitse, kunnes pysähtyi rehtorin kanslian oven taakse.
Hän koputti hiljaa.

Kukaan ei vastannut.

Sitten hän koputti kovemmin. Ei kukaan vieläkään vastannut.

Kanslian oven vieressä oli rehtorin yksityinen sisäänkäytävä. Hän


tavotti kelloa; mutta nyt hän mietti. Hyvin kauan.

Silloin kuului askelia sisältä eteisestä, samassa hän vetäsi


kellonnauhasta.

Rehtorin rouva avasi oven.

— Saisinko vähän puhutella rehtoria?


— Kyllä, heti!

Rehtorin rouva vei hänet eteisestä erään sisäoven kautta


kansliaan.

— Olkaa hyvä, istukaa, kyllä hän pian tulee.

Hän nosti korkeaselkäisen nahkatuolin pojalle ja meni.

Mikko Tiukkatuuli istui kovalle tuolille.

Rehtorin kansliahuone oli pitkä ja kapea, akkuna toisessa päässä.


Seiniä peittivät hyllyt, niin, seinät olivat pelkkänä hyllynä, kirjat
seisoivat tiheissä rivissä katosta lattiaan asti.

Mikko Tiukkatuuli istui korkeaselkäisessä tuolissa suorana,


melkein pystyssä, sillä selkänoja oli aivan kohtisuora. Hänen
varpaansa ulottuivat juuri lattiaan. Hän katseli ympärilleen, tuijottain
kirjoihin; vähä vähältä alkoi hänestä tuntua siltä, kuin seinät
lähestyisivät toisiaan, lähemmäksi yhä lähemmäksi — tahtoen
likistää hänet väliinsä ja painaa nuo kankeat ja kiristetyt kirjain selät
häneen — — —

Hän liukui alas tuolilta. Hän saattoi tuskin seisoa tuskalta, hiipi
ovelle, tarttui avaimeen: ovi oli suljettu.

Ja toinen ovi — se johti eteiseen!

Hän huudahti, kuu ovi äkkiä aukeni eteiseen, Rehtori tuli.

Hänellä oli sama kotitakki, jonka Mikko Tiukkatuuli oli nähnyt


ollessaan laiskanläksyllä.

— No, Mikkoseni, sinä tahdoit puhutella minua.


— Niin.

Rehtori seisoi hänen edessään katsellen häntä ja odottaen. Mutta


poika ei voinut sanoa muuta kuin "niin".

Mikko Tiukkatuuli tuijotti jäykästi rehtoriin, tuijotti ja tuijotti, aivan


sanatonna.

Rehtori sanoi viimein:

— No, mikä oli asia? Hän meni suuren työpöytänsä luo akkunan
eteen; rehtori istui ja tarjosi Mikko Tiukkatuulelle tuolia edessään.

— Se oli — se oli niin, — että minä olenkin petokseen syypää.

— Oletko sinä harjoittanut petosta?

— Olen, eikä Antti Bech.

— Selitä, poikaseni!

Mikko kertoi lauantai-aamuisesta tapauksesta, että Antti oli


laskenut irtonaiselle paperille ja pannut sen vihkoonsa, kuinka hän
oli kaatanut sille mustetta ja kirjoittanut sijaan uuden, Simo Selmerin
laskujen mukaan, joiden hän oli luullut olevan oikein, niinkuin aina
ennenkin.

— Antti Bech oli siis laskenut esimerkit?

— Oli, irtonaiselle lapulle. Hän sanoi edellisenä päivänä, ettei hän


ennättänyt kirjoittaa niitä vihkoonsa, — ainoastaan esimerkit olivat
vihossa.
Rehtori istui kauan ääneti katsellen ulos akkunasta Lopulta hän
sanoi:

— Eikö hän huomannut, että se lappu, jonka mukaan hän kirjoitti,


ei ollutkaan hänen, vaan jonkun muun kirjoittama?

— Ei. Minä koetin saada sen niin saman näköiseksi kuin suinkin.

Rehtori oli taas kauan vaiti ja katseli ulos. Sitten hän kääntyi
vitkaan Mikko Tiukkatuulen puoleen ja sanoi:

— Sinä teit siis petoksen?

— Niin.

— Mutta — mutta hyvä Mikko, sinullahan on opettaja Winther…

Mikko Tiukkatuuli tuijotti jäykällä katseella rehtori Holstiin ja ravisti


päätään.

— Eikö hän auta sinua? Otathan sinä tuntia hänen luonaan?

— Minä en ota tuntia Wintherillä.

— Kuka sinua sitten opettaa? Minä muistelen sinun sanoneen…

— Ei minua kukaan opeta,

— Mutta kirjoitinhan minä isällesi…

— Minä en antanut kirjettä isälle.

— Etkö sinä antanutkaan minun kirjettäni isällesi?


Mikko Tiukkatuuli istui niinkuin ennenkin tuijottaen — ja ravisti
päätään. Rehtori Holst katsoi tutkivasti häneen, sitten akkanaan ja
taas Mikko Tiukkatuuleen:

— Mutta kuinka sinä tiesit kertoa ottavasi yksityistuntia


laskennossa, josta minä olin kirjoittanut?

Mikko Tiukkatuulen huulet vapisivat, yhä pahemmin ja pahemmin


— tuijottavat silmät täyttyivät vähitellen kyynelillä — hän rykäsi ja sai
viimein ääntä:

— Minä mursin kirjeen ja luin sen.

Rehtori Holst nousi tuoliltaan ja käveli lattialla edes takaisin.


Kauan. Sitten hän pysähtyi Mikko Tiukkatuulen eteen ja sanoi syvästi
ja tutkivasti katsoen häneen:

— Semmoinenko sinä oletkin?

— E — en, en! Minä en — ole semmoinen! huusi Mikko


Tiukkatuuli, ja nyt tuli suuri itku, joka oli vaivannut ja painanut häntä
aamusta aikain.

Rehtori Holst antoi hänen itkeä pitkän aikaa. Kun kovin nyyhkytys
oli asettunut, kysyi hän:

— Sanoppas minulle, Mikko, tietääkö Antti Bech tästä?

— Ei — mutta — minä — menen sanomaan hänelle nyt.

— Nyt — niin. On parasta, että lähdet nyt jo heti!

Mikko Tiukkatuuli otti lakkinsa ja meni. Hän oli jo melkein ovesta


ulkona, mutta palasi takaisin ja kumarsi rehtorille. Hän oli unohtanut
sen.

Hän meni suoraan kaupunginvouti Bechille.

Kun hän nyt vaan saisi sanotuksi kaikki tyyni Antti Bechille — niin
tulkoon sitten koko kurjuus.

Koulusta hänet nyt kaiketikin eroitettaisiin. Ja kotona isä ottaisi


puheeksi konepajan, tai merille lähdön, tai puotipaikan.

Vielä ei hän tahtonut tätä ajatella — olihan sitä aikaa sittenkin, kun
hän ensin oli käynyt Antin luona. Hän riensi. Tie kulki kodin ohitse;
hän juoksi akkunain kohdalla. — — — Puolen tunnin kuluttua oli
kaikki sanottu ja tehty Antti Bechin luona, poikien huoneessa. Mikko
Tiukkatuuli istui Antin sängyn laidalla ja tähysti lakkaamatta lattiaa.
Antti Bech istui pöydällään, heilutellen jalkojaan ja katsellen ulos.

— Ja kaiken tämän olet sinä tunnustanut suoraan rehtorille?

— Niin. Parasta oli saada sanotuksi kaikki yht'aikaa.

— Nyt saat sinä, Mikko — nuhdesaarnan huomenna.

— Jos minä vaan pääsisin nuhdesaarnalla, niin —!

Pitkä äänettömyys. Viimein Mikko Tiukkatuuli sanoi, hellittämättä


katsettaan lattiasta:

— Oletko sinä sikamaisesti suuttunut minuun, Antti?

— Tökerö, vastasi Antti Bech.

Mikko Tiukkatuuli alkoi soudattaa itseään istuallaan.


— Niin, näetkös, ellet sinä vaan ole minulle vihainen enää!

— Minusta sinä olet ollut suuremmoisesti rehti — mennyt suoraan


rehtorille…

— No, sitten minä olen taas iloinen. Käyköön nyt miten tahansa.
Kun et sinä vaan tahdo ajatella minusta pahaa, — kun olen poissa.

— Lähdetkö sinä jonnekin?

— Eihän minulla ole muuta neuvoa, näetkös. Täytyy koettaa


paeta.

— Pa — paetako?

— Niin. Minä karkaan kotoa; tänä yönä ehkä.

— Oletko sinä hullu!

— Minä en kestä tätä kaikkea. Jos minut nyt ajetaan pois koulusta,
niin joutuu isäni aivan epätoivoon, häpeästä, näetkös. Molemmat, isä
ja äitikin. Heidän pitäisi kuitenkin keksiä minulle jotakin. Ehkä
lähettäisivät jonnekin muualle. Yhtä hyvinhän minä voin mennä itse.
Jo ajoissa. Sillä minä en kestä, en.

— Mutta — minne sinä aijot paeta, poika?

— Vähät siitä! Ainahan tuota jonnekin pääsee piiloutumaan,


kunnes muut ovat unhoittaneet. Minä aijon kävellä johonkin
eteläisempään kaupunkiin. Sieltä lähtee laivoja Amerikaan.

— Sinä joudut kiinni!


— En, kun vaan pysyttelen maaseudulla. Kulen talosta taloon —
kunnes saavun perille.

— Entä rahat?

— Minulla on 20 kruunua omaa rahaa.

— Niillä sinä et pitkälle pääse, poika! Saat vielä nälkää nähdä.

— No, niin. Voihan niinkin käydä. Jos kuoleekin nälkään tunturilla,


— entä sitten — onhan silloin ainakin päässyt pois. Pois kaikesta
tästä.

Mikko Tiukkatuuli puhui itkunsekaisella äänellä ja nousi


seisoalleen lattialle.

— Jos minä olisin poissa huomenna, niin sinä et luonnollisesti


tiedä mitään!

— En tietystikään, mutta…

— Ja ehkä sinä kirjoittaisit minulle. Kun minä vaan lähetän sinulle


osoitteeni. Sinä — sinä olet minun ainoa ystäväni, Antti, tiedätkös.
No, hyvästi nyt!

Antti Bech hyppäsi alas pöydältä.

— Oikeinko sinä tosissasi — aiotkos sinä karata?

— Eihän minulla muutakaan neuvoa ole, tajuathan sen. Minusta


tulee sellainen — sellainen pois potkittu raukka!

— No, sitä minä nyt en usko! sanoi Antti Bech.


— Onhan se sikamaisen rohkea työ, karata. Mutta jos sinä ensin
tunnustaisit kaiken tämän isällesi! Koettaaksesi, miten se häneen
vaikuttaisi!

— Minä — minä en uskalla. Minä — en tosiaankaan uskalla.

Itku valtasi Mikko Tiukkatuulen, Hau puri hampaitaan, estääkseen


sitä tulemasta.

— Hyvästi nyt, Antti! sanoi hän ja riensi ulos ovesta.

Hän meni kotiin päin.

Pakenemisen mahdollisuus oli kytenyt hänen mielessään jo


kauan, kauan aikaa. Ja nyt, puhellessa Antti Bechin kanssa, oli se
äkkiä kypsynyt lujaksi päätökseksi…

Mutta jos tunnustaisit ensin kaikki tyyni isällesi! Ja saisit nähdä


miten se häneen vaikuttaisi!

Niin, kun vaan olisi — olisi rohkeutta!

Hän oli sentään uskaltanut mennä rehtorin luo…!

Mutta isän…!

Ei, hän tunsi itsessään: Hän ei voisi toista kertaa — ja vielä isälle!
Ja äitikin tulisi, — sisaret saisivat tietää!

Nyt hän oli omalla kadulla, näki talon.

Hän pysähtyi äkkiä.


Hänen edellään kulki levollisesti muuan mies, jonka polvet
notkahtelivat omituisesti —: rehtori Holst! Takaapäin jo saattoi
kuvitella miehellä olevan tummat, vakavat kasvot.

Mikko Tiukkatuuli seisoi kuin naulittu paikallaan, vavisten


tuskallisesta pelosta.

— Niin, niin todellakin! Oi Jumala! Rehtori meni hänen kotiinsa!

Hän meni ilmoittamaan isälle!

— Oi — oi! oi — oi! Mikko Tiukkatuuli voihki ehdottomasti


puoliääneen itsekseen. Hän pyörähti ympäri ja kulki vastakkaista
tietä pitkin katuja.

Hän käveli ja käveli. Veri nousi päähän, koko ruumis aivan horjui.

Hän joutui maantielle. Päästyään maaseudulle kappaleen matkaa,


ei hän jaksanut kauemmaksi, vaan istui tien viereen.

Istuminen auttoi hiukan. Mutta vain hetkeksi. Sitten taas valtasi


hänet — tuo kauhea tuska ja epätoivo. Hän istui tuijottaen eteensä ja
ajatteli aina vaan samaa asiaa:

Että hän oli tuollainen, jollaisista joskus kuultiin, hyvien


vanhempien lapsi, joka häpäisi heidät, kotinsa ja itsensä, joka "joutui
hunningolle" — piti lähteä Amerikaan. Yksi niistä, joiden tie usein
päättyy kuritushuoneeseen.

Mikko Tiukkatuuli pani kätensä ristiin ja rukoili Jumalaa.

Mutta eihän Jumala voinut välittää — hänen rukouksestansa nyt!


Nytkö vasta oli aika rukoilla Jumalaa, nyt hädässä ja kurjuudessa?
Silloin, kirjettä polttaessaan olisi hänen pitänyt ajatella Jumalaa. Hän
tunsi olevansa halpamainen ja tuhma Jumalan edessä, luullessaan,
ettei Jumala tajuaisi, kuinka häntä nyt pelko pakoitti — rukoilemaan!

Hän katsoi ympärilleen. Kaikkialla oli hiljaista, — kyllä hän oli hyvin
kaukana.

Hän oli matkalla maailmalle, oli todellakin paennut! Hän tahtoi


kulkea, kulkea yhä edelleen — eikä koskaan palata!

Mutta hän ei ollut saanut mitään mukaansa. Kaksikymmentä


kruunua oli jäänyt kotiin ja välipalakin, valmiiksi laitetut voileivät olivat
hänen huoneessaan odottamassa. Ne hän oli aikonut ottaa
mukaansa evääksi. Nyt hän saisi nähdä nälkää ja kärsiä puutetta!

Mutta tämä oli ihan oikein. Hänen piti kärsiä puutetta. Tässä ei
auttanutkaan pelkkä rukoileminen. Ei, ensin hän saisi kärsiä jotakin
oikein kovaa. Nälkää ja puutetta, rahattomana, — jos hän tätä
kestäisi jonkun aikaa, edes muutamia päiviä, niin ehkä Jumala silloin
hiukan antaisi arvoa hänelle…!

Niin, parasta oli taas lähteä. Yöksi piti piiloutua metsään. Ei se


mitään vaikeata ollutkaan. Eivät he häntä löytäisi. Kun hän pääsee
ensimäiseen kaupunkiin, niin sieltä hän kirjoittaa isälle, että antavat
hänen jatkaa matkaansa, eivätkä suotta takaa aja. Hän toivoi vaan
saavansa kärsiä ja omin voimin päästä eteenpäin. Kerran, kun hän
luulee rikoksensa sovitetuksi ja omin päin on joksikin päässyt, niin
silloin hän tulee kotiin. Kyllä isä antaisi hänen menetellä näin, kun
hän vaan kirjoittaisi oikein vakavasti ja järkevästi.

Monen vuoden kuluttua hän palaisi isän ja äidin, Johannan ja


Drean luo — kunniallisena miehenä.
Niin — parasta oli heti lähteä eteenpäin!

Hän katsoi taivaalle; se oli kirkas ja sininen. Aurinko alkoi lähestyä


tunturia. Hän tunsi päätöksensä jälkeen muuttuneensa paremmaksi
ihmiseksi. Taas Jumala muistui mieleen. Ei hän sentään tahtoisi nyt
pyytää Jumalalta apua — sehän olisi halpamaista. Mutta "Isämeidän
rukouksen" hän aikoi lukea. Siitä Jumala kyllä ymmärtäisi hänen
tarkoituksensa.

Mikko Tiukkatuuli luki "Isämeidän". Sitten hän jatkoi matkaansa.

Puoliyhdeksän ajoissa illalla tuli Mikko Tiukkatuulen isä


kaupunginvouti Bechille.

— Olivatko he nähneet Mikkoa heillä tänään?

— Olivat kylläkin. Viiden aikaan iltapäivällä hän oli ollut heillä


puolen tunnin ajan. Sittemmin emme ole nähneet häntä, eikö hän ole
tullut kotiin?

— Ei, poika on ollut kotoa poissa koko päivän. Mikko Tiukkatuulen


isä meni. Kun hän oli kulkenut kappaleen matkaa katua alaspäin,
juoksi joku hänen järjestään.

— Anteeksi, herra kamreeri!

— Sinä, Antti!

— Niin, minä — minä tahdoin vaan, minusta tuntui, minä aijon


sanoa
Teille, että Mikko oli minun luonani tänään…
— Niin, poikaseni, minä kuulin sen. Tiedän myöskin, minkä vuoksi.
Rehtori Holst on ollut luonani ja kertonut kaikki.

— Niin — mutta Mikko — hän sanoi — hän pelkäsi kovin…

— Pelkäsikö hän?

— Kyllä, hän pelkäsi kovasti. Ja sitten hän sanoi, ettei uskaltaisi


mennä kotiin. Taikka oikeastaan hän tahtoi — tahtoi…

— Herran nimessä, mitä hän tahtoi?

— Karata kotoa.

Näytti silta, kuin Mikko Tiukkatuulen isä olisi luullut jotakin


pahempaa; hän huokasi helpotuksesta. Mutta vain hetkiseksi mieli
keventyi. Hän kysyi:

— Tiedätkö, minne? Voithan ymmärtää, hyvä Antti, että minun


täytyy se saada tietää!

— En. Hän sanoi vaan tahtovansa kävellä johonkin eteläiseen


kaupunkiin. Sieltä hän menisi Amerikan laivaan. Hän sanoi
aikovansa kulkea talosta taloon.

Oli valoisa toukokuun ilta. Mikko Tiukkatuulen isä seisoi hiukan


aikaa miettien.

— Kuuleppas, Antti, tahdotko tehdä minulle suuren palveluksen?

— Hyvin kernaasti!

— Mene tilaamaan Olavi ajurilta minulle kaksi hevosta ja


ajoneuvot niin pian kuin suinkin. Pyydä häntä ajamaan heti meille!
— Kyllä!

Antti Bech juoksi. Mikko Tiukkatuulen isä meni kotiin.

Hiukkasta myöhemmin seisoi kaksi hevosta kamreerin oven


edessä. Toisen hevosen rattaille istui hän itse ja toisiin kärryihin
asettui hänen ensimäinen kirjurinsa.

— Nyt, Molstad, sanoi Mikko Tiukkatuulen isä, — ajatte Te


pohjoista tietä kello 12 asti ja tiedustelette joka talosta ja kaikilta,
kutka ikänä vastaanne sattuvat. Ell'ette saa mitään selvää kello 12,
niin palatkaa takaisin.

Molstad ajoi. Sitten Mikko Tiukkatuulen isä sanoi hyvästi


vaimolleen ja molemmille pikku tytöille, jotka seisoivat ovessa ja
itkivät.

Rattaanpyörät kolisivat siltarummun poikki.

Tunnin matkan päässä eteläisellä maantiellä hän tapasi erään,


joka luuli nähneensä jonkun. Myöhemmin erään akan. Kyllä hän oli
kohdannut pojan, aivan hiljan.

Ajoneuvot pyörivät eteenpäin.

Jonkun matkan päässä tuli vastaan heinäkuorma.

Maalaisäijä käveli kuorman vieressä.

— Et suinkaan sinä ole tavannut erästä kaupunkilaispoikaa täällä


tiellä? Pientä nasikkaa…

— Olen kai, herra kamreeri! Tuolla se poika makaa


heinäkuormalla. Se nukkui niin makeasti. Nostinhan tuon ylös, kun
istui ja itki tuolla maantien vieressä ruikuttaen väsymystä. Ehkä se
onkin oma poikanne?

— Niin on.

— Se väitti, tuota noin, ettei hänellä ole kotia, eikä mitään,


raukalla.

Korkealla heinäkuormalla nukkui Mikko Tiukkatuuli:

— Pyysikö hän päästä ajamaan sinun kanssasi?

— Eikös mitä! Eteenpäinhän se sanoi aikovansa. Siksi aikaa vaan


pyysi lepäämään heinäkuormalle, kun minä käväisisin siellä niin
Seppälässä. Palkkioksi tahtoi pidellä hevosta. Kun tulin takaisin, —
noin se makasi, nähkääs — ja nukkui. Ja annoinhan minä sen
maata!

— - Seuraavana päivänä tuli rehtori laskentotunnilla luokkaan.


Opettaja Lange tervehti ja hymyili. Rehtori hymyili myöskin ja astui
opettajain paikalle.

— Minun täytyy tunnustaa sinulle, Antti Bech, että me eilen


syytimme sinua väärin. Toveriesi pitää saada tietää, että et sinä ole
harjoittanut petosta; me erehdyimme. Omasta puolestani tahdon
vielä lisätä: olen kovin hyvilläni, koska entinen varma luottamukseni
sinuun täten vahvistuu, ett'et sinä voisi ryhtyä tällaisiin kepposiin. Ole
hyvä, Antti Bech, ja tule tänne!

Antti Bech astui opettajan luo.

— Minä pyydän sinulta anteeksi, koska olen tehnyt sinulle väärin.


Anna minulle kättä, niin minä tiedän saavani anteeksi!
Antti Bech ojensi kätensä.

Rehtori tarttui siihen toisella kädellään, ja toisella hän silitti


Antin kiharaista päätä.

— Niin, pojat, sanoi rehtori, kun Antti Bech oli mennyt paikalleen,
— näyttäkää meille, että te kaikki voitte seurata Antti Bechin
esimerkkiä — ja pitää kilpenne tahratonna.

Ovea lähestyessään sanoi rehtori:

— Mikko, seuraa minua hetkeksi!

Mikko Tiukkatuuli meni rehtorin mukana ulos ovesta pitkin käytäviä


kansliaan.

Hän seisoi taas tuossa kapeassa, korkeassa huoneessa, jossa


näkyi vaan tiukkoja kirjanselkiä seinillä. Rehtori Holst istui ja katseli
häntä.

Mikko Tiukkatuuli näytti laihalta ja kalpealta.

— No, Mikko! sanoi rehtori — kai sinä olet joka lauantai jäljentänyt
laskuesimerkkiä?

— Olen. Joka lauantai.

— Niin kai. Minä olen pyytänyt opettaja Langea opettamaan


sinulle yksityisesti kahtena tuntina viikossa laskentoa. Koeta tehdä
parastasi. Tutkinto on jo kuukauden päästä.

— Koetan.
— No, kai me nyt olemme yhtä mieltä siitä, ettei enää tapahdu
mitään petosta, Mikko?

— Kyllä.

— Silloin ei sinun tarvitse kestää sellaista päivää kuin eilinen oli.


Eikö totta, ethän sinä toista sellaista halua?

— En.

— Minä olen puhutellut isääsi, poikaseni. Me olemme siinä


uskossa molemmat, että sinusta vielä tulee kunnon mies! Hyvästi,
poikaseni!

Mikko Tiukkatuuli itki raivoisasti. Rehtori meni ovelle pojan luo ja


silitti hänen tukkaansa.

Mikko Tiukkatuuli nyyhkytti; rehtori odotti häntä menemään, mutta


pojalla oli jotakin sanottavaa, nyyhkytysten lomassa hän lopulta sai
äänensä kuuluville, hän kumarsi syvään, ojensi kätensä rehtorille ja
sanoi:

— Pa — aljon — kii — iitoksia!

Kotona oli päivällisruokana suuri, punainen häränpaisti, kastiketta,


puolukkahillaa ja perunoita, — vaikka olikin tuorstai, jolloin muuten
syötiin kalaa.
TAPPELUA.

Minä en väitä mitään. Minä vaan kysyn, mistä sinä olet saanut minun
laskuni — ellet sinä ole jäljentänyt sitä!

Näin Simo Selmer rehenteli koulun pihalla. Antti Bech seisoi


hänen edessään uhitellen.

— Katsoppas, Simo, se asia ei koske sinua.

— Vai ei. No, arvatenkin on se parasta.

— Sanoppas, mies, mitä sinä sillä tarkoitat? Mikä on parasta? Sitä


juuri tahtoisin kysyä, ymmärrätkös?

Simo Selmer katseli naureskellen poikajoukkoa. Koko luokka oli


kerääntynyt heidän ympärilleen.

— Ja minä vastaan, että lienee parasta, ell'ei ollenkaan enää tutki


koko juttua.

— Rehtori on sen kyllä tutkinut.

— Sen huomaan.

You might also like