Commit graph

447 commits

Author SHA1 Message Date
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
Marcin Kubala
f4793a399f =act,clu,con,doc,per,rem,sam #15114 append missing parens at Actor.sender() invocations 2014-06-20 23:05:51 +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
Evan Tsue
561e852868 =doc #15160 Minor spelling, wording and grammar fixes. 2014-05-11 10:14:50 -04:00
Konrad Malawski
403afada41 Merge pull request #15024 from ktoso/wip-removing-isTerminated-from-buses-ktoso
!act,doc Removing isTerminated from EventStream and ActorClassification
2014-04-25 10:16:53 +02:00
Konrad Malawski
c046cdff0a !act,doc #3893 Removed isTerminated checks from ActorClassification
Instead of isTerminated we now use death watch on subscribers.

! Breaking change - ActorClassification based event buses now require
  and actor system. Previously no actors were involved, but now someone
  has to `watch` the subscribers. The unsubscriber is an system actor,
  and won't be stopped automagically if a bus stops to be used (hard to
  determine what "stops being used" is)
* Replaced isTerminated checks with watching actors
* backing structure for ActorClassification swaped from
  ConcurrentHashMap to immutable.Map with CAS operations on it. This is
  required to avoid races and guarantee register/unregister ordering
  (messages sent with proper sequence numbers) to the unsubscriber.
  Performance tested it and still above 1.3million subscribe+unsubscribe
  ops per second (mac i7, retina), where as the CHM version was
  4 million - but that one could only work in the presence of
  itTerminated - so we pay the price here for removing it.
* `ActorClassification` starts the unsubscriber instance by itself,
  the unsubscriber is an system actor, and can be stopped via
  `ActorClassification#shutdown`
* Will unregister from unsubscriber, when no more subscriptions for
  given subscriber are left in this bus.
* Added missing "Java API: " for some types
* Updated docs to point out the automatic subscriber purging (on terminated)
2014-04-24 14:08:07 +02:00
Björn Antonsson
c8ea061472 =pro Update test dependencies to Scala 2.11 cross published versions 2014-04-23 13:58:38 +02:00
Stevo Slavić
8736fb16f9 Fixed a typo 2014-04-16 16:15:15 +02:00
Konrad Malawski
3421a966d6 Merge pull request #2125 from ktoso/3982-doc-clarify-eventstream-is-local-ktoso
=doc #3982 Clarify that EventStream is local only
2014-04-14 09:57:12 +02:00
Konrad Malawski
df90cc3a2e =doc #3982 Clarify that EventStream is local only
Devs were confused a few times on the mailing list if the eventstream
publishes to the cluster or not; Suggesting pub-sub if needed in clustered env.
2014-04-14 09:56:19 +02:00
Konrad Malawski
2173a037cb Merge pull request #2126 from ktoso/3986-cluster-singleton-may-become-doubleton-during-splits-ktoso
=doc #3986 Cluster Singleton should not be used with AutoDown
2014-04-10 15:39:31 +02:00
Konrad Malawski
08fd4c93fa =doc #3986 Cluster Singleton should not be used with AutoDown
unless you want each partition of the cluster (effectively new clusters),
to spin up their "own" singleton.
2014-04-10 15:38:22 +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
Roland Kuhn
bf2bf24c4a Merge pull request #2090 from akka/wip-remoting-multi-fix-∂π
Wip remoting multi fix ∂π (broken commits apart properly)
2014-03-22 15:19:45 +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
dc305eaf18 +act #3949 add LoggingReceive.withLabel
def someState = LoggingReceive.withLabel("some state") {
  case msg => ...
}
2014-03-21 20:43:13 +01:00
Patrik Nordwall
3a9725f538 Merge pull request #2070 from akka/wip-3843-singleton-proxy-sample-patriknw
=sam #3843 Use ClusterSingletonProxy in cluster samples
2014-03-17 14:58:18 +01:00
Roland Kuhn
95d27e3f82 Merge pull request #2067 from akka/wip-WhatIsAkka-∂π
=doc clean up what-is-akka.rst and switch to www.typesafe.com
2014-03-17 14:16:47 +01:00
Patrik Nordwall
ad18405877 =sam #3843 Use ClusterSingletonProxy in cluster samples 2014-03-14 16:32:59 +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
ac5f4fc72e Merge pull request #2050 from drexin/wip-3246-priority-mailbox-drexin
+act #3246 Added control aware mailbox types
2014-03-11 19:36:04 +01:00
Dario Rexin
c3950a7525 +act #3246 Added control aware mailbox types 2014-03-11 17:03:05 +01:00
dario.rexin
2cbad298d6 =all #3858 Make case classes final 2014-03-07 13:20:01 +01:00
Patrik Nordwall
dfef14a590 Merge pull request #2014 from trobert/master
Add the ability to use an external camel context
2014-03-06 13:16:53 +01:00
Roland Kuhn
9ed3c633c5 =doc #3905 describe symmetric remoting requirement 2014-03-04 17:38:27 +01:00
Roland Kuhn
f9ddb3757b Merge pull request #2043 from extesy/patch-1
=doc Fix typos in actors.rst
2014-03-04 16:35:13 +01:00
Oleg Anashkin
e2b0bb8d65 =doc Fixed typos in actor documentation 2014-03-04 06:56:57 -08:00
Björn Antonsson
35f2f215f6 Merge pull request #2040 from akka/wip-persistent-delivery-path-∂π
=doc document why Deliver takes an ActorPath
2014-03-04 13:44:00 +01:00
Björn Antonsson
96be914979 Merge pull request #2052 from akka/wip-3900-systemActorOf-∂π
+act #3900 make systemActorOf available to Extensions
2014-03-04 13:32:12 +01:00
Roland Kuhn
b5eeb08fde +act #3900 make systemActorOf available to Extensions 2014-03-03 12:00:25 +01:00
Björn Antonsson
0dcb6d6654 !act,doc #3831 Adding more Java with Lambda documentation and support
* The Java with Lambda support documentation for AbstractActor and AbstractFSM are now on par with Scala
* Many small fixes and additions of missing things
* Added an AbstractActorContext that has convenience functions for getChild and getChildren
2014-03-03 10:18:58 +01:00
Roland Kuhn
6cb4ed381d =doc document why Deliver takes an ActorPath 2014-02-27 15:04:38 +01:00
Roland Kuhn
d7283abfcb Merge pull request #2023 from ktoso/doc-3886-partialfunc-orelse-ktoso
=doc #3886 improved example of PartialFunction.orElse composition
2014-02-27 09:58:19 +01:00
Martin Krasser
dc3164d1b1 =doc #3883 Eventsourced to Akka Persistence comparison/migration 2014-02-27 07:54:13 +01:00
Patrik Nordwall
d1a7956d17 =doc Links to activator and some doc improvements 2014-02-21 11:24:01 +01:00
Thibaut Robert
c71987f4a7 +cam #3885 Add the ability to use an external camel context 2014-02-20 14:18:54 +01:00
Patrik Nordwall
48afb23586 =doc #3881 Change link to persistence community plugins 2014-02-20 11:47:43 +01:00
Konrad Malawski
b7dd2a6af5 =doc #3886 improved example of PartialFunction.orElse composition
Changed orElse composition example to better highlight it's
possibilities. This is a follow up PR based on a discussion on
akka-user: https://groups.google.com/forum/#!topic/akka-user/vVUZPMeJmzw
2014-02-20 09:19:04 +00:00
Martin Krasser
cf6e61e45a =per #3774 Persistence activator templates 2014-02-13 13:41:21 +01:00
Patrik Nordwall
57d831716a Merge pull request #2004 from akka/wip-3868-doc-remote-router-group-patriknw
=doc #3868 Clarify remote router group
2014-02-13 12:46:17 +01:00
Patrik Nordwall
cafa6585ce =doc #3868 Clarify remote router group 2014-02-13 12:45:42 +01:00
Patrik Nordwall
e6f679fe8b +sam #3689 Make activator template of the fsm sample 2014-02-13 12:39:36 +01:00
Patrik Nordwall
947b49c5b7 Merge pull request #1993 from akka/wip-2922-event-bus-sample-patriknw
!act,doc #2922 Doc event bus and fix Java API
2014-02-13 12:24:24 +01:00