Skip to content

Commit 7b3f67d

Browse files
committed
doc: Call out TOCTOE, it is for real
1 parent 8adc030 commit 7b3f67d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/service-api-vs-rest.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,12 @@ Unlike blocking HTTP calls, Leopard’s NATS requests can:
131131
Adopting a consistent naming convention for subjects is crucial. This can be a challenge in large teams.
132132
NATS can support a massive number of subjects. But to avoid confusion, subjects should have
133133
clear, descriptive names that reflect the service and endpoint purpose.
134-
There could (should?) be a central authoritative
135-
document that defines the subject structure and naming conventions.
136-
There should also be a "registry" of subjects,
137-
that can be queried by developers to discover available subjects.
138-
This can avoid confusion and ensure that all developers are on the same page and not conflicting with one another.
134+
Even though NATS service API exposes auto-discovery, there could (should?) be a central authoritative
135+
document that defines the subject structure and naming conventions. This can avoid the TOCTOE issue.
136+
(You check for a subject, it's not used, but then someone implements it in the meantime.)
137+
That leads to: there should be a "registry" of subjects, that can be queried by developers
138+
to discover available subjects. This can avoid confusion and ensure that all developers are on the same
139+
page and not conflicting with one another.
139140

140141
== 6. What, then?
141142
Leopard’s NATS ServiceApi framework offers a powerful alternative to REST:

0 commit comments

Comments
 (0)