2 ms·
> 2. you actually don't care about schema that much (e.g. logs) I would argue that this is one of the most overlooked cases _for_ schemas, because it's where s
by kthielen 8y ago
> 2. you actually don't care about schema that much (e.g. logs)
I would argue that this is one of the most overlooked cases _for_ schemas, because it's where schemas are the most complex and also where traditionally we've had few options for really representing that complexity.
This is something I've tried to change with the hobbes project, where we have a small header-only lib to efficiently record "log data" with inferred schemas into shared memory:
https://github.com/Morgan-Stanley/hobbes#storage https://github.com/Morgan-Stanley/hobbes#storage
Basically, in this view, the type for recorded log data is a variant over all possible log statements in an application. This is a very large and complex type, but in memory or on disk it's a simple representation -- a number for the constructor ID of the variant, and then the payload type that corresponds to that constructor.
Then there's quite a lot that we build on top of that, but as a basic primitive I think that logging is actually a great case for "extreme schemas" rather than throwing out schemas entirely.