4 ms·
Structured data is very useful. Just because many unix folks have managed to extract some meaning out of random text for so long doesn't mean it's a good idea.
by lucian1900 12y ago
Structured data is very useful. Just because many unix folks have managed to extract some meaning out of random text for so long doesn't mean it's a good idea.
This is the same thing I see about HTTP/2. It's good to finally remove a huge number of parsing errors and inefficiencies!
- edwintorok 12y agoI'd be less opposed to journald if it used SQLite instead of its own format, but I still think that logs don't belong in a binary file by default: https://news.ycombinator.com/item?id=7210570 https://news.ycombinator.com/item?id=7210570
- KayEss 12y agoThe problem with sqlite for this is that as you write more and rows into a table then the writes get progressively slower -- it simply isn't able to do O(1) writes over a long period of time so you'd have to rotate the database files themselves. I've been solving this problem by writing a non-pretty printed JSON blob to one line in a log file. Structured, but still text and very easy to stream. I build a separate binary index that gives more efficient time based lookups, but it isn't needed to understand and process the log file.
- edwintorok 12y agoDid you release your code that does that?
- KayEss 12y agoNo. It's in a monitoring system we've been working on, but the principle is pretty simple. We may well end up open sourcing quite the rest of it sometime in the future -- a lot of the code already is.
- EmanueleAina 12y agoPeople already complain about systemd dependencies, I'm sure pulling in SQLite would have generated more complaints than a quite simple custom binary format. :)