Posted on June 07, 2016

Spine 0.4.1

Core Java

Features & Improvements

  • Starting from 0.4.1 version Spine supports integration events. An integration event is sent between loosely coupled parts of a system. BoundedContext now is IntegrationEventSubscriber and it is possible to post integration events using BoundedContext.

  • As events may have multiple subscribers that register and “listen” them, in the new release we renamed event handlers to event subscribers.

  • Now you can use a target version attribute of the CommandContext. The attribute indicates a version of the entity for which this command is intended.

  • The context parameter in event subscribers and command handlers used to be required in the previous versions of the framework. Now it is optional.

  • The ProjectionRepository catch-up is now supported. So, once switched to the 0.4.1 version of the framework, you will be able to update projections from the event stream obtained from the EventStore.

  • If you would like to gather statistics on errors and invalid commands, you can do so with the new release. Invalid and unsupported commands are stored with the error status to make further analysis.

  • In this version, we interjected a wrapper that tames the inscrutable and continuously changing cloud application — the ClientService — facade for client apps. Create a ClientService using builder with multiple BoundedContexts and use it to post commands.

  • This is fairly cool, we made Storages multi-tenant! To make multi-tenancy obvious, use TenantId instead of Namespace for multi-tenancy support.

  • When you are writing or rewriting an enterprise application, there are going to be parts of the system that facilitate the business but are not core to the business. For example, in most businesses there is a concept of tracking time. That is why we added a new type definition in Protobuf — Work. This type represents the amount of work done in minutes.

  • Similarly to Work type, we added URL definition in the Protobuf. The URL can be defined in raw string form or as a structured parsed record. To support the new type there is a QueryParameters — the utility class, which helps to perform URL query parameters parsing and String conversion. And one more utility class — Urls, which simplifies working with URL. It provides all necessary operations, such as conversion and validation.

  • To make current time obtaining more abstract and do not use the one from the Protobuf, you can publish the testutil project and add Provider interface.

Below let us list the issues that, however, no longer endanger your development process.

  • We do care about all your events and do not want to lose them anymore. Therefore, we made Repositories post events that were produced as a result of the command dispatching and CommandBus to post events generated by command handlers.

  • The automatic aggregate snapshots creation did not work as intended in the previous version. Now it is fixed.

  • The server is restarted? This is not a reason to stop posting already scheduled commands. Now, if there are any scheduled commands found on the CommandBus startup, they are re-scheduled again.

  • We thought you would enjoy the example of the Aggregate with all new features described. So, we fixed it and improved a bit.

Dependency Updates

As always, we strive for the latest and greatest. With the new release we updated to:

  • gRPC 0.14.0
  • Protobuf 3.0.0 beta-3.
  • Gradle 2.13.