Commit graph

42 commits

Author SHA1 Message Date
Patrik Nordwall
8573c70883
Remove ApiMayChange for Replicated Event Sourcing, #30346 (#30347) 2021-06-28 17:11:55 +02:00
Johan Andrén
b5cbf383d6
Move typed persistence tests away from LevelDB (#30224) 2021-06-02 17:15:18 +02:00
Andrei Arlou
48e4f11dfd
Change parameter order in assertEquals (#30247) 2021-05-25 17:46:07 +02:00
Andrei Arlou
f568d4d4f9
Remove usage of Java assert in tests (#30220) (#30227) 2021-05-07 21:27:39 +02:00
Renato Cavalcanti
571aa85a36
Add settings to use context.log for internal ESB logging (#30202)
* add settings to use context.log for internal ESB logging

* only force ctx.log if needed

* removed hardcoded value

* fix compilation
2021-04-27 15:22:53 +02:00
Johan Andrén
c5655a9ce6
Upgrade to Scala 2.13.5 (#30072) 2021-03-30 20:57:23 +02:00
Renato Cavalcanti
63aa1453d0
Adds internal logger for EventSourcedBehavior (#30007)
* don't log user event data

* move EventSourcedBehavior internal logs to dedicated logger
2021-02-15 14:47:39 +01:00
Andrea Peruffo
da70e0ccd4
Scala 3 cross compatible akka-actor / akka-testkit / akka-actor-tests (#29956)
* Remove @switch when it doesn't take effect
* Use ActorRef.noSender
* Minor tweaks to SchedulerSpec
* Disambiguate TypedActor for Scala 3
* Bump ScalaTest to a version compatible with Scala 3
* Bump ScalaCheck
* Disambiguate Event in SupervisorHierarchySpec
* Scala 3 compatible EventBusSpec
* Prevent private unused variables to be erased by Scala 3
* Bump mockito
* Explicit actorRef2Scala import
* restore original .scalafix.conf
* Scala 3 compatible tailrec
* Reminder to re add switch annotation in case
* Move to nowarn instead of silencer
* Bump to Scala 2.12.13
* Cross compatible annotations
* fix docs generation
* adapt the build for Scala 3
* fix errors but bus
* remove more SerialVersion from trait
* scalacheck only from scalatest
* cross-compile akka-actor-tests
* restore cross-compilation
* early initializers workaround
* scalacheck switch
* cross compatible FSM.State class
* cross compatible LARS spec
* Change results to pass LineNumberSpec
* fix stackoverflow in AsyncDnsResolverIntegrationSpec
* FSM.State unapply
* fix Scala 2.13 mima
* SerialVersionRemover compiler plugin
* removed unused nowarns
2021-02-01 16:38:29 +01:00
Arnout Engelen
31f654768f
Update copyright to 2021 2021-01-08 17:55:38 +01:00
Patrik Nordwall
bb985b82c6 fix compilation errors 2020-09-03 13:42:42 +02:00
Christopher Batey
2d9660f847 Final review feedback 2020-08-25 10:02:27 +01:00
Christopher Batey
d1114495dd
Feedback from creating replicated entity sample (#29510)
* Fix javadsl and remove shard regions from ReplicatedSharding

* Simplyfy sharding API for replicated event sourcing

As the ShardRegion access has been removed then we will only initially
support Entity's with ShardingEnvelope meaning we can remove the type
param.

Also provide convenience constructors for running a replica on a role
and a replica in each DC

* Compile

* Review feedback

* feedback
2020-08-24 10:52:28 +01:00
Christopher Batey
849018b81e Replicated Sharding improvements (#29483)
* WIP

* Finishing touches to sharding updates

* Review feedback
2020-08-17 07:54:34 +01:00
Patrik Nordwall
779e827495 Counter example, shopping cart 2020-08-17 07:54:34 +01:00
Patrik Nordwall
2e0821c2f0 ORSet example, MovieWatchList 2020-08-17 07:54:33 +01:00
Patrik Nordwall
d078a6b65f LwwTime example
* show event and command handlers of the blog example in docs
* add blog example for Java
2020-08-17 07:54:33 +01:00
Patrik Nordwall
ac469e1a56 Polish Auction example
* adjust the style in the Scala example
  * AuctionEntity class instead of Setup class that is passed around
* add timer in recovery completed
2020-08-17 07:54:33 +01:00
Christopher Batey
5e9e490d88 Add entity type name for replicated entity (#29462)
* Add entity type name for replicated entity

* Review feedback

* Unused import
2020-08-17 07:54:33 +01:00
Christopher Batey
67eb74f076 Embed akka serialization inside jackson serialization (#29455)
* Embed akka serialization inside jackson serialization

Allows re-use of existing serializers when embedding the types in
Jackson

* Fix false dead code warning

* Move marker trait and add docs

* Remove module and document adding annotations

* Review feedback
2020-08-17 07:54:33 +01:00
Patrik Nordwall
7348939ff4 DRY ReplicatedEventSourcedBehavior.apply (#29454)
* and change signature of withEventPublishing and withDirectReplication
2020-08-17 07:54:33 +01:00
Patrik Nordwall
cd821fe3f8 Minor adjustments to replicated es docs (#29450)
* Minor adjustments to replicated es docs

* and a few aa leftovers

* link to more examples
2020-08-17 07:54:33 +01:00
Johan Andrén
9fb76bbea4 Tagging for replicated event sourcing (#29442)
* Tagging for replicated event sourcing
* Docs improvements
* Support for currentEventsByTag in persistence testkit and test coverage for tags in replicated
2020-08-17 07:54:33 +01:00
Christopher Batey
c945fbd7a1 Java auction example (#29443) 2020-08-17 07:37:59 +01:00
Christopher Batey
742352caba Restart replication stream from correct seen seqNr (#29436) 2020-08-17 07:37:59 +01:00
Johan Andrén
bf5ec198a4 Test case for three replicated event sourced entities added (#29438) 2020-08-17 07:37:59 +01:00
Johan Andrén
b03412d5b2 Rename active active to replicated event sourcing (#29435)
* Move active active internals into the internal package

* Renaming active active to Replicated Event Sourcing

* Rename of Active Active to Replicated Event Sourcing

* Revert changes to testkit

* Java test formatting...

* Gave up on getting apidoc to link to EventSourcedBehavior and made code snippets of it

Co-authored-by: Christopher Batey <christopher.batey@gmail.com>
2020-08-17 07:37:59 +01:00
Christopher Batey
e4f5781d65 Detect illegal access to context (#29431) 2020-08-17 07:37:58 +01:00
Johan Andrén
165b39d1e0 Incorrect assumption about event ordering in test fixed (#29411) 2020-08-17 07:37:58 +01:00
Johan Andrén
a563a9b69e Make sure to gracefully stop replication streams when aa actor stops #29406 2020-08-17 07:37:58 +01:00
Christopher Batey
f531d1e57d Docs and example for triggers (#29396) 2020-08-17 07:37:58 +01:00
Johan Andrén
21713bbc30 Active active java apis #29266 2020-08-17 07:37:58 +01:00
Christopher Batey
116c13677a Port CRDTs from multi dc (#29372)
* Metadata for snapshots for active active

* Port CRDTs from multi dc

* Review feedback
2020-08-17 07:37:58 +01:00
Christopher Batey
7e91428428 Metadata for snapshots for active active (#29362) 2020-08-17 07:37:58 +01:00
Christopher Batey
2c0e837183 Initial docs for active active (#29386) 2020-08-17 07:37:58 +01:00
Johan Andrén
36a8b6f24a Active active per replica journal selection (#29350)
* Support for having multiple isolated testkit journals and corresponding read journals in persistence testkit
* Read journal selection per active-active replica 
* a dedicated ReplicaId type to avoid stringly typed mismatches
2020-08-17 07:37:58 +01:00
Christopher Batey
398ab2efe0 Introduce version vectors for replicated events (#29332)
* ActiveActive: Events with metadata and events by persistence id for  (#29287)
* Introduce version vectors for replicated events

* Set concurrent on recovery

* Group together AA related fields in a published event
2020-08-17 07:37:58 +01:00
Johan Andrén
82b8d699ca Test coverage for active active published events after replay (#29335)
* Test coverage for published events after recovery
* Keep track of origin seqnrs when replaying
2020-08-17 07:37:58 +01:00
Johan Andrén
b86b6df7c7 Support persistAll for active active (#29337) 2020-08-17 07:37:58 +01:00
Patrik Nordwall
238d55a413 message adapter in ActiveActiveShardingDirectReplication (#29328)
* I don't think it's worth cheating with Any and narrow just to save
  one or two allocations given how many other things that are needed for
  sending the messages
2020-08-17 07:30:12 +01:00
Johan Andrén
c44302bd1e Speculative replication - step 1 (#29289)
* Step 1: general event-publishing-to-topic feature

* Step 2: an actor subscribes to the topic and forwards events to the sharded replicas

* Another half piece of the puzzle, receive the PublishedEvent in the ESB internals

* Stash published events while replaying rather than drop

* Publish on the event stream instead of a topic

* Active active actor receiving a published event

* Some smaller changes

 * Public API for published event
 * Better name for the sharding component

* Naive test for the Active Active Sharding Replication

* Java API for ActiveActiveShardingReplication

* Spelling

* Use ShardingEnvelope for publishing the event across sharding

* Fast forwarding filter stage

* Move test to testkit, enable the see-event-twice test (fails)

* Use persistence testkit journal

* Various smaller review feedback things

* Trying to figure out why duplicate event write test fails

* Missing unstash after processing published event

Co-authored-by: Christopher Batey <christopher.batey@gmail.com>
2020-08-17 07:30:12 +01:00
Christopher Batey
e98f1311f3 Alternative approach for storing metadata (#29309) 2020-08-17 07:30:12 +01:00
Christopher Batey
08182bbdeb ActiveActive: Events with metadata and events by persistence id for (#29287) 2020-08-17 07:27:57 +01:00