The VLINGO XOOM platform SDK delivering Reactive storage that is scalable, high-throughput, and resilient for CQRS, Event Sourcing, Key-Value, and Objects used by services and applications.
I migrated a very small PoC to vlingo-symbio to see how it works. I looked into vlingo-schemata for the setup. It works so far but I noticed a few things:
vlingo-symbio needs some 'ceremonial' code to register EntryAdapter (e.g. see https://github.com/vlingo/vlingo-schemata/blob/master/src/main/java/io/vlingo/schemata/infra/persistence/EntryAdapters.java)
-- all the EntryAdapters are looking equal, so maybe it would be an option to have a factory in SourceTypeRegistry that could generate default EntryAdapters if not custom was found
-- all EntryAdapters needs to be registered twice. Once in the in the Journal and once in the SourceTypeRegistry. This is somehow error prone, and won't be necessary if the journal would use the SourceTypeRegistry
Somehow the generics do not work for me:
-- SourcedTypeRegistry.Info<T> just works as you leave out the type parameter (see https://github.com/vlingo/vlingo-schemata/blob/master/src/main/java/io/vlingo/schemata/infra/persistence/EntryAdapters.java again). This is because Info expects a Journal<T> and a Class<Sourced<T>> as parameter. If using Journal<String> like for the Postgres journal, the Sourced actor needs to be Sourced<String> too. But that does not work, as EventSourced is Sourced<DomainEvent> ...
maybe just the signature of Info needs to be fixed e.g. to Info(final Journal<T> journal, final Class<Sourced<DomainEvent>> sourcedType, final String sourcedName)
-- Every quick fix I could imagine would not work (e.g. to make PostgresJournal an Journal<DomainEvent>)
I'm not sure if this is the same for all other journal implementations, but Entry has an id property, that is used nowhere. This is somehow confusing.
I migrated a very small PoC to
vlingo-symbio
to see how it works. I looked intovlingo-schemata
for the setup. It works so far but I noticed a few things:vlingo-symbio
needs some 'ceremonial' code to registerEntryAdapter
(e.g. see https://github.com/vlingo/vlingo-schemata/blob/master/src/main/java/io/vlingo/schemata/infra/persistence/EntryAdapters.java) -- all theEntryAdapter
s are looking equal, so maybe it would be an option to have a factory inSourceTypeRegistry
that could generate defaultEntryAdapter
s if not custom was found -- allEntryAdapter
s needs to be registered twice. Once in the in theJournal
and once in theSourceTypeRegistry
. This is somehow error prone, and won't be necessary if the journal would use theSourceTypeRegistry
Somehow the generics do not work for me: --SourcedTypeRegistry.Info<T>
just works as you leave out the type parameter (see https://github.com/vlingo/vlingo-schemata/blob/master/src/main/java/io/vlingo/schemata/infra/persistence/EntryAdapters.java again). This is becauseInfo
expects aJournal<T>
and aClass<Sourced<T>>
as parameter. If usingJournal<String>
like for the Postgres journal, theSourced
actor needs to beSourced<String>
too. But that does not work, asEventSourced
isSourced<DomainEvent>
...Info
needs to be fixed e.g. toInfo(final Journal<T> journal, final Class<Sourced<DomainEvent>> sourcedType, final String sourcedName)
-- Every quick fix I could imagine would not work (e.g. to makePostgresJournal
anJournal<DomainEvent>
)Entry
has an id property, that is used nowhere. This is somehow confusing.