cortoproject / corto

A hierarchical object store for connecting realtime machine data with web applications, historians & more
https://www.corto.io
MIT License
87 stars 14 forks source link

Add an unknown type for insertion of partial trees #640

Closed SanderMertens closed 6 years ago

SanderMertens commented 6 years ago

Sometimes an application needs to insert an object (/foo/bar) while the parent (/foo) is not available yet. In that case, corto should allow for insertion of /foo/bar in a way that does not make assumptions about the /foo object (it's type).

Therefore, an unknown type should be introduced with which the foo object can be created. Once the actual foo object arrives (if ever) the unknown placeholder can be atomically replaced.

The replace operation will be cheap, since the new object can simply copy the red-black tree that holds the children of the placeholder.