olange / data-pipes

A set of invisible yet fabulous components to access data
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Metadata description #16

Open olange opened 5 years ago

olange commented 5 years ago

Find a way to attach metadata to our data-structures.

Directions

Attach a metadata Symbol to data-structures. Use only native objects (Boolean, Number, String, …) to represent terminal values, instead of built-in primitive values – see first comment hereafter; good idea, but they do not pass in/out workers.

Motivation

olange commented 5 years ago

Note that Symbol-properties do not get passed in/out workers by the structured clone algorithm (see Experiment 03 in olange/learning-service-workers), because they are not enumerable properties.

So if we would use a Symbol-property for the metadata and if we would implement the data-pipes as a service worker and sub-workers, then we would need to pass them as ordinary properties and eventually prune/graft them as Symbols upon reception in the browser context.