3 ms·
The more I think about it, the more an entirely event based app makes a lot of sense (these days). I'm not sure what the design methodology is called but there'
by whalesalad 14y ago
The more I think about it, the more an entirely event based app makes a lot of sense (these days). I'm not sure what the design methodology is called but there's a concept where an app's state is essentially determined purely based on events. So without the history, current state is lost. But... A lot of benefits come from this. For example, you can essentially replay your app from day one to any point later on in time.
Your comment made me think of this. I would have recently been in a similar scenario but fortunately I built some internal event tracking early on. It's also a rails app. So every action is tracked using some simple observers. There are subclasses of Event for types like UserRegistrationEvent, etc... Anyway long story short I can essentially replay history by using these events and build, for example, notifications for those events or mixpanel tracking data - retroactively.
It was a fortunate design decision and has ended up really showing its value a number of times. Push notifications hook onto these, tracking credits for our game component, etc...
Edit, I think that the concept I was referring to is called Event Sourcing.
Some resources: http://martinfowler.com/eaaDev/EventSourcing.html http://martinfowler.com/eaaDev/EventSourcing.html
Event Sourcing ensures that all changes to application
state are stored as a sequence of events. Not just can
we query these events, we can also use the event log to
reconstruct past states, and as a foundation to automatically
adjust the state to cope with retroactive changes.
And also:
http://krasserm.blogspot.se/2011/11/building-event-sourced-web-application.html http://krasserm.blogspot.se/2011/11/building-event-sourced-w...
- revorad 14y agoThat sounds pretty awesome. It kind of reminded me of doing operational transforms on collaborative documents.
- another 14y agohttp://www.cs.cornell.edu/fbs/publications/smsurvey.pdf http://www.cs.cornell.edu/fbs/publications/smsurvey.pdf
- steveklabnik 14y ago> So every action is tracked using some simple observers. PSA, as of Rails 4, observers have been extracted to a plugin: https://github.com/rails/rails-observers https://github.com/rails/rails-observers