Comments (8)
The main thing that this prohibits again is arbitrary binary records. I understand that's not the primary purpose at this point β it just seems like missing out on use cases oklog would do a great job at.
Of course we could just do escaping when writing to disk. We will be back at having to process every single character though, rather than quickly returning full records without introspection.
I wonder how common the use case of inspecting files directly is. As there are no placement guarantees, going to any given node will just give me a random subset of records. So one would rather go back to query tooling shipped with oklog, which will recover the newlines.
If one does want to interact with files directly, one could imagine an oklog cat
command that does the same. It would be one level of indirection of course, i.e. oklog cat myfile | grep ...
. The question is then whether it's reasonable to assume that the oklog
binary is available. On the machine itself most certainly, on local machines it requires a go get ...
at least.
from oklog.
Another first-class property of OK Log is that the final segment files on disk are human-readable and greppable. I wouldn't give up this property lightly. I would be much more strongly in favor of using length-delimited records for all inflight operations, and reserializing to \n-delimited on final write. Is this too much of a compromise? Is my goal of plain-greppable log files on disk silly?
from oklog.
Itβd be useful to clearly describe some operational (or other) scenarios where the current on-disk plain text encoding is an advantage.
from oklog.
The advantage has always been conceptual: you can still back up, grep, and analyze your logs as files-on-disk with your favorite UNIX tools, independent of the OK Log apparatus on top. You just gotta deal with a weird bunch of letters and numbers at the front of every line.
from oklog.
Another thing to consider is probably that we also touched on a other features (e.g. replica indices) that may require extra metadata. Of course that can also be represented as text, but there could definitely be more things that would move away from the disk format being 100% obvious clear text.
from oklog.
Not sure if it's relevant here, but I wanted to throw in that delimiting records with \n
is dangerous in real-life. What would happen when a client logs a stacktrace, where one log entry consists of multiple rows?
from oklog.
OK Log defines log entries (log records) as single-line, as an invariant of the system.
edit: In the context of this issue, the above comment is counterproductive.
from oklog.
I would like to voice my support for having length-delimited records. I also like the suggestion of having an oklog cat
command, which reminds me of the zcat
command.
from oklog.
Related Issues (20)
- Panic: short record HOT 2
- Add first-class concept of topics HOT 11
- Extend record identifier HOT 9
- Long-term storage
- Docker repo doesn't contain recent releases HOT 4
- network HOT 3
- forwarder mangles bare percent signs HOT 2
- Integration with Fluentd HOT 1
- bufio.Scanner: token too long HOT 1
- Log records can be stored in wrong order HOT 8
- Implement optional text indexing for faster queries
- Implement token based access control
- Compacter writes too much data to disk HOT 1
- Proposal: Create ULID from timestamp contained in record HOT 1
- Local node unable to connect to self after netowrk change
- Unable to "make install" using the tar.gz package and no oklog command found HOT 2
- What's the best way to test the cluster in large installation is working
- How oklog stores data?
- Web UI Improvements
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oklog.