Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable optional event persistence #150

Open
andrewlangston opened this issue Oct 25, 2024 · 1 comment
Open

Enable optional event persistence #150

andrewlangston opened this issue Oct 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@andrewlangston
Copy link

Is your feature request related to a problem? Please describe.
Snowplow Micro appears to store events entirely in memory using two lists: one for good events and one for bad. As events are stored in memory, they are not persisted beyond the lifecycle of a Snowplow Micro container.

This can pose challenges to customers using Snowplow Micro to test schemas quickly and locally by mounting them to a Snowplow Micro container. Because the container must be stopped and restarted to pick up changes to a schema, any in-memory events are lost, and comparison of pre- and post-schema-change events becomes difficult.

Describe the solution you'd like
To improve the above experience, we propose that Snowplow Micro expose optional configuration, disabled by default, to persist events to a lightweight, embedded, and file-based database system such as MapDB or SwayDB. Storing events in this way would allow users to persist events beyond the lifecycle of a single container through the use of a volume mounting the DB file.

Describe alternatives you've considered
We briefly considered a weightier approach using an additional component/container for data storage (DB server, Redis, etc) - but we believe this to overcomplicate the Snowplow Micro development experience. Since Micro is not meant for production use, a file-based persistence system seems most transparent, portable, and potentially simplest to implement.

Additional context
N/A

@andrewlangston andrewlangston added the enhancement New feature or request label Oct 25, 2024
@colmsnowplow
Copy link

👋 Interesting suggestion! You wouldn't get the nice UI experience this way, but in case you don't know about it, --output-tsv will print the events to terminal. So if you run Micro with:

docker run -p 9090:9090 snowplow/snowplow-micro:2.1.2 --output-tsv > output.tsv

Then you'll get the events in a file. Appreciate that comparing events in a text file isn't the nicest experience in the world, but it might be useful to know that a clunky version of the workflow you're describing can be done this way. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants