7 ms·
Wolkenkit 3.0 – a CQRS and event-sourcing framework for JavaScript
- ziont 8y agowhen do you use cqrs/es ? is this like Datomic?
- spoudaia 8y agoTo cut a long story short: Event-sourcing as a persistence mechanism, where you store deltas instead of the current state, similar to what Git does. CQRS is a pattern to separate the write side from the read side of your application, with the goal of being able to scale both independently of each other. Regarding Datomic: I'm not an expert for Datomic, but AFAICS Datomic is primarily a database, while wolkenkit is an out-of-the-box full-featured framework for business logic, storage and so on.
- jen20 8y agoJust to clarify here: event sourcing is _not_ what Git does at all. Git stores complete snapshots of objects, not diffs [1]. Event sourcing itself is a fairly straightforward concept which the parent does sum up though - store events which describe what happened to an entity in a system rather than the resulting state. The state of an object can be derived via application of a left fold over the history. [1]: https://willi.am/blog/2014/10/14/for-the-last-time-git-stores-snapshots-not-diffs/ https://willi.am/blog/2014/10/14/for-the-last-time-git-store... - this is the best reference I can find quickly, though the git manual would obvioiusly be more authoritative.
- goloroden 8y agoAs said, "similar" to what Git does ;-) Conceptually, it's still capturing the deltas, instead of storing the current state and overwriting it. Storing the history is the key ingredient here, and of course, there are differences in how to achieve this.
- jen20 8y agoI would argue that there is a fundamental difference between the two: one stores the state and calculates the deltas, and the other stores the deltas and calculates the state. Both are common in systems, but only the latter is event sourcing - at least if the definition is to have any use and not become overloaded.
- linkmotif 8y agoYeah every time people say Git stores deltas it’s sad because the fun thing about Git is that it DOESNT store deltas.
- treve 8y agoThe text-book example for event-sourcing is accounting. To calculate the current balance of an account, you add up all past transactions. You don't need to store the balance (state) because you can deduce it by replaying all events. This gives a few nice advantages. For example, with this system in hand you can now also ask "What was the balance 30 days ago".
- bengale 8y agoThis is the one that you can't use for commercial projects?
- goloroden 8y agoYou can, as long as you open-source your commercial project's source code, according to the AGPL 3.0 license. If you don't want to do this, you need to get an enterprise license, which does not neccessarily mean to buy one: There are other options as well (sponsored development, …). For details, please contact us directly using hello@thenativeweb.io PS: I'm one of the core developers of wolkenkit.
- bengale 8y agoInteresting. I briefly looked at this a few weeks back and didnt look much further when I saw the box listing enterprise agreement or something like that for commercial use. I’ll take another look!
- hbbio 8y agoVery funny, since we tried this... 6 years ago. At the time, HN reaction was: https://news.ycombinator.com/item?id=3931525 https://news.ycombinator.com/item?id=3931525 And you know what? It was true. We changed the licensing to MIT for most of Opa (http://opalang.org http://opalang.org), but maybe a bit too late.
- goloroden 8y agoBut what other options than going dual-license do you have if you want to do open-source in a sustainable way? MIT does offer nothing here, unfortunately.
- hbbio 8y agoThere are many good business opportunities if your open source technology, without strings attached, gets popular. You could just sell professional support as part of subscriptions and verified builds. Later on, when you release a new version, you can still support the previous one or build migration tools that you include with subscriptions, etc.
- hknd 8y agoLooks really interesting. Are there any companies using this in prod already? Or any load experiment numbers? Proving that this actually is a "scalable real-time API"?
- goloroden 8y agoThanks for your nice feedback :-) Yes, it is already running in production, but due to NDAs, unfortunately I can't provide any details here. Regarding the scalability most is prepared, but there are still a few things that need to be done. We would be more than happy for anyone who wants to contribute or to sponsor us. For details see https://github.com/thenativeweb/wolkenkit/issues/90 https://github.com/thenativeweb/wolkenkit/issues/90
- pibi 8y agohttps://www.wolkenkit.io/#getting-started-test-drive https://www.wolkenkit.io/#getting-started-test-drive I don't see any messages in my network console, so it seems the message form is actually not really sending anything and the app is not a real wolkenkit app. Am I right?
- goloroden 8y agoThe getting started part is only simulated, to actually get started, please see https://docs.wolkenkit.io/3.0.0/getting-started/creating-your-first-application/setting-the-objective/ https://docs.wolkenkit.io/3.0.0/getting-started/creating-you...
- tchaffee 8y agoFrom the home page: "wolkenkit is a CQRS and event-sourcing framework for JavaScript and Node.js which fits perfectly with domain-driven design (DDD). It provides the technical foundation for your application, including an event-store and a scalable real-time API. This allows you to focus on what's essential: Solving actual real-world problems in no time." I've been a developer for decades and this means almost nothing to me. I'm sorry if this comes across as harsh - I'm just trying to be helpful. What's your elevator pitch for this product? I'm not looking for CQRS because I don't know what it is. How many more people might you attract to your product if you could translate your pitch into how it benefits me? It's really hard coming up with your one-liner in plain English. But every time I see a one-liner that means very little to me as a programmer (which is unfortunately most projects), I encourage folks to put in the effort. Otherwise, I just skip over it and move on. And I'm guessing I'm not the only one. Here's a one liner I think works well: "React: A JavaScript library for building user interfaces". I hope that helps.
- goloroden 8y agowolkenkit: A JavaScript framework for building scalable APIs that use historical data We have had a very hard time to grasp what's special with CQRS and event-sourcing, and to put it into a one-liner, but basically, I agree with you.
- tchaffee 8y agoThat's so much better. Now I know what it does. I know whether or not to read on. But I would also throw a benefit or two in there. Why should I use a framework (or your framework specifically) if I want to build a scalable API that uses historical data? And the next step is putting your one-liner everywhere that people first come across your product. On your website main page, and especially at the beginning of blog articles. I guess this is becoming enough of a pet peeve of mine that I should write about it myself and give examples of good vs. bad and why to do it.
- goloroden 8y agoWell, the point here is: The reason why you should use it, because of the benefits of CQRS and event-sourcing – and unfortunately, at this point, I think you need to get your feet wet and learn about these concepts ;-) Maybe https://docs.wolkenkit.io/3.0.0/getting-started/understanding-wolkenkit/why-wolkenkit/ https://docs.wolkenkit.io/3.0.0/getting-started/understandin... is a good place to start.
- boubiyeah 8y agoThat header animation was cool only the first 50 times I saw it
- tomphoolery 8y agoLove how the "Getting Started" to Wolkenkit doesn't even have any tangible code until page 3. If your quick start guide can't even get to the point until halfway down the page, I'm gonna bet that your framework isn't very user-friendly. Also, can anyone tell me what this even does? I've been clicking around and besides a bunch of vapid "philosophy" documents I can't figure out what the fuck anyone would use this for...
- akiselev 8y agoAs others have said on this page, event sourcing is one of those technologies where if you don't know what it is, you certainly don't need it. Even if you do know what is, you usually don't need or want it unless you have no choice. In event sourcing, instead of having stateful objects, you have a log of events that you use to build that state. It gives you powerful rollback, backup, and history features at the expense of some insane code complexity (usually solved by tooling). When paired with CQRS, another architecture separating reads and writes in your abstractions, and done well with events that are domain oriented ("AccountingReconciliationStarted" instead of "StartButtonClicked"), you can hide most of the code complexity and allow developers and less technical users to focus on domain complexity (i.e., the logic that matters to the real world). At least in theory.
- elcritch 8y agoWhy the insane code complexity? Yes there can be a lot of complexity in storing the events but using Kafka or similar event stores which provide libraries for handling the connection details should remove most of that complexity. Then your code can essentially be written as a map-reduce. Add a stream filter and it can easily be transformed to/from a Redux event system to a business one. Perhaps if your codebase didn’t build on a streaming architecture it would necessitate a lot of advocacy code.
- z3t4 8y agoWhy does libraries like this insist of using a query language similar to SQL rather then map, reduce, filter that are more like JavaScript!? Or is SQL so much better ?
- Yuioup 8y agoCQRS and Event Sourcing ... run away, run far, far away.