akka / akka

Build highly concurrent, distributed, and resilient message-driven applications on the JVM
https://akka.io
Other
13.02k stars 3.59k forks source link

Journal migration tool #16332

Open ktoso opened 9 years ago

ktoso commented 9 years ago

Just an idea for now, but perhaps a rather useful one.

The following question comes up sometimes on akka-user: "I need to change my journal, because X-DB sucks and I need to use Y-DB now". Using the new read side we could simply "read all events" and store them to the other journal.

This depends on two features:

With the above two things in place, this should be rather simple to implement - or document.

patriknw commented 9 years ago

Some additional (overlapping) input.

Rewriting the persistent event history is not encouraged, but sometimes needed. E.g.

This probably a tool that is run offline with real system shutdown.

devluencer-089 commented 9 years ago

Such a tool would be great. Here are some thoughts how and why I would use such a tool in my current project.

Hope this helps to tailor the implementation if you decide to support such a tool.

devluencer-089 commented 9 years ago

almost forgot:

patriknw commented 9 years ago

@michaelom thanks for great feedback

scullxbones commented 9 years ago

The first custom query I implemented was the all events (aka event firehose), this makes a lot of sense.

Something else to consider is possibly exposing the write side of journals as a sink, mapping the event envelopes into atomic writes.

patriknw commented 9 years ago

I agree that a stream based PersistentWriter would be nice. Also mentioned in #15667

patriknw commented 8 years ago

I think the building blocks are in place to implement this, and can also be done by end user (or external library). A PersistentActor can work as the writer, and integrate with streams using mapAsync and ask.

ktoso commented 5 years ago

Technically may be revisited once we revisit "projections" tooling so keeping this open even though inactive since a while. Feel free to close if that would be better tho