5 ms·
It isn’t that contradictory. You can have data in a functional language. One of the common features of a functional language that separates it from imperative i
by lojack 8y ago
It isn’t that contradictory. You can have data in a functional language. One of the common features of a functional language that separates it from imperative is data immutability. In this case it’s a database of immutable data. I personally understand exactly what they’re talking about when they call it a functional database.
- kyleperik 8y agoI don't understand how this is useful. The purpose of functional programming isn't to make everything immutable, but to use immutability to prevent unnecessary change of state which can result in flaky code. So where's the usefulness in a functional Database? Also this still isn't functional. Is adding records to a set not mutation?
- fulafel 8y agoI don't know anything about EventStore, but immutability and databases go surprisingly nicely together. Mash together versioned data and persistent data structures, and you get to store history efficiently (and can have separate operations for excising history). See eg Datomic.
- federicoponzi 8y agoI think your question is answered here: https://eventstore.org/docs/event-sourcing-basics/event-store-as-a-functional-database/index.html https://eventstore.org/docs/event-sourcing-basics/event-stor...
- kyleperik 8y agoOh 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.
- naasking 8y agoA database is simply an organized collection of data with a restricted interface for accessing and/or querying said data. This seems to qualify.
- eithed 8y agoThink about it as database of function calls, ordered by creation time. I'd however call it a log rather than a database - there will be a state your data achieves, but ES becomes the source of truth . DB can still used to contain the current state (however is not needed as ES tracks its own state) and data can be dropped from DB without repercussions, if you don't mind replaying events and have a separation of events that deal with setting data / performing external actions (like sendin emails for example)
- bauerd 8y agoThey should make this more prominent, now I get what it does Edit: Is a backup mechanism implemented? It's for persistent data, right?
- dustingetz 8y agogit is a functional database, well almost. Datomic is what you get when you finish that idea. it does mostly all the same sorts of things postgres does, but like git, the strength is it has idealized caching at all layers and scales horizontally / serverless. it is also just better (do you know anyone who thinks git sucks and wants to go back to SVN or CVS?)