Commit graph

1695 commits

Author SHA1 Message Date
Björn Antonsson
64ead35a83 Merge pull request #15812 from akka/wip-15033-tcp-connection-shutdown-master-ban
(Validation Only) =act #15033 Added test to verify tcp connection actor termination
2014-09-08 07:13:33 +02:00
Björn Antonsson
1044195a2a =act Make SerializationCompatibilitySpec pass on Scala 2.11.x
* The serailization format of Option has changed between Scala 2.10.x and 2.11.x
2014-09-05 14:17:52 +02:00
Björn Antonsson
190abe8126 =act #15033 Added test to verify tcp connection actor termination 2014-09-05 12:12:07 +02:00
Konrad Malawski
bb0955d635 Merge pull request #15782 from ktoso/wip-props-with-nulls-ktoso
=act,rem #13946 fix handling of null parameters in Props
2014-09-01 16:50:03 +02:00
Konrad 'ktoso' Malawski
f13d4975cc =act,rem #13946 fix handling of null parameters in Props
+ Props creation with nulls does not fail any longer
+ null values are now serialised properly and can be used in remote
  deployments too
+ added tests for Reflect.findConstructor
> does not change wire protocol, so that's open for discussion (if we
> want it to be more like SerialisedMessage or not)

Resolves #13946
2014-09-01 13:33:16 +02:00
Patrik Nordwall
33706eb725 Merge pull request #15781 from akka/wip-15027-FSMTimingSpec-patriknw
=act #15027 Harden FSMTimingSpec
2014-09-01 10:25:44 +02:00
Patrik Nordwall
27cb1d21cd =act #15027 Harden FSMTimingSpec 2014-08-29 14:44:34 +02:00
Patrik Nordwall
1ffd05db49 =act #13981 Encode name of Balancing dispatcher config path 2014-08-29 12:33:18 +02:00
Viktor Klang
b8c634451f +act - 15757 - Changes the signature of ActorSystem.terminate() and ActorSystem.whenTerminated() to be of Future[Terminated] iso Future[Unit] 2014-08-26 10:57:47 +02:00
Viktor Klang
cd8e97c060 +act - 15757 - Reworks implementation of ActorSystem shutdown
* deprecates awaitTermination, shutdown and isTerminated
  * introduces a terminate-method that returns a Future[Unit]
  * introduces a whenTerminated-method that returns a Future[Unit]
  * simplifies the implementation by removing blocking constructs
  * adds tests for terminate() and whenTerminated
2014-08-25 15:49:28 +02:00
Roland Kuhn
296f5a7cab Merge pull request #15503 from akka/wip-15501-add-bounded-nonblocking-mpmc-mailbox-√
+act - #15501 - Adding support for a Non-blocking, bounded, MPMC mailbox...
2014-08-20 16:05:57 +02:00
Patrik Nordwall
7659f333cb Merge pull request #15658 from akka/wip-coroner-adjustment-patriknw
=tes Increase coroner timeout for some tests
2014-08-20 07:44:20 +02:00
Martynas Mickevičius
200d6eb0d3 Merge pull request #15627 from 2m/udp-proto-family
!act #15626 expose DatagramChannel creation in SocketOption
2014-08-19 15:25:51 +03:00
Martynas Mickevicius
325e05ee27 !act #15626 expose DatagramChannel creation in DatagramChannelCreator
* move channel creation logic to a separate trait
* new Java API: AbstractSocketOption
2014-08-19 14:02:23 +03:00
Patrik Nordwall
a3e5d6b584 =tes Increase coroner timeout for some tests 2014-08-13 14:21:00 +02:00
Patrik Nordwall
813543e8f8 +act,slf #11715 Add configurable LoggingFilter
* The filter is used by the LoggingAdapter before publishing
  to the event bus
* Slf4jLoggingFilter uses backend log level configuration
  (e.g. logback.xml)
2014-08-11 20:08:44 +02:00
Viktor Klang
945fde4294 +act - #15501 - Adding support for a Non-blocking, bounded, MPMC mailbox called 'NonBlockingBoundedMailbox' 2014-08-08 14:20:39 +02:00
Martynas Mickevičius
9f1a4f8645 Merge pull request #15417 from hajile/master
+act #15502: Pluggable DNS resolution in akka-io
2014-08-02 20:20:05 +03:00
Krzysztof Janosz
1658f96862 +act #13004 Adding TailChopping router 2014-07-29 20:27:03 +02:00
Ilya Epifanov
5954302658 +act #15502: Pluggable DNS resolution in akka-io 2014-07-29 00:12:58 +04:00
drewhk
b88c964bd4 Merge pull request #15573 from spray/w/fix-TCP-pull-mode
=act #15572 don't read recursively in pullMode when a complete buffer was read
2014-07-28 10:19:19 +02:00
Johannes Rudolph
1e0b61a160 =act #15572 don't read recursively in pullMode when a complete buffer was read 2014-07-24 11:02:08 +02:00
Michael R. Maletich
a6d3704ef6 !act #13490 Changed the callback to SocketOption to accept a channel instead of a Socket, this allows for using the nio features.
For example in Java 7 you can now join a multicast group:

case class JoinGroup(group: InetAddress, networkInterface: NetworkInterface) extends SocketOption {

  override def afterConnect(c: DatagramChannel): Unit = {
    c.join(group, networkInterface)
  }
}

  IO(Udp) ! Udp.Bind(self, new InetSocketAddress(MulticastListener.port),
    options=List(ReuseAddress(true),
      JoinGroup(MulticastListener.group, MulticastListener.interf)))

Other minor changes:

 - changed all methods in SocketOption to take a Channel instead of a Socket.  The socket can be gotten from the Channel but not the reverse.
 - all methods that are called before the bind are now called beforeBind for consistency.
 - All network connections now call the beforeBind and afterConnect.
2014-07-22 20:22:53 -05:00
Łukasz Dubiel
2c88bb1169
=act #13970 Send transistion on goto(CurrentState) in FSM
When in `A`:
* `goto(A)` will trigger `onTransition(A -> A)`
* `stay()` will NOT trigger `onTransition`

Includes:
* migration guide
* docs updates
* test
2014-07-18 17:36:55 +02:00
Konrad 'ktoso' Malawski
ba2411833a +doc #15537 add Typed router pattern
Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
2014-07-15 10:22:23 +02:00
Patrik Nordwall
018e0c33b5 Merge pull request #15465 from akka/wip-15284-throws-annotation-master-patriknw
+act #15284 Add throws TimeoutException to Inbox.receive
2014-06-27 14:56:23 +02:00
Patrik Nordwall
a60f828819 Merge pull request #15464 from akka/wip-13965-15361-master-patriknw
#13965 #15361 cherry picks to master (for validation)
2014-06-27 14:27:53 +02:00
Patrik Nordwall
c11de95dd7 Merge pull request #15414 from akka/wip-13942-LoggingReceive-optimization-patriknw
=act #13942 Avoid allocations in LoggingReceived when disabled
2014-06-27 12:37:38 +02:00
Patrik Nordwall
3a94510869 +act #15284 Add throws TimeoutException to Inbox.receive
(cherry picked from commit ab19cc8a527f1a01a8180c2b199affcb47e5b1d2)
2014-06-27 12:29:11 +02:00
Patrik Nordwall
7616a41733 =act #15361 Require non-abstract actor class (earlier)
* It was detected previously as well when trying to find constructor,
  but with a perhaps confusing error message

(cherry picked from commit 15e964b13e91962474c7907787c37121aae8fd4e)
2014-06-27 12:21:53 +02:00
Johannes Rudolph
657afbd859 +act #15383 add strict japi.Option.getOrElse to simplify working with options from Java 2014-06-24 13:29:16 +02:00
Konrad Malawski
c8406e3466 Merge pull request #15416 from mkubala/missing-sender-parens-mkubala
=act,clu,con,doc,per,rem,sam #15114 append missing parens at sender invocations
2014-06-24 11:37:43 +02:00
Patrik Nordwall
0fd9198f5d +act #13992 Improve identify replies of wildcard selections
(cherry picked from commit 4747b18d66fafb5699168288b09b7f39da5c2e4e)

Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorSelection.scala
	project/AkkaBuild.scala
2014-06-23 12:19:03 +02:00
Patrik Nordwall
f6e25fe773 =act #13942 Avoid allocations in LoggingReceived when disabled 2014-06-23 11:44:10 +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
Patrik Nordwall
ca4dda10ea =act #13678 #15149 Reply with ActorIdentity(None) from deadLetters
(cherry picked from commit b2f96668baf9efa77de5f97223f055c0a78d0cb8)
2014-06-05 08:28:40 +02:00
Konrad 'ktoso' Malawski
14479536ad =act #15217 the watching message is generated always,
so the test should await on both, before it expects the
unsubscribing message, otherwise it's racy.

Resolves #15217
2014-05-19 12:01:03 +02:00
Konrad 'ktoso' Malawski
26936e999f =act #15165 should fix out-of-bounds in actor creation
Other than that, also improved failure logging when AIOOB happens in the histogram
Added a test which shows why the updateWithExpectedInterval method
should be preferred too.
2014-05-14 16:33:41 +02:00
Martynas Mickevicius
fdcd964165 =pro #15031 separate sbt build file for every module 2014-05-14 10:05:09 +02:00
Roland Kuhn
7900586b69 =act add one more test to routing.BalancingSpec
see #13964
2014-05-12 11:05:53 +02:00
Roland Kuhn
e43e48329c Merge pull request #2127 from dormidon/3964-unable-to-configure-mailbox-for-routees-under-balancingpool-in-akka-2-3-1
Mailbox configuration for routees under BalancingPool - Issue 3964 fix
2014-05-12 10:08:59 +02:00
dormidon
1ea7653a79 =act #13964 make BalancingPool mailbox configurable 2014-05-10 16:58:00 +04:00
Konrad 'ktoso' Malawski
684c0279ec =act,tes Initial draft of internal MetricsKit
Note: This is NOT aimed to provide an micro-benchmarking solution.
The goal is to provide data for broad trend analysis. For techniques
that fight the inliner and other specialised techniques, refer to JMH.

+ custom console and graphite reporters
  - had to be custom because it's not possible to add custom metric
    types to the existing reporters
+ initial hdr.Histogram histogram() provider, see
  http://latencyutils.github.io/LatencyUtils/
+ Not using timers provided by Metrics, instead use the above histogram
+ Added average Actor size measurement
+ Measuring the "blocking time" when an actor is created, before we fire
  of the async part of this process; Measures in loop and will fluctuate
  a lot. Times are in `us` -- System.nanoTime should provide good enough
  resolution.
+ Measuring total actor creation time by using
  `KnownOpsInTimespanTimer`, which given a known number of ops, in a
  large amount of time, roughtly estimates time per one operation.
  // Yes, we are aware of the possibility of GC pauses and other horrors
+ All classes are `private[akka]`, we should not encourage people to use
  this yet
+ Counters use Java 8's `LongAdder`, which is metric's private;
  The new trend in Java land will be copy paste-ing this class ;)
+ Metrics are logged to Graphite, so we can long-term analyse these
+ Reporters are configurable using typesafe-config

! I'm not very happy about how I work around Metrics not being too open
  for adding additional custom metrics. Seems like a hack at places.
  I will consider removing the Metrics dependency all together.
  numbers

Example output:

```
-- KnownOpsInTimespanTimer-------------------------------------------
  actor-creation.total.creating-100000-actors.Props|new-EmptyArgsActor|…||-same
               ops = 100000
              time = 1.969 s
             ops/s = 50782.22
               avg = 19.69 μs

-- AveragingGauge---------------------------------------------------
  actor-creation.Props|new-EmptyArgsActor|…||-same.avg-mem-per-actor
                avg = 439.67
```
2014-05-08 14:52:39 +02: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
Konrad Malawski
f57470926e =act #3623 unsubscribe when actors terminate, instead of isTerminated
* Moved to removing actors proactively when they are terminated instead of
  checking `isTerminated` during publish.
* Subscribers which have registered before initializing the unsubscriber
  will be aggregated in a Seq until one is registered and then it will
  take responsibility of unregistering them on termination.
* Initialization of the unsubscriber can only be run once - attempting
  to initialize the event stream with another unsubscriber will fail,
  and init will return false.
* Assumed having an init (mutable) method on the `EventBus` is fine, as
  it has such methods already and @patriknw's comment in the task for
  this.
* since we must check if the subscriber has any subscribed channels left
  we had to expose this detail from SubchannelClassification via
  `hasSubscriptions`. Increases cost of ubsubscribe(actor, channel) a bit.
* Evacuated the expensive `hasSubscription` call out of eventstream's `unsubscribe` call, and instead making the Unsubscriber check this before it stops watching an actor. If in the mean time the same actor got subscribed, there will be a new Subscribe message emited - so we're good on that side. Also, if it would terminate before the unsubscriber gets the Register message it will call `watch(actor)` on a dead actor, which results in getting Terminated for it, thus we'll stop watching it from the Unsubscriber as expected.

Final squash and small cleanup. Please review again;
2014-04-16 12:13:21 +02:00
Patrik Nordwall
a02e138f3b =tes Remove some old (dead) test/sample code 2014-04-15 11:40:46 +02:00
Patrik Nordwall
f677ed0b68 =pro sbt-0.13.2-RC2 with name hashing, scala 2.10.4
* take advantage of latest incremental compiler improvements
* scala 2.10.4
* Remove workaround in FutureSpec, bug fixed in Scala 2.10.4
* Change version of samples to allow snapshot overwrite in publishM2
* allow publish overwrite for osgi-dining-hakkers/uncommons
2014-04-11 14:11:02 +02:00
Patrik Nordwall
c3b237ce8d Merge pull request #2066 from akka/wip-3920-remove-deprecated-patiknw
Remove deprecated features
2014-03-14 14:20:05 +01:00
Patrik Nordwall
e1eec61ca5 !act #3920 Remove Timeout constructor without unit 2014-03-14 14:12:33 +01:00