Few Qs #10
-
Hi Spine Team What is the current status of this event-sourcing framework, is it production-ready, if any project/application/company is using it in production? Does it promote the Which databases does it support, does it implement the Outbox table pattern (which is useful for writing the events to Kafka)? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Good day, @cloudcompute! (We have migrated the issue you have created to Discussions section of our
At the moment, Spine is used in production in several projects since 2016. One of them is Pure Photos, which is an AI-powered solution for image processing. Some of the projects built with Spine, were delivered to our customers as private-cloud and non-public services. And we also use Spine extensively to build our own tools, such as a tool for managing digital assets. Someday, they will become public services. Just for the reference, mostly, the load handled by Spine-powered apps tops at about 100 req/sec. At the same time, the event stream size is relatively big, being billions of events emitted over the application lifespan. All apps running on top of Spine in production are now built around Spine 1.x (in which 1.9.0 is the latest release). At the same time, core Spine team is working on Spine 2.0, by embracing the feedback from the teams. In 2.0 we somewhat rethink and simplify things for developers, migrate closer towards using Kotlin on both client- and server-side, and also automate more stuff by leveraging code generation from Protobuf definitions. We expect to see Milestone 1 of Spine 2.0 later this year, and after that start creating an extensive documentation and promotion materials. Also, non-critical projects running on top of Spine 1.x will be migrated to 2.0-M1.
Among other things, Spine is built with Hexagonal Architecture principles in mind. For instance, databases and other storage solutions are just so called "ports", meaning the business logic does not depend on it, and has no idea what is underneath. As a developer, one may plug anything into In terms of programming an application with Spine, developers mostly deal with three things:
First two activities are free of coding per se, but from our experience, they are the most difficult things to master. Server-side works usually imply implementing the command and event handlers, absolute majority of which we recommend to have side-effect free. When it comes to integrating with, say, some 3rd-party API, the recommended approach is to have a dedicated Process Manager, documented and tested, so that any unwanted incoming data does not break the domain logic (sort of an Anti-corruption layer, if you will). Here, I can go into more detail, if that's what interests you.
Currently we have public implementations for Google Datastore (which is our choice of primary storage in production projects), RDBMS engines (we use MySQL and MariaDB, which are close relatives in terms of API), and we also experimented with Redis and Hazelcast, but we don't use them in production at the moment. As to Kafka, several years ago we have created an adapter for it. However, with all things considered, it was not a good fit for us at that point. Now, the "Outbox" pattern. In short, yes, our implementation is similar to its idea, but over time it has grown into something bigger, providing numerous things: signal de-duplication, ordering, guaranteed one-time delivery, catch-up (or event replay for projections), etc. Feel free to ask more questions, I will be happy to answer. |
Beta Was this translation helpful? Give feedback.
-
The response is in detail, thanks. Only one question.. As you said, the load handled by Spine-powered apps tops at about 100 req/sec, is the throughput not at a lower level? |
Beta Was this translation helpful? Give feedback.
-
I went through the code.. it is a very high-quality code. I'd certainly give it a try.
Is there any example? When is this write going to take place, would it be "after" an event is written to the event store db? Thank you |
Beta Was this translation helpful? Give feedback.
-
We don't have a Kafka-specific example, but I have modified our Hello sample app by illustrating how to plug a standalone event subscriber into a Bounded Context. In this example application, we have just one Bounded Context. And it is kept very simple, with just a single Process Manager, called The job of this When the application is launched, several things happen:
I have just appended another destination for If you need the domain events to be put into any external system, such as Kafka, this Hope it helps. Please feel free to ask further questions. |
Beta Was this translation helpful? Give feedback.
-
Thanks @armiol I will go through it. I want to write to Kafka There are many repositories in this I am looking forward to use Spine in a |
Beta Was this translation helpful? Give feedback.
-
You have raised several points, I will comment on them one by one, briefly. And then let's discuss those that interest you more, in more detail.
Again, many more things to cover. But I hope that's a good start. |
Beta Was this translation helpful? Give feedback.
Good day, @cloudcompute!
(We have migrated the issue you have created to Discussions section of our
feedback
repository, to make the conversation more convenient.)At the moment, Spine is used in production in several projects since 2016. One of them is Pure Photos, which is an AI-powered solution for image processing. Some of the projects built with Spine, were delivered to our customers as private-cloud and non-public services. And we also use Spine extensively to build our own tools, such as a tool for managing digital assets. Someday, the…