Comments (7)
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.
I assume what we're supposed to see is something like this?
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.
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.
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.
Txs, will take a look at this in the morning, A
from memstate.
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.
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)
- Use asynchronous enumerators
- Implement and submit a todobackend
- Use case to sync SQL server with memstate HOT 1
- State of the project and future plans
- Journal restore fills command fields with null HOT 1
- has easy way to add new Storage Backend like sqlite? HOT 2
- Use callbacks for setting properties on settings objects
- Update QuickStart sample code Commands to not hide base ID property so that command can be immutable
- Getting started documentation is out of date
- Error during serialization using Json serializer HOT 1
- Tool to convert an OrigoDB journal to memstate
- Subscription or CommandExecuted event HOT 5
- Status? Dead, abandoned or? HOT 3
- Nuget package older than source HOT 3
- Update project files to use PackageLicenseExpression HOT 1
- Are command GUID really mandatory? HOT 5
- ToDoMVC needs fixing and upgrading HOT 7
- Replace sample code with embedded `MarkDownSnippets` to guarantee code is current and code works HOT 1
- Add nuget and build status badges HOT 1
- Improve EngineBuilder error message HOT 15
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 memstate.