Commit graph

108 commits

Author SHA1 Message Date
Björn Antonsson
4e1100f84d =doc #3639 Show complete custom mailbox example. 2013-10-15 12:18:17 +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
Martin Krasser
6c78629cdb !per #3618 Cleanup duplication of life cycle hooks in Processor
- introduce around life cycle hooks for symmetry with aroundReceive
 - no custom processor-specific life cycle hooks needed any more
 - preStart and preRestart can be overridden with empty implementation
    (interceptors ensure that super.preXxx calls are still executed)
 - all around life cycle hooks can be final
 - standard life cycle hooks are non-final to preserve composability with existing traits (FSM, ...)
2013-09-18 14:41:38 +02:00
Martin Krasser
cdeea924ff akka-persistence prototype
The most prominent changes compared to eventsourced are:

- No central processor and channel registry any more
- Auto-recovery of processors on start and restart (can be disabled)
- Recovery of processor networks doesn't require coordination
- Explicit channel activation not needed any more
- Message sequence numbers generated per processor (no gaps)
- Sender references are journaled along with messages
- Processors can determine their recovery status
- No custom API on extension object, only messages
- Journal created by extension from config, not by application
- Applications only interact with processors and channels via messages
- Internal design prepared for having processor-specific journal actors (for later optimization possibilities)

Further additions and changes during review:

- Allow processor implementation classes to use inherited stash
- Channel support to resolve (potentially invalid) sender references
- Logical intead of physical deletion of messages
- Pinned dispatcher for LevelDB journal
- Processor can handle failures during recovery
- Message renamed to Persistent

This prototype has the following limitations:

- Serialization of persistent messages and their payload via JavaSerializer only (will be configurable later)
- The LevelDB journal implementation based on a LevelDB Java port, not the native LevelDB (will be configurable later)

The following features will be added later using separate tickets:

- Snapshot-based recovery
- Reliable channels
- Journal plugin API
- Optimizations
- ...
2013-09-14 14:19:38 +02:00
Patrik Nordwall
a481272b67 Keep the order of buffered messages in Camel producer, see #3477
* fix bug in java sample
* doc corrections
2013-06-27 16:45:47 +02:00
Patrik Nordwall
9b3be181cf Java (Eclipse) compatibility of extensions, see #3469
* Eclipse JDT showed compilation error
  "The method get(ActorSystem) is ambiguous for the type..."
  for extensions defined with ExtensionKey
2013-06-24 20:27:23 +02:00
Roland Kuhn
a2a646af4e add ActorRef.noSender() for the Java API, see #3429
- Actor.noSender is not accessible from Java, but it was in 2.1 so don’t
  remove
- replaced all “null” in doc tests with ActorRef.noSender()
2013-06-20 15:51:23 +02:00
Roland Kuhn
8df8541801 Merge pull request #1500 from akka/wip-3210-local-only-∂π
make LocalScope mean “purely local” and avoid Props serialization check,...
2013-05-30 08:03:32 -07:00
Patrik Nordwall
07baf05bae harmonize MyActor.props pattern, see #3418 2013-05-30 14:50:46 +02:00
Patrik Nordwall
95366cb585 Wrap long lines, for pdf 2013-05-30 14:45:15 +02:00
Roland Kuhn
9c89f170d2 Merge pull request #1490 from akka/wip-3377-Props.create-∂π
improve safety of Props.create by allowing Creator<T>, see #3377
2013-05-29 22:46:06 -07:00
Roland
f8fa825e48 improve safety of Props.create by allowing Creator<T>, see #3377
Props constructors need to be deprecated instead of being mutated
because we cannot just start throwing exceptions in people’s existing
code. Props.withCreator is deprecated for similar reasons, but also
because Props are about the creators, so replacing that after the fact
is not good style.
2013-05-29 23:40:27 +02:00
Roland
f802c94b9b remove fallback to default-dispatcher, see #3394 2013-05-28 15:40:00 +02:00
Roland
b6efd467e8 add ScalaDocs and correct UDP docs, see 3268 2013-05-26 18:29:23 +02:00
Roland
ea5b79e562 add BackpressureBuffer, see #3253
- also make a Write’s “ack” be a Tcp.Event (to suit pipelines)
- add stress test for BackpressureBuffer
- add it to SslTlsSupportSpec
- add it to the docs
2013-05-26 10:58:55 +02:00
Roland
e6655ec157 add Futures.promise to the docs 2013-05-09 21:50:28 +02:00
Björn Antonsson
9c5cc24ba7 Some more test cleanup to not create so many threads. See #3320 2013-05-08 12:42:15 +02:00
Björn Antonsson
e00ab533bb Wait on shutdown of extra actor systems in tests. See #3217 2013-05-07 11:02:03 +02:00
Roland
651f699893 add akka.Main and use that to add Hello World docs
- akka.Main will start an ActorSystem and one actor; when that actor
  terminates the system is shut down
- HelloWorld sample with two actors
2013-04-30 11:31:17 +02:00
Björn Antonsson
bceef2648c Merge pull request #1343 from akka/wip-2687-per-actor-class-configurable-mailboxes-ban
Allow different types of mailboxes on the same dispatcher #2687
2013-04-19 04:49:40 -07:00
Björn Antonsson
c3eed374f1 Allow different types of mailboxes on the same dispatcher. See #2687 2013-04-19 13:42:58 +02:00
Roland
9ba8b115ec add SslTlsSupport (ported from spray-io), see #3236
- also added TcpPipelineHandler for wrapping a pipeline
- added Java & Scala docs with a complete example
- test verify interop with standard blocking java SSL client and server
- test is placed in akka-remote to benefit from AkkaProvider for
  SecureRandom; should be moved into akka-actor eventually
2013-04-19 12:01:35 +02:00
Roland
0e34edbcb3 implement ResumeWriting, see #3200
also included:
- a complete rewrite of the TCP docs based on real/tested/working code
  samples
- an EchoServer implementation which handles all the edge cases,
  available in Java & Scala
- renamed StopReading to SuspendReading to match up with ResumeReading
- addition of Inbox.watch()
- Inbox RST docs for Java(!) and Scala

not included:
- ScalaDoc / JavaDoc for all IO stuff
2013-04-18 15:05:48 +02:00
Roland
28aad82b1a deprecate closure-taking Props factories, see #3081
- base Props on Deploy, Class and Seq[Any] (i.e. constructor args)
- remove deprecated Props usage from akka-docs sample code
- rewrite UntypedActorDocTestBase
- rewrite Java/Scala doc section on actor creation
- add migration guide entry
2013-04-16 12:48:31 +02:00
Roland Kuhn
2375972969 Merge pull request #1291 from akka/wip-3174-pipelines-∂π
implement and document Pipelines, see #3174
2013-04-08 13:13:23 -07:00
Patrik Nordwall
9f45dd90b7 Merge pull request #1304 from akka/wip-2839-dispatcher-deploy-config-patriknw
Add dispatcherId to deployment config, see #2839
2013-04-08 12:03:43 -07:00
Roland
d794b14b2b implement and document Pipelines, see #3174
- heavily inspired by spray.io.Pipeline
- fully functional style: a stage returns the resulting commands and
  events, which makes it impossible to mess with the pipeline from the
  inside
- object allocations are optimized away for emtpy and 1-elem results
- added type-safety, verifying that stages match up
- management commands “from the side” for configuration or async events
- full Java API and docs
2013-04-08 20:57:04 +02:00
Roland
d9d7d45ac2 add @throws annotation to actor life-cycle hooks, see #3188 2013-04-08 20:55:04 +02:00
Patrik Nordwall
c77cdeb86b Merge pull request #1277 from akka/wip-3074-deprecate-actorFor-patriknw
Deprecate actorFor in favor of ActorSelection, see #3074
2013-04-08 11:48:48 -07:00
Patrik Nordwall
887af975ae Deprecate actorFor in favor of ActorSelection, see #3074
* Deprecate all actorFor methods
* resolveActorRef in provider
* Identify auto receive message
* Support ActorPath in actorSelection
* Support remote actor selections
* Additional tests of actor selection
* Update tests (keep most actorFor tests)
* Update samples to use actorSelection
* Updates to documentation
* Migration guide, including motivation
2013-04-08 18:11:52 +02:00
Patrik Nordwall
ae0cb4a756 Add dispatcher to deployment config, see #2839 2013-04-08 09:52:56 +02:00
Roland
309f2c2f91 rename UdpFF->Udp and the other UdpConnected, see #3058 2013-04-04 09:04:30 +02:00
Viktor Klang (√)
0d510ff031 Merge pull request #1290 from akka/wip-3077-deprecate-isTerminated-√
#3077 - Deprecating ActorRef.isTerminated
2013-04-03 15:44:20 -07:00
Viktor Klang
7b263365aa #3077 - Deprecating ActorRef.isTerminated 2013-04-03 23:57:28 +02:00
Viktor Klang (√)
641e499cc4 Merge pull request #1287 from akka/wip-2970-lightweight-ec-form-promiseactorref-√
#2970 - Removing scheduler and dispatcher from ARP and reimplementing P...
2013-04-03 11:23:54 -07:00
Viktor Klang
fcfe7b4617 #2970 - Removing scheduler and dispatcher from ARP and reimplementing PromiseActorRef to use an internal calling thread EC 2013-04-03 19:12:03 +02:00
Viktor Klang
6976317bc7 Merged with master 2013-04-03 16:21:22 +02:00
Björn Antonsson
a4ab7a9841 Cleaning up the ActorRef serialization according to review. See #3137 2013-04-03 10:49:38 +02:00
Björn Antonsson
33080a4155 Correctly serialize local actor refs from other actor systems. See #3137 2013-04-03 10:32:13 +02:00
Viktor Klang
c883705242 #3018 - Enabling -Xlint and dealing with the situation that occurs 2013-03-29 01:43:17 +01:00
Patrik Nordwall
118917d2be awaitCond = awaitCond with better error reporting, see #3168 2013-03-25 12:58:25 +01:00
Patrik Nordwall
b738487dc8 Add UID to RemoteActorRef, see #3072
* Sending to a previous incarnation of an actor shall fail,
  to make remote actors work the same way as local ones (in
  the sense that after Terminated() the ref is not working anymore)
* Changed equality of ActorRef to take the uid into account
* Parse uid fragment in RelativeActorPath and ActorPathExtractor
* Handle uid in getChild and in RemoteSystemDaemon
* Use toSerializationFormat and toSerializationFormatWithAddress
  in serialization
* Replaced var uid in ActorCell and ChildRestartStats with
  constructor parameters (path)
* Create the uid in one single place, in makeChild in parent
* Handle ActorRef with and without uid in DeathWatch
* Optimize ActorPath.toString and friends
* Update documentation and migration guide
2013-03-21 20:25:16 +01:00
Roland Kuhn
5b819f4784 Merge pull request #1213 from kevinwright/abstract-agent-3108
Made `Agent` an abstract trait
2013-03-06 06:26:32 -08:00
Patrik Nordwall
0e7063b4bf Adjust timing in FutureDocTestBase, see #3112
* Corresponding scala test uses the same value
2013-03-05 11:01:04 +01:00
Kevin Wright
f305ed72a8 Made Agent an abstract class, pushed existing implementation into a private SecretAgent class and added a java-lovin' factory method. See #3108 2013-02-28 23:14:46 +00:00
Endre Sándor Varga
7bf9f1f82b Added patterns for initialization for Scala #2297
(cherry-picked from e2aa3b5)
2013-02-22 14:13:32 +01:00
Patrik Nordwall
dc9ac4dc57 Java docs and sample of durable mailbox, see #2761
* Added abstract class DurableMessageQueueWithSerialization
(cherry picked from commit 49720e8cd09243ffea9f02c245e0053c126bf555)
2013-02-20 12:52:28 +01:00
Rich Dougherty
65ef38d405 Merge pull request #1135 from akka/wip-3047-edit-io-docs-rich
Edit of I/O docs. Fixes #3047
2013-02-19 02:16:10 -08:00