Updated Design: Persistable Context (markdown)

Kazuki Nakanishi 2018-03-20 17:18:13 +09:00
parent 843add386a
commit 6a57a29281
1 changed files with 21 additions and 1 deletions

@ -148,4 +148,24 @@ flow.get("foo.bar"); // return 1
```
> HU: Persistable Context do not support this.
> If there are some problems, we will consider how solve those.
>> DCJ - Agreed for version 1.
>> DCJ - Agreed for version 1.
* key name of default storage
In the case that `file` is not declared but `default` is declared on contextStorage, if a context data is specified like `$file.count`, Node-RED stores the key name in the default storage.
In this case, there are two options for storing the key name.
1. `$file.count` (The whole name that a user specified)
Pros: Name confliction can be avoided.
Cons: The rule will become complicated especially when a user directly accesses to the context data (e.g. on redis).
2. `count` (The key name without storage name)
Pros: Store a key name in the same rule of the other context storage.
Cons: If a user uses a same key name for the different storages, name confliction will occur.
My proposal is as follows. Do you agree with this option?
- Choose the option 2.
- Encourage a unique key name by writing it on design note.