fishId is the unique identifier of a Fish. It is used to implement caching, in order to
improve performance of Pond-based applications. Whenever a Fish is observed via
Pond.run(), and it has already been observed previously, we can avoid aggregating all its events
again: Instead we just build on the previous state.
fishId is used for caching, it’s important that if two Fish have the same
they are really the same fish. We have split the id into three parts to make it easy to conform to
This should be a string describing what sort of thing the Fish expresses. It can be thought of as a namespace
for the string supplied as
entityType for a Fish that represents a user might be "User" or "Workstation".
A Fish may represent physical things or abstract concepts — whatever is needed — just like classes and objects.
The concrete thing represented by the Fish. In the example of a "User" Fish it would be just the username or user-id.
Sometimes there is just one Fish of an
entityType. In that case the name might be "singleton" or
A counter for logic changes in the Fish. Caching for Fish is persistent on disk. So when the program code of a Fish is changed, it must also be considered a different Fish. Since "entityType" and "name" will still be the same, there is a plain version counter to identify code changes.
You should never lower the version number.