micro-service-foo.dev · service 1 of 3 · v0.1.0 · status: up
foo
Responsibility: say foo.
That is the whole job. foo does not say bar; there is a
separate service for that.
foo does not know what you are naming. It only knows that something needs a name
before it has a real one, and that the first such name is, by long habit, foo.
Contract
| Endpoint | Returns |
|---|---|
GET /word.txt | foo and a newline. text/plain. |
GET /health.json | Status, version and the word. JSON. |
GET /service.json | This contract, machine-readable. JSON. |
$ curl -s https://micro-service-foo.dev/word.txt foo
Upstream: none. foo starts first.
Downstream: bar starts after foo and assumes foo exists.
Supervisor: minimal-supervisor.dev, strategy rest_for_one.
If foo restarts, bar and baz restart too.
Service level
foo is a static file. If you can read this, foo is up. If you can’t, foo can’t tell you, because a static file can’t report its own death. Noticing that is the supervisor’s job.
foo has never once said anything other than foo.
Provenance of the word
RFC 3092, “Etymology of ‘Foo’”,
was published on 1 April 2001. Its abstract says that approximately 212 RFCs had used
foo, bar or foobar “without any proper explanation or definition”.
It traces the word to Bill Holman’s 1930s comic strip Smokey Stover, to WWII radar
operators’ “foo fighters”, and to the MIT Tech Model Railroad Club (TMRC) dictionary, which it quotes:
Foo: The sacred syllable (FOO MANI PADME HUM); to be spoken only when under obligation to commune with the Deity. Our first obligation is to keep the Foo Counters turning.
Sources disagree on the spelling. Wikipedia’s Foobar article quotes a 1959 TMRC dictionary entry as “foo mane padme hum”. RFC 3092 gives “FOO MANI PADME HUM”. foo has not settled this. The same Wikipedia article puts the earliest documented programming use in “a 1965 edition of MIT’s Tech Engineering News”, while also crediting TMRC around 1960.
The system
- foo: you are here. Says
foo. - bar: says
bar. - baz: says
baz. - minimal-supervisor: watches the three and assembles
foo bar baz.