Commit graph

53 commits

Author SHA1 Message Date
Björn Antonsson
8e4f1d966e Merge pull request #16794 from carrot-garden/persistence-multiple-plugins
+per #15587 Make it possible to use multiple persistence plugins
2015-03-04 15:19:43 +01:00
pkaczor
a6913a9271 =doc #16874 clean up Relationship between deliver and confirmDelivery section 2015-02-20 09:07:43 +01:00
Andrei Pozolotin
18dfd39686 +per #15587 Make it possible to use multiple persistence plugins 2015-02-19 21:25:52 -06:00
Patrik Nordwall
9b5a446a4a =per #15942 Support resume after recovery failure
* also improved fault handling in various places (bugs found)

* and manually triggered Update must be distinguished from scheduled
  auto updates, otherwise manual Update will schedule extra auto updates
2015-02-06 10:29:07 +01:00
Roland Kuhn
d9efd041f7 add akka-typed project with generic ActorRef
This is the first step towards more type-safety in Actor interactions,
comprising:

* generic ActorRef[T] that only accepts T messages
* generic ActorSystem[T] extends ActorRef[T] (sending to the guardian,
  whose Props[T] are provided for ActorSystem construction)
* removed the Actor trait: everything in there has been made into
  messages and signals
* new Behavior[T] abstraction that consumes messages (of type T) or
  Signals (lifecycle hooks, Terminated, ReceiveTimeout, Failed),
  producing the next Behavior[T] as the result each time
* the ask pattern is provided and yields properly typed Futures
* variants of ActorContext are provided for synchronous testing of
  Behaviors

All of this is implemented without touching code outside akka-typed
(apart from making guardianProps configurable), creating wrapper objects
around ActorRef, ActorContext, ActorSystem, Props and providing an Actor
implementation that just runs a Behavior.
2015-01-29 11:42:28 +01:00
Patrik Nordwall
c566d5a106 per #15423 Remove deprecated features from akka-persistence
* remove channels
* remove View
* remove Processor
* collapse the complicated internal state management
  that was spread out between Processor, Eventsourced and Recovery
* remove Recovery trait, this caused some duplication between Eventsourced
  and PersistentView, but but the enhanced PersistentView will not be based
  on recovery infrastructure, and therefore PersistentView code will be replaced anyway
* remove PersistentBatch
* remove LoopMessage
* remove deleteMessages of individual messages
* remove Persistent, PersistentRepr and PersistentImpl are kept
* remove processorId
* update doc sample code
* note in migration guide about persistenceId
* rename Resequencable to PersistentEnvelope
2014-12-12 16:18:47 +01:00
Roland Kuhn
3cf00cecb1 Merge pull request #16386 from adamw/wip-16348-limit-alod-adamw
+per #16348 Limit the number of messages redelivered at each interval
2014-12-01 13:04:38 +01:00
adamw
57f67bc58c +per #16348 Limit the number of messages redelivered at each interval
Helps to prevent flooding destinations which are unavailable for a long time with messages once they become available.
2014-11-30 13:30:57 +01:00
Marek Prochera
b43f3639d6 Fix #16364 - Doc - Persistent actor - clarification of the recovery customization 2014-11-25 23:13:16 +01:00
Patrik Nordwall
c0bd00409b =doc Fix wrong rst format 2014-11-10 17:28:16 +01:00
xuwei-k
91e53e1cb5 =doc #16000 fix tck-experimental version 2014-09-30 03:15:22 +09:00
Dan Brown
1f2092533c =doc #15538 Updating documentation on deliver and confirmDelivery for Scala, Java and Lambda-java 2014-09-24 09:28:23 +01:00
Konrad 'ktoso' Malawski
90bc347607 +per #13815 akka-persistence-tck based on @krasserm's work
Original here: https://github.com/krasserm/akka-persistence-testkit

New features:
* merged martin's tests
* usable from java (junit 4)
* simple bench test, which helps checking if ordering is perserved under
  bigger workloads and simple perf checking
* does NOT include tests for already deprecated features (deleteMessages)
* docs

Resolves #13815

Conflicts:
	project/AkkaBuild.scala
2014-07-14 19:39:30 +02:00
Patrik Nordwall
9a4425ed19 =per Fix minor doc issues
(cherry picked from commit 45c07e1f2f131e70a03b82803f11fd390572ccba)
2014-06-28 17:33:08 +02:00
Patrik Nordwall
bc2aeaf0d3 =per #15441 Remove persistent stream in docs and sample
We must first release akka-stream with dependency to akka 2.3.4
and it should be maintained in the akka-release-dev branch

(cherry picked from commit a97a067701cfc527b235707882e72326277415f3)

Conflicts:
	akka-samples/akka-sample-persistence-scala/build.sbt
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/StreamExample.scala
2014-06-28 17:24:25 +02:00
Patrik Nordwall
8eec3f92d3 =per #15457 Correlate persistAsync handlers with journal messages
We have assumed that the handlers can be popped when replies come back from journal, but if messages to journal are in flight when the actor is restarted the handlers does not match up with journal replies.

This solution ignores journal replies that were emitted by an old PersistentActor instance
by passing an uid with the journal messages. This means that the handler will not be
invoked for such messages.

(cherry picked from commit 7ebaaab669c9e467a1ffb4d9ed8b6500e1801a7c)

Conflicts:
	akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteJournal.scala
2014-06-28 17:21:55 +02:00
Patrik Nordwall
07e67b90ea !per #15428 Deprecate deleteMessage
(cherry picked from commit 4973d0b37d635a0a2c9a94c2898da988e4f14fc7)
2014-06-28 15:59:33 +02:00
Patrik Nordwall
32ca608c97 +per #15327 Add AtLeastOnceDelivery trait
* also remove final of around methods, and let deliver send when not recoveryRunning

(cherry picked from commit 312b0d107a179accaf135f64ed9c3b78f3e351d1)
2014-06-26 22:58:46 +02:00
Konrad 'ktoso' Malawski
b1d1d87111 !per #15436 make persistenceId abstract in NEW classes
(cherry picked from commit de3249f7f4b859c3caa232e579d9a3bae7406803)

Conflicts:
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/PersistentActorExample.scala
2014-06-26 16:29:30 +02:00
Konrad 'ktoso' Malawski
3fd240384c +per #15424 Added PersistentView, deprecated View
A PersistentView works the same way as View did previously, except:

* it requires an `peristenceId` (no default is provided)
* messages given to `receive` are NOT wrapped in Persistent()

akka-streams not touched, will update them afterwards on different branch

Also solves #15436 by making persistentId in PersistentView abstract.

(cherry picked from commit dcafaf788236fe6d018388dd55d5bf9650ded696)

Conflicts:
	akka-docs/rst/java/lambda-persistence.rst
	akka-docs/rst/java/persistence.rst
	akka-docs/rst/scala/persistence.rst
	akka-persistence/src/main/scala/akka/persistence/Persistent.scala
	akka-persistence/src/main/scala/akka/persistence/View.scala
2014-06-26 10:10:09 +02:00
Patrik Nordwall
d6ffdf521c =per #15429 Rewrite persistence documentation and samples for 2.3.4 changes
(cherry picked from commit 02351e32f110a8c4a249f0f3f84bae5898d1a836)

Conflicts:
	akka-samples/akka-sample-persistence-java-lambda/tutorial/index.html
	akka-samples/akka-sample-persistence-java/tutorial/index.html
	akka-samples/akka-sample-persistence-scala/build.sbt
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/ConversationRecoveryExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/PersistentActorExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/ProcessorChannelExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/ProcessorChannelRemoteExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/SnapshotExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/StreamExample.scala
	akka-samples/akka-sample-persistence-scala/tutorial/index.html
2014-06-25 15:37:35 +02:00
Martin Krasser
062d304b73 +per,+str #15035 Reactive-stream producers for persistent messages written by akka-persistence processors
(cherry picked from commit 5dc62400e4f2f9d7afe5efe93fc8bef5b9d226c0)

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	project/AkkaBuild.scala
2014-06-25 15:07:50 +02:00
Konrad 'ktoso' Malawski
4bb321a83a !per #15230 rename processorId => persistentId
* This is NOT binary compatible, we're in an *experimental* module.
* disabled binary compat checks for package akka.persistence
* Source compatibility is retained, but users should migrate do the new
  method name ASAP.
* Plugin APIs were migrated in a way that allows the old plugins to
  compile agains 2.3.4 without having to change anything. Hopefuly this
  will help authors migrate to 2.3.4 sooner. This is only source level compatible, not binary compatible.
* added deprecation warnings on all processorId methods and provided bridges where possible
* for users, the migration should be painless, they can still override
  the old method, and it'll work. But we encourage them to move to
  persistenceId; All delegation code will have to be removed afterwards ofc.

Conflicts:
	akka-persistence/src/main/scala/akka/persistence/Channel.scala
	akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
	akka-persistence/src/main/scala/akka/persistence/Persistent.scala
	akka-persistence/src/main/scala/akka/persistence/PersistentChannel.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	akka-persistence/src/main/scala/akka/persistence/Snapshot.scala
	akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteProxy.scala
	akka-persistence/src/main/scala/akka/persistence/journal/inmem/InmemJournal.scala
	akka-persistence/src/main/scala/akka/persistence/journal/leveldb/LeveldbKey.scala
	akka-persistence/src/main/scala/akka/persistence/snapshot/SnapshotStore.scala
	akka-persistence/src/test/scala/akka/persistence/serialization/SerializerSpec.scala
	project/AkkaBuild.scala
2014-06-24 17:05:18 +02:00
Konrad 'ktoso' Malawski
a71790bb18 +per #15229 defer for PersistentActor
* Deferred events are not persisted, thus will not participate in replays
  etc. If users want events to be persisted, they can simply use
  `persistAsync` instead.
* This, 3rd, rewrite extends the Persistent hierarchy by a top level
  trait "Resequenceable", which is used to mark every event to be sent
  in sequence back to the PersistentActor. These are split into
  NonPersistentRepr or PersistentRepr, and acted upon accordingly.
* defer is guaranteed to be called, even after persistence failures
* Includes docs updates for java/scala/java8

Resolves #15229
Depends on #15227

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	akka-persistence/src/test/scala/akka/persistence/PersistentActorSpec.scala
	project/AkkaBuild.scala
2014-06-10 17:09:24 +02:00
Björn Antonsson
9bcaeff87d +per #13944 Send RecoveryComplete message at end of recovery
Fixes #13944

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	project/AkkaBuild.scala
2014-06-10 13:22:10 +02:00
Konrad 'ktoso' Malawski
d51b79c95a !per persistAsync
Breaks binary compatibility because adding new methods to Eventsourced
trait. Since akka-persistence is experimental this is ok, yet
source-level compatibility has been perserved thankfuly :-)

Deprecates:
* Rename of EventsourcedProcessor -> PersistentActor
* Processor -> suggest using PersistentActor
* Migration guide for akka-persistence is separate, as wel'll deprecate in minor versions (its experimental)
* Persistent as well as ConfirmablePersistent - since Processor, their
  main user will be removed soon.

Other changes:
* persistAsync works as expected when mixed with persist
* A counter must be kept for pending stashing invocations
* Uses only 1 shared list buffer for persit / persistAsync
* Includes small benchmark
* Docs also include info about not using Persistent() wrapper
* uses java LinkedList, for best performance of append / head on
  persistInvocations; the get(0) is safe, because these msgs only
  come in response to persistInvocations
* Renamed internal *MessagesSuccess/Failure messages because we kept
  small mistakes seeing the class "with s" and "without s" as the same
* Updated everything that refered to EventsourcedProcessor to
  PersistentActor, including samples

Refs #15227

Conflicts:
	akka-docs/rst/project/migration-guides.rst
	akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
	akka-persistence/src/main/scala/akka/persistence/Persistent.scala
	akka-persistence/src/test/scala/akka/persistence/PersistentActorSpec.scala
	project/AkkaBuild.scala
2014-06-10 11:09:12 +02:00
Patrik Nordwall
c1f7d7fa21 =doc #3924 Doc how to be notified when recovery completed 2014-03-25 10:46:05 +01:00
Roland Kuhn
4ba1bc46fb Merge pull request #2096 from akka/wip-forward-docs-∂π
=doc #3917 include all reference.conf
2014-03-24 12:03:10 +01:00
Roland Kuhn
d6b33d15a8 add links to reference.conf to docs 2014-03-24 12:02:47 +01:00
Björn Antonsson
26c493ea4a =per #3915 Make become work during recovery for EventsourcedProcessor et.c. 2014-03-22 00:47:03 +01:00
Roland Kuhn
98c282f115 =doc clean up what-is-akka.rst and switch to www.typesafe.com
the latter is necessary because of broken DNS requirements which make
apex domains brittle (since they must resolve to an A record with a
single IP)
2014-03-13 12:42:47 +01:00
Roland Kuhn
6cb4ed381d =doc document why Deliver takes an ActorPath 2014-02-27 15:04:38 +01:00
Martin Krasser
dc3164d1b1 =doc #3883 Eventsourced to Akka Persistence comparison/migration 2014-02-27 07:54:13 +01:00
Patrik Nordwall
48afb23586 =doc #3881 Change link to persistence community plugins 2014-02-20 11:47:43 +01:00
Martin Krasser
cf6e61e45a =per #3774 Persistence activator templates 2014-02-13 13:41:21 +01:00
Martin Krasser
63ce206ecf =per #3848 Link to external plugin list 2014-01-25 08:35:06 +01:00
Martin Krasser
e0f5cf5f2c !per #3828 Rename receiveReplay to receiveRecover
- because it handles messages related to recovery (snapshots and replayed messages)
2014-01-19 17:46:32 +01:00
Martin Krasser
f327e1e357 !per #3704 Persistence improvements
- Channel enhancements (#3773):
- Live read models (#3776):
- Batch-oriented journal plugin API (#3804):
- Batching of confirmations and deletions
- Message deletion enhancements (more efficient range deletions)
2014-01-17 13:36:55 +01:00
Patrik Nordwall
0a56fbf7d0 =doc Fix a few typos in docs 2013-12-15 17:42:03 +01:00
Martin Krasser
f55c711601 !per #3785 Change default implementation of processorId
- also affects channel ids.
2013-12-12 16:06:36 +01:00
Martin Krasser
4e5ce5529c !per #3761 Reliable channels
- Built-in redelivery mechanism for Channel and PersistentChannel
- redelivery counter on ConfirmablePersistent
- redeliveries out of initial message delivery order
- relative order of redelivered messages is preserved
- configurable redelivery policy (ChannelSettings)
- Major refactorings of channels (and channel tests)
- Throughput load test for PersistentChannel

Todo:

- Paged/throtlled replay (another pull request)
- Resequencer (another pull request)
2013-12-12 12:22:46 +01:00
Martin Krasser
d0bc8a6400 +per #3746 Remote sharing of LevelDB for testing purposes
Further changes

- remove obsolete identity checks in Eventsourced
- fix wrong serialize-messages config in tests
2013-12-03 08:51:25 +01:00
Martin Krasser
6e2f80bab0 !per #3729 Journaling protocol optimization
- internal batching of individually received Persistent messages
- testing fault tolerance of Processor in presence of random
  * journaling failures
  * processing failures
2013-11-27 13:51:27 +01:00
Martin Krasser
4489a72bea !per #3717 Deletion API for snapshots and persistent messages
- single and bulk deletion of messages
- single and bulk deletion of snapshots
- run journal and snapshot store as system actors
- rename physical parameter in delete methods to permanent
- StashSupport.prepend docs and implementation enhancements
2013-11-20 14:45:29 +01:00
Martin Krasser
ba9fc4da46 !per #3707 Channel enhancements
- Persistent channel
- ConfirmablePersistent message type delivered by channel
- Sender resolution performance improvements
   * unstash() instead of unstashAll()

These enhancements required the following changes

- Unified implementation of processor stash and user stash
- Persistence message plugin API separated from implementation
- Physical deletion of messages
2013-11-14 12:05:37 +01:00
Martin Krasser
1da3369643 !per #3681 Performance and consistency improvements
- batch-write of persistent messages (user API)
- batch-write of events (in EventsourcedProcessor)
- command processing in EventsourcedProcessor by unstashing messages one-by-one from the internal stash
   * fixes performance issues that come up with unstashAll
- commands are not looped through journal actor but processed directly
- initial performance tests
  * command sourcing
  * event sourcing
  * event sourcing with user stash operations
- suppress stack traces in tests
2013-10-30 15:08:15 +01:00
Martin Krasser
0a2cfdc4d1 +per #3661 Event sourcing support 2013-10-16 13:38:11 +02:00
Martin Krasser
2a30399a29 !per #3652 Custom snapshot and persistent message serialization
- Protobuf serializer for Persistent message
- Configurable serializer for Persistent message's payload
- Configurable serializer for snapshots
2013-10-14 17:35:04 +02:00
Martin Krasser
da7490bbc9 +per #3641 Storage plugin API
- Journal plugin API for storage backends with asynchronous client API (default impl: in-memory journal)
- Journal plugin API for storage backends with synchronous client API (default impl: LevelDB journal)
- Snapshot store plugin API (default impl: local filesystem snapshot store)
2013-10-08 11:46:32 +02:00
Martin Krasser
842ac672f7 !per #3631 Snapshotting
- capture and save snapshots of processor state
- start processor recovery from saved snapshots
- snapshot storage on local filesystem
- snapshot store completely isolated from journal
- LevelDB journal modularized (and completely re-rwritten)
- In-memory journal removed
2013-09-30 17:31:08 +02:00