Some seconds after the last post, @paraseba commented that a text version of this notation may be even more helpful.
Here it is:
$
means provided by some interaction with redis.*
means provided by user.key
represents a redis KEY with the value set bySET
.(listkey)
represents a redis LIST with elements manipulated byLPUSH
and so on.{hashkey [key values]}
represents a redisHASH
with data set byHSET
orHMSET
.#{setkey data}
represents a set or sorted set.as $varname
may be used for situations whereINCR
is used to generate an ID.
The last post user creation process may be written as:
1
2
3
4
5
users:next as $uid
{users:$uid data}
#{users:pending:confirmation $uid)
#{messages:welcome $uid}
(users:send:mail *mail)
An instance of this process would be:
1
2
3
4
5
users:next ;; suppose 21 as result
{users:21 [name Abraao mail somemailhere@gmail.com status pending-mail-confirmation]}
#{users:pending:confirmation 21)
#{messages:welcome 21}
(users:send:mail somemailhere@gmail.com)
It is the form I’m using as doc strings in a namespace. It looks great with Marginalia.