Hi @JPL!
I’m sorry I couldn’t find the exact context of that question. I saw that you were talking about Sequence
vs Sequenced
, and I do understand that question so let me answer that one and hope it was the same. If not just shoot again
Up until now, the data types have been called [x]Data
. I agree that just as we say Mutable
or AppendOnly
, Sequenced
is what you’d expect, an adjective for the noun Data
. With [RFC] Data Types Refinement the aim for language simplification proposed removing Data
. It is one of those words that very easily become inflationary in use, and in the end just constitutes noise. That also implicated a move away from adjective + noun to just a noun: heading straight on target and describing the data type structure; such as Map
, or Sequence
, or Blob
.
More reasons to do this are found in [RFC] Data Hierarchy Refinement, where all the data types are in fact just structures with metadata and pointers to chunks
(the regular SAFE Network chunks). So, we describe the structure. Under the hood, all of them point to the same type of chunks (or actually, recursively to other structures).
Now, back again to what we have right now. Sequence
was just recently implemented, and as [RFC] Data Types Refinement (and CRDTs
, which were actually not an explicit goal at the time of that RFC) is implemented in increments, minimal discrepancy is sought. So, it is now called SequenceData
in code, even though it should suffice with Sequence
, once Map
and Blob
(the latter is still somewhat under discussion) have been implemented. I guess there you inevitably fall into a grey area when it comes to stringency while in transition, seems it ended up with SequenceData
instead of SequencedData
, which is less stringent currently but more stringent with final result.
What Bochaco said here. And also, wanted to nuance with some technical aspects of using a Map
data type (what MutableData
over CRDT
is becoming) instead of Sequence
for an NRS Map
:
Today, the full map content is serialised and stored as an entry in the Sequence
. If using a Map
, we could instead store only the specific change to an NRS Map
.
The simplicity of a Sequence
is that you have a snapshot of the entire state as it was, so the version of that NRS Map
as of that state change, is very simple to see.
The drawback of that is a wasteful resource usage, both in comms and in persistence (massive duplication of data).
A Map
data type can be designed to support version tracking for each individual key in relation to the overall version of the NRS Map
. There are some more steps to do it, but it’s not complicated really. And the benefit is that you can update/access individual keys (so more light weight comms), without duplicating data.