I've played around recently with a Redux inspired frontend architecture where the complex, nested reducers are replaced with a single one that simply adds every action to an immutable linked list (i.e, `(state, action) => ({state, action})`. This means all the business logic that would normally live in reducers can be moved over to memoized selectors, which fixes the awkward difference in how reducers and selectors a…
If actions are fully deterministic, a list of actions is isomorphic to a list of events: you can always determine what happened by looking at what was requested. A list of all past states avoids the determinism problem, but the consequence of each action is only implicit in the difference between two states. For event sourcing, "the state" is the list of events, and what you're calling "the state" is just another sel…
EventStore: Open-Source, Functional Database with Complex Event Processing in JS
51–60 of 64 posts
Re: EventStore: Open-Source, Functional Database with Complex Event Processing in JS
#52Earlier quoted context omitted.
This mirrors exactly the way I've been approaching redux recently as well following the same realization. I feel like this is much cleaner and easier to reason about.
Hi, I'm a Redux maintainer. Got any examples of this? Also, how do you feel it's better than a typical Redux app setup?
As it moves all the focus from reducers to selectors, and has quite different requirements for how to do caching there, it’s led me to work on a custom selector library with quite different API from reselect/re-reselect. I’d like to release it when my experiments start to feel... less experimental.
Re: EventStore: Open-Source, Functional Database with Complex Event Processing in JS
#53Re: EventStore: Open-Source, Functional Database with Complex Event Processing in JS
#54Earlier quoted context omitted.
Oh I see I misunderstood then. But still, how is this a database? Without looking into it too much it seems that would either be an ORM or simply state.
A database is simply an organized collection of data with a restricted interface for accessing and/or querying said data. This seems to qualify.
Re: EventStore: Open-Source, Functional Database with Complex Event Processing in JS
#55Earlier quoted context omitted.
A database is simply an organized collection of data with a restricted interface for accessing and/or querying said data. This seems to qualify.
Should we call PANDAS a database?
Re: EventStore: Open-Source, Functional Database with Complex Event Processing in JS
#56It's not a new concept.
There is however benefit to modelling a system in that way and not just an internal transaction log. I have done many talks on the subject and you should be able to pull one up on youtube etc fairly quickly (its a bit much to go through in a comment).
Re: EventStore: Open-Source, Functional Database with Complex Event Processing in JS
#57Event Sourcing seems like the ultimate YAGNI architecture. You make an architecture that optimizes for future features at the expense of a coherent flow for the current features that you know you have. it's like if you made pub-sub the core architecture for your system. very actor-system like, but also probably harder to understand the runtime behavior - control flow.
I’ll admit it’s probably harder to debug than a monolith, but that’s true of any distributed system.
Re: EventStore: Open-Source, Functional Database with Complex Event Processing in JS
#58Earlier quoted context omitted.
I think your question is answered here: https://eventstore.org/docs/event-sourcing-basics/event-stor...
Oh I see I misunderstood then. But still, how is this a database? Without looking into it too much it seems that would either be an ORM or simply state.
Re: EventStore: Open-Source, Functional Database with Complex Event Processing in JS
#59I do event sourcing in my company and we had a look at this when we started out 4 years ago. What I don't understand is why build a database? Why not build something in the application layer that uses your fav database as a storage mechanism instead? Aren't the existing databases more mature and better to use?
There are a lot of non-trivial aspects to scaling event sourcing systems. Particularly if you want atomicity or asynchronous two-phase committing. Having implemented them ~5 different ways for different services at my startup, I’d definitely welcome a reliable DB-level abstraction.
Re: EventStore: Open-Source, Functional Database with Complex Event Processing in JS
#60Earlier quoted context omitted.
Hi, I'm a Redux maintainer. Got any examples of this? Also, how do you feel it's better than a typical Redux app setup?
For me it’s been experimental so far. I’ve not actually used Redux in these experiments, but I’m inspired by where Redux and Re-reselect has been leading me for the past two years or so. The pattern is a gold mine of interesting implications that I’m still discovering, such as real time collaboration, and speculative precomputation/prefetching. As it moves all the focus from reducers to selectors, and has quite diffe…