Commit graph

25234 commits

Author SHA1 Message Date
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
90e09549e8 2.13 compilation 2020-08-17 10:04:43 +01:00
Christopher Batey
9ba9571b4a Ignore java warnins in persistence typed and mima
Warnings are from protobuf
2020-08-17 09:32:22 +01:00
Christopher Batey
e7e2757d1a Test coverage and fixes for direct replication (#29491)
* Test coverage and fixes for direct replication

* Serializer test and review feedback

* use testkit serialization testkit
2020-08-17 07:56:29 +01:00
Christopher Batey
eae102acb1 Make ShardingDirectReplication private (#29492)
* Make ShardingDirectReplication private

And provider user API to provide ReplicaId so that local messages don't
need to be forwarded to sharding to just be dropped

* Update docs to say direct replication is on my default

* Doh
2020-08-17 07:54:34 +01:00
Christopher Batey
260276fd90 Turn on direct replication by default (#29493) 2020-08-17 07:54:34 +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
Patrik Nordwall
fb5f5dc145 a few more things when reviewing replicated event sourcing (#29461) 2020-08-17 07:54:33 +01:00
Christopher Batey
f41f093372 Rename replicated settings (#29460) 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
4b27bc34a8 Document hot standby for replicated event sourcing (#29439) 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
0b11ae362c PersistentRepr serializer support for metadata (#29434)
And fixing the warnings for the 2.13 build, not sure why PR
validation passes for these

The write side of the JDBC plugin works now as it
persists the PR
2020-08-17 07:37:58 +01:00
Johan Andrén
b8a1584e10 Active active journal support changes (#29421)
* Add missing serializers (and rename classes because metadata is a word)
* Add test instances for journal and snapshot support
* Method to add metadata to existing snapshotmetadata
* Better error message if replicated stream does not have metadata
* Snapshot store tck support for metadata
* Docs for tck coverage of AA metadata
2020-08-17 07:37:58 +01:00
Christopher Batey
e4f5781d65 Detect illegal access to context (#29431) 2020-08-17 07:37:58 +01:00
Johan Andrén
f63ca66e56 Active active docs mention plugin support (#29418)
* Mention specific support for active active is needed in plugins
* Align metadata name journal vs snapshot
2020-08-17 07:37:58 +01:00
Johan Andrén
7ec631d3c1 ActiveActiveSharding make it possible to use with custom envelope (#29417) 2020-08-17 07:37:58 +01:00
Johan Andrén
3d5fae809d Don't log user event toString in active active #29393 (#29416) 2020-08-17 07:37:58 +01:00
Johan Andrén
827dc14dbb EventPublishing API for Java (#29413) 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
Johan Andrén
9830988566 Active active sharding (#29364) 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
Patrik Nordwall
e79f5ac3c4 better timestamp format for active-active (#29329) 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
Christopher Batey
ad2d7e2d00 Initial prototype of active active event sourcing (#29265) 2020-08-17 07:25:34 +01:00
Chiyu Zhong
94dc84d5d0
Add random factor for CircuitBreaker (#29478)
* Multiply reset timeout with randomFactor
* add old constructor to make it binary compatible
* add scaladoc for randomFactor
2020-08-14 10:48:19 +02:00