Skip to content

Commit

Permalink
chore: reducing cr cost
Browse files Browse the repository at this point in the history
  • Loading branch information
Roiocam committed Dec 19, 2023
1 parent 7623e65 commit 32571d3
Show file tree
Hide file tree
Showing 31 changed files with 40 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ abstract class GroupRouter[T] extends DeferredBehavior[T] {
*
* @param virtualNodesFactor This factor has to be greater or equal to 1. Assuming that the reader
* knows what consistent hashing is
* (if not, please refer: https://tom-e-white.com/2007/11/consistent-hashing.html or wiki).
* (if not, please refer: https://www.tom-e-white.com/2007/11/consistent-hashing.html or wiki).
* This number is responsible for creating additional,
* virtual addresses for a provided set of routees,
* so that in the total number of points on hashing ring
Expand Down Expand Up @@ -166,7 +166,7 @@ abstract class PoolRouter[T] extends DeferredBehavior[T] {
*
* @param virtualNodesFactor This factor has to be greater or equal to 1. Assuming that the reader
* knows what consistent hashing is
* (if not, please refer: https://tom-e-white.com/2007/11/consistent-hashing.html or wiki).
* (if not, please refer: https://www.tom-e-white.com/2007/11/consistent-hashing.html or wiki).
* This number is responsible for creating additional,
* virtual addresses for a provided set of routees,
* so that in the total number of points on hashing ring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ trait GroupRouter[T] extends Behavior[T] {
*
* @param virtualNodesFactor This factor has to be greater or equal to 1. Assuming that the reader
* knows what consistent hashing is
* (if not, please refer: https://tom-e-white.com/2007/11/consistent-hashing.html or wiki).
* (if not, please refer: https://www.tom-e-white.com/2007/11/consistent-hashing.html or wiki).
* This number is responsible for creating additional,
* virtual addresses for a provided set of routees,
* so that in the total number of points on hashing ring
Expand Down Expand Up @@ -158,7 +158,7 @@ trait PoolRouter[T] extends Behavior[T] {
*
* @param virtualNodesFactor This factor has to be greater or equal to 1. Assuming that the reader
* knows what consistent hashing is
* (if not, please refer: https://tom-e-white.com/2007/11/consistent-hashing.html or wiki).
* (if not, please refer: https://www.tom-e-white.com/2007/11/consistent-hashing.html or wiki).
* This number is responsible for creating additional,
* virtual addresses for a provided set of routees,
* so that in the total number of points on hashing ring
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object GSet {
* remove elements of a G-Set.
*
* It is described in the paper
* <a href="https://inria.hal.science/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
* <a href="https://hal.inria.fr/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
*
* A G-Set doesn't accumulate any garbage apart from the elements themselves.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object GSet {
* remove elements of a G-Set.
*
* It is described in the paper
* <a href="https://inria.hal.science/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
* <a href="https://hal.inria.fr/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
*
* A G-Set doesn't accumulate any garbage apart from the elements themselves.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ object GCounter {
* Implements a 'Growing Counter' CRDT, also called a 'G-Counter'.
*
* It is described in the paper
* <a href="https://inria.hal.science/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
* <a href="https://hal.inria.fr/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
*
* A G-Counter is a increment-only counter (inspired by vector clocks) in
* which only increment and merge are possible. Incrementing the counter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ object LWWRegister {
* Implements a 'Last Writer Wins Register' CRDT, also called a 'LWW-Register'.
*
* It is described in the paper
* <a href="https://inria.hal.science/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
* <a href="https://hal.inria.fr/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
*
* Merge takes the register with highest timestamp. Note that this
* relies on synchronized clocks. `LWWRegister` should only be used when the choice of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ object ORSet {
* over remove.
*
* It is not implemented as in the paper
* <a href="https://inria.hal.science/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
* <a href="https://hal.inria.fr/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
* This is more space efficient and doesn't accumulate garbage for removed elements.
* It is described in the paper
* <a href="https://inria.hal.science/file/index/docid/738680/filename/RR-8083.pdf">An optimized conflict-free replicated set</a>
* <a href="https://hal.inria.fr/file/index/docid/738680/filename/RR-8083.pdf">An optimized conflict-free replicated set</a>
* The implementation is inspired by the Riak DT <a href="https://github.com/basho/riak_dt/blob/develop/src/riak_dt_orswot.erl">
* riak_dt_orswot</a>.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object PNCounter {
* Implements a 'Increment/Decrement Counter' CRDT, also called a 'PN-Counter'.
*
* It is described in the paper
* <a href="https://inria.hal.science/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
* <a href="https://hal.inria.fr/file/index/docid/555588/filename/techreport.pdf">A comprehensive study of Convergent and Commutative Replicated Data Types</a>.
*
* PN-Counters allow the counter to be incremented by tracking the
* increments (P) separate from the decrements (N). Both P and N are represented
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ object Replicator {
* <a href="https://www.infoq.com/presentations/CRDT/">Eventually Consistent Data Structures</a>
* talk by Sean Cribbs and and the
* <a href="https://www.microsoft.com/en-us/research/video/strong-eventual-consistency-and-conflict-free-replicated-data-types/">talk by Mark Shapiro</a>
* and read the excellent paper <a href="https://inria.hal.science/file/index/docid/555588/filename/techreport.pdf">
* and read the excellent paper <a href="https://hal.inria.fr/file/index/docid/555588/filename/techreport.pdf">
* A comprehensive study of Convergent and Commutative Replicated Data Types</a>
* by Mark Shapiro et. al.
*
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/distributed-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ For the full documentation of this feature and for new projects see @ref:[Limita

* [Strong Eventual Consistency and Conflict-free Replicated Data Types (video)](https://www.youtube.com/watch?v=oyUHd894w18&amp;feature=youtu.be)
talk by Mark Shapiro
* [A comprehensive study of Convergent and Commutative Replicated Data Types](https://inria.hal.science/file/index/docid/555588/filename/techreport.pdf)
* [A comprehensive study of Convergent and Commutative Replicated Data Types](https://hal.inria.fr/file/index/docid/555588/filename/techreport.pdf)
paper by Mark Shapiro et. al.

## Configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/fsm.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To use Finite State Machine actors, you must add the following dependency in you
## Overview

The FSM (Finite State Machine) is available as @scala[a mixin for the] @java[an abstract base class that implements an] Pekko Actor and
is best described in the [Erlang design principles](https://erlang.org/documentation/doc-4.8.2/doc/design_principles/fsm.html)
is best described in the [Erlang design principles](https://www.erlang.org/documentation/doc-4.8.2/doc/design_principles/fsm.html)

A FSM can be described as a set of relations of the form:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Pekko embraces distributed computing and makes the fallibility of communication
explicit through message passing, therefore it does not try to lie and emulate
a leaky abstraction. This is a model that has been used with great success in
Erlang and requires the users to design their applications around it. You can
read more about this approach in the [Erlang documentation](https://www.erlang.org/faq/academic.html) (section 10.8 and
read more about this approach in the [Erlang documentation](https://erlang.org/faq/academic.html) (section 10.8 and
10.9), Pekko follows it closely.

Another angle on this issue is that by providing only basic guarantees those
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/general/stream/stream-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ A source that emits a stream of streams is still a normal Source, the kind of el

## The difference between Error and Failure

The starting point for this discussion is the [definition given by the Reactive Manifesto](http://www.reactivemanifesto.org/glossary#Failure). Translated to streams this means that an error is accessible within the stream as a normal data element, while a failure means that the stream itself has failed and is collapsing. In concrete terms, on the Reactive Streams interface level data elements (including errors) are signaled via [onNext](https://javadoc.io/doc/org.reactivestreams/reactive-streams/latest/org/reactivestreams/Subscriber.html#onNext\(T\)) while failures raise the [onError](https://javadoc.io/doc/org.reactivestreams/reactive-streams/latest/org/reactivestreams/Subscriber.html#onError\(java.lang.Throwable\)) signal.
The starting point for this discussion is the [definition given by the Reactive Manifesto](https://www.reactivemanifesto.org/glossary#Failure). Translated to streams this means that an error is accessible within the stream as a normal data element, while a failure means that the stream itself has failed and is collapsing. In concrete terms, on the Reactive Streams interface level data elements (including errors) are signaled via [onNext](https://javadoc.io/doc/org.reactivestreams/reactive-streams/latest/org/reactivestreams/Subscriber.html#onNext\(T\)) while failures raise the [onError](https://javadoc.io/doc/org.reactivestreams/reactive-streams/latest/org/reactivestreams/Subscriber.html#onError\(java.lang.Throwable\)) signal.

@@@ note

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/persistence-query.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Java

## Performance and denormalization

When building systems using @ref:[Event Sourcing](typed/persistence.md#event-sourcing-concepts) and CQRS ([Command & Query Responsibility Segregation](https://learn.microsoft.com/en-us/previous-versions/msp-n-p/jj554200%28v=pandp.10%29)) techniques
When building systems using @ref:[Event Sourcing](typed/persistence.md#event-sourcing-concepts) and CQRS ([Command & Query Responsibility Segregation](https://docs.microsoft.com/en-us/previous-versions/msp-n-p/jj554200%28v=pandp.10%29)) techniques
it is tremendously important to realise that the write-side has completely different needs from the read-side,
and separating those concerns into datastores that are optimised for either side makes it possible to offer the best
experience for the write and read sides independently.
Expand Down
10 changes: 5 additions & 5 deletions docs/src/main/paradox/persistence-schema-evolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ evolution feel free to submit Pull Requests to this page to extend it.

In recent years we have observed a tremendous move towards immutable append-only datastores, with event-sourcing being
the prime technique successfully being used in these settings. For an excellent overview why and how immutable data makes scalability
and systems design much simpler you may want to read Pat Helland's excellent [Immutability Changes Everything](http://www.cidrdb.org/cidr2015/Papers/CIDR15_Paper16.pdf) whitepaper.
and systems design much simpler you may want to read Pat Helland's excellent [Immutability Changes Everything](http://cidrdb.org/cidr2015/Papers/CIDR15_Paper16.pdf) whitepaper.

Since with [Event Sourcing](https://martinfowler.com/eaaDev/EventSourcing.html) the **events are immutable** and usually never deleted – the way schema evolution is handled
differs from how one would go about it in a mutable database setting (e.g. in typical CRUD database applications).
Expand Down Expand Up @@ -98,12 +98,12 @@ to perform this on a live system.
recommendation if you don't have other preference. It also has support for
@ref:[Schema Evolution](serialization-jackson.md#schema-evolution).

[Google Protocol Buffers](https://protobuf.dev/) is good if you want
[Google Protocol Buffers](https://developers.google.com/protocol-buffers/) is good if you want
more control over the schema evolution of your messages, but it requires more work to develop and
maintain the mapping between serialized representation and domain representation.

Binary serialization formats that we have seen work well for long-lived applications include the very flexible IDL based:
[Google Protocol Buffers](https://protobuf.dev), [Apache Thrift](https://thrift.apache.org/)
[Google Protocol Buffers](https://developers.google.com/protocol-buffers), [Apache Thrift](https://thrift.apache.org/)
or [Apache Avro](https://avro.apache.org). Avro schema evolution is more "entire schema" based, instead of
single fields focused like in protobuf or thrift, and usually requires using some kind of schema registry.

Expand All @@ -113,7 +113,7 @@ by Martin Kleppmann.

### Provided default serializers

Pekko Persistence provides [Google Protocol Buffers](https://protobuf.dev/) based serializers (using @ref:[Pekko Serialization](serialization.md))
Pekko Persistence provides [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) based serializers (using @ref:[Pekko Serialization](serialization.md))
for its own message types such as @apidoc[PersistentRepr], @apidoc[AtomicWrite] and snapshots. Journal plugin implementations
*may* choose to use those provided serializers, or pick a serializer which suits the underlying database better.

Expand Down Expand Up @@ -403,7 +403,7 @@ persist the corresponding events (the "*data model*"). For example because the d
independently of the domain model.

Another situation where this technique may be useful is when your serialization tool of choice requires generated
classes to be used for serialization and deserialization of objects, like for example [Google Protocol Buffers](https://protobuf.dev/) do,
classes to be used for serialization and deserialization of objects, like for example [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) do,
yet you do not want to leak this implementation detail into the domain model itself, which you'd like to model as
plain @scala[Scala case]@java[Java] classes.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/remoting-artery.md
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ Any space used in the mount will count towards your container's memory usage.

### Flight Recorder

When running on JDK 11 Artery specific flight recording is available through the [Java Flight Recorder (JFR)](https://openjdk.org/jeps/328).
When running on JDK 11 Artery specific flight recording is available through the [Java Flight Recorder (JFR)](https://openjdk.java.net/jeps/328).
The flight recorder is automatically enabled by detecting JDK 11 but can be disabled if needed by setting `pekko.java-flight-recorder.enabled = false`.

Low overhead Artery specific events are emitted by default when JFR is enabled, higher overhead events needs a custom settings template and are not enabled automatically with the `profiling` JFR template.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The serialization mechanism in Pekko allows you to write custom serializers and
@ref:[Serialization with Jackson](serialization-jackson.md) is a good choice in many cases and our
recommendation if you don't have other preference.

[Google Protocol Buffers](https://protobuf.dev/) is good if you want
[Google Protocol Buffers](https://developers.google.com/protocol-buffers/) is good if you want
more control over the schema evolution of your messages, but it requires more work to develop and
maintain the mapping between serialized representation and domain representation.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/stream/reactive-streams-interop.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,5 @@ An incomplete list of other implementations:

* [Reactor (1.1+)](https://github.com/reactor/reactor)
* [RxJava](https://github.com/ReactiveX/RxJavaReactiveStreams)
* [Ratpack](https://ratpack.io/manual/current/streams.html)
* [Ratpack](https://www.ratpack.io/manual/current/streams.html)
* [Slick](https://scala-slick.org/)
4 changes: 2 additions & 2 deletions docs/src/main/paradox/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ wall time, not CPU time or system time.
@@@ div { .group-scala }

Ray Roestenburg has written a great article on using the Akka TestKit (but can also be applied to the Pekko Testkit):
[http://web.archive.org/web/20180114133958/http://roestenburg.agilesquad.com/2011/02/unit-testing-akka-actors-with-testkit_12.html](http://web.archive.org/web/20180114133958/http://roestenburg.agilesquad.com/2011/02/unit-testing-akka-actors-with-testkit_12.html).
[https://web.archive.org/web/20180114133958/http://roestenburg.agilesquad.com/2011/02/unit-testing-akka-actors-with-testkit_12.html](https://web.archive.org/web/20180114133958/http://roestenburg.agilesquad.com/2011/02/unit-testing-akka-actors-with-testkit_12.html).
His full example is also available @ref:[here](testing.md#example).

@@@
Expand Down Expand Up @@ -812,7 +812,7 @@ to the @ref:[reference configuration](general/configuration-reference.md#config-
## Example

Ray Roestenburg's example code from his blog, which unfortunately is only available on
[web archive](http://web.archive.org/web/20180114133958/http://roestenburg.agilesquad.com/2011/02/unit-testing-akka-actors-with-testkit_12.html),
[web archive](https://web.archive.org/web/20180114133958/http://roestenburg.agilesquad.com/2011/02/unit-testing-akka-actors-with-testkit_12.html),
adapted to work with Akka 2.x.

@@snip [TestKitUsageSpec.scala](/docs/src/test/scala/docs/testkit/TestKitUsageSpec.scala) { #testkit-usage }
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/typed/choosing-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Microservices architecture has many attractive properties, such as the independe
multiple smaller and more focused teams that can deliver new functionality more frequently and can
respond quicker to business opportunities. Reactive Microservices should be isolated, autonomous, and have
a single responsibility as identified by Jonas Bonér in the book
[Reactive Microsystems: The Evolution of Microservices at Scale](https://go.lightbend.com/reactive-microsystems-evolution-of-microservices-scalability-oreilly).
[Reactive Microsystems: The Evolution of Microservices at Scale](https://www.lightbend.com/ebooks/reactive-microsystems-evolution-of-microservices-scalability-oreilly).

In a microservices architecture, you should consider communication within a service and between services.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/typed/cluster-membership.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ UID.

## Member States

The cluster membership state is a specialized [CRDT](https://inria.hal.science/file/index/docid/555588/filename/techreport.pdf), which means that it has a monotonic
The cluster membership state is a specialized [CRDT](https://hal.inria.fr/file/index/docid/555588/filename/techreport.pdf), which means that it has a monotonic
merge function. When concurrent changes occur on different nodes the updates can always be
merged and converge to the same end result.

Expand Down
Loading

0 comments on commit 32571d3

Please sign in to comment.