Giter Club home page Giter Club logo

Comments (7)

rofr avatar rofr commented on June 3, 2024 1

One entry per line is a nice-to-have feature. Even without line breaks the journal is accessible for both humans and tools that understand json. The value of json compared to binary format is primarily interoperability and flexibility. JSON can be parsed, interpreted, manipulated, transformed, read, pretty printed using any platform/language that can handle JSON. If we can have one entry per line as well, and I don't see why not, then let's do it!

from memstate.

goblinfactory avatar goblinfactory commented on June 3, 2024

I assume what we're supposed to see is something like this?
screen shot 2018-03-06 at 20 14 30
json-example-1line-per-journal-entry.journal.txt

Files have been renamed from xx.journal to xx.journal.txt so that they can be uploaded. Journal extensions are not supported by github.

from memstate.

rofr avatar rofr commented on June 3, 2024

Note also that the actual journal contains 3 arrays (JournalEntry[]), with a single JournalEntry in each. This is due to the group commit behavior: commands arriving at a high rate are accumulated and written in batches to the underlying storage. In the test code above, each command is awaited before the next is written resulting in a single entry per batch.

from memstate.

goblinfactory avatar goblinfactory commented on June 3, 2024

this comes back to my earlier comments about capturing more information with the "features". I.e. without knowing what is the intention behind having a text file we can't tell if the behaviour is correct or not.

I was working on the assumption that json format files are useful because they are human readable and can act as a logfile that can be used for debugging.

If the behaviour you want is to write batches to single lines that humans cannot read, then shouldn't you make that "intention" clear in the tests/requirements/feature notes? Also it would be helpful to understand what the expected use case is for json text files with single line batches.

in other words I can't even tell whether this issue should now be closed because of what you've stated above? I created this issue because when I spoke to you a few days ago you said that the json format should write 1 entry per line.

from memstate.

goblinfactory avatar goblinfactory commented on June 3, 2024

Txs, will take a look at this in the morning, A

from memstate.

goblinfactory avatar goblinfactory commented on June 3, 2024

I'm going to label this as a feature request, and tweak the title so that it doesn't look like a bug, which it isn't.

from memstate.

goblinfactory avatar goblinfactory commented on June 3, 2024

I'm going to close this. I think it's a nice to have but currently a low priority and the tests and notes are no longer in line with the current code. @rofr you can re-open if you want to keep this here but thought you'd appreciate cleaning out any false negative issues.

from memstate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.