Commit graph

29 commits

Author SHA1 Message Date
Martynas Mickevičius
292face28a #20587 Clean artery configuration (#21279)
* Move artery settings from remoting settings to dedicated class.
* #20587 Move hardcoded settings to configuration file.
* Copy reused settings from remote to the artery
2016-09-01 08:07:39 +02:00
Patrik Nordwall
0c0e3c5efd Refactoring of outbound compression, #21210
* outbound compression is now immutable, by simply using
  CompressionTable[ActorRef] and CompressionTable[String]
* immutable outbound compression will make it possible to use
  them from multiple Encoder instances, when we add several lanes
  for parallel serialization
* outbound compression tables not shared via AssociationState
* the advertised tables are sent to the Encoder stage via async
  callback, no need to reference the tables in other places than
  the Encoder stage, no more races via shared mutable state
* when outbound stream is started or restarted it can start out
  without compression, until next advertisement is received
* ensure outbound compression is cleared before handshake is signaled complete
2016-08-26 15:21:03 +02:00
Johan Andrén
af5eb4c6bf WIP separate prio artery channel (#21278)
* First incorrect stab - separate prio channel

* Send prio messages over the control stream
2016-08-26 14:44:33 +02:00
Patrik Nordwall
21a4899054 use the new WildcardIndex 2016-08-23 20:38:39 +02:00
Patrik Nordwall
5e90d4db40 =art place OutboundTestStage after SystemMessageDelivery stage (#20899)
* failing test was akka.cluster.AttemptSysMsgRedelivery when
  running with Artery
* we rely on that system messages are not dropped before
  the redelivery stage, i.e. blackhole must be after that
2016-07-08 01:00:41 +02:00
Konrad Malawski
d1015c1dc6 Compression tables properly *used* for Outgoing Compression (#20874)
* =art now correctly compresses and 2 table mode working
* =art AGRESSIVELY optimising hashing, not convienved about correctness yet
* fix HandshakeShouldDropCompressionTableSpec
2016-07-04 16:48:11 +02:00
Patrik Nordwall
b2089d06a7 new OutboundEnvelope
* instead of the old Send
* optional recipient, remove of dummy
* pool of OutboundEnvelope
2016-07-01 14:06:48 +02:00
Patrik Nordwall
a021eb5ff4 flush messages on shutdown, #20811
* StreamSupervisor as system actor so that it is
  stopped after ordinary actors
* when transport is shutdown send flush message to all
  outbound associations (over control stream) and wait for ack
  or timeout
2016-07-01 12:29:05 +02:00
Konrad Malawski
d99274a51f =art #20455 compression tables advertised as a whole "2 tables mode" (#20863)
Squashed commit of the following:

commit 6dc45364eb285338885bc8a5f1c4f293a29a53fb
Author: Konrad Malawski <konrad.malawski@project13.pl>
Date:   Fri Jun 24 19:03:58 2016 +0200

    =art moved successfuly to 2 table mode
    envelope format prepared, versioned tables

    2 table mode working

commit 517723c5d61969988a9a93b99666824bf5bccb52
Author: Konrad Malawski <konrad.malawski@project13.pl>
Date:   Fri Jun 24 10:28:02 2016 +0200

    WIP

commit 3e05a733e087e0d5bd8df9cc4fff0d4bc1314ec8
Author: Konrad Malawski <konrad.malawski@project13.pl>
Date:   Wed May 18 02:28:12 2016 +0200

commit b51f1766a94b202cd42fcc9d5402327ad0800d2d
Author: Konrad Malawski <konrad.malawski@project13.pl>
Date:   Thu Apr 28 10:56:58 2016 +0200

    +art #20455 HeavyHitters and CountMinSketch prepared for Compression
2016-07-01 11:54:57 +02:00
Konrad Malawski
e818887bb2 +art #20455 HeavyHitters, CountMinSketch => ActorRef Compression
* +art #20455 HeavyHitters and CountMinSketch prepared for Compression

* +art #20455 compression tables and integration specs
2016-06-23 11:58:54 +02:00
Patrik Nordwall
5c234940c6 make remote deployment work with Artery, #20715
There were two related problems with remote deployment when
using Artery.

* DaemonMsgCreate is not a SystemMessage, but must be sent over the control stream because
  remote deployment process depends on message ordering for DaemonMsgCreate and Watch messages.
  It must also be sent over the ordinary message stream so that it arrives (and creates the
  destination) before the first ordinary message arrives.
* The first point solves the creation of the remote deployed actor but it's not enough.
  Resolve of the recipient actor ref may still happen before the actor is created. This
  is solved by retrying the resolve for the first message of a remote deployed actor.
2016-06-10 15:15:57 +02:00
Patrik Nordwall
7ce6dffabf send dropped system messages to deadLetters
* publish remote lifecycle event for quarantined
2016-06-10 13:21:17 +02:00
Patrik Nordwall
7a1a316e8a reduce allocations with specialized ImmutableLongMap (#20750)
* reduce allocations with specialized ImmutableLongMap

* backed by arrays, allocation free lookups with binary search
* use it for UID -> Association Map
* pass Association in InboundEnvelope to reduce to only
  one lookup per incoming message
* use ImmutableLongMap instead of the QuarantinedUIDSet
2016-06-10 13:04:23 +02:00
Patrik Nordwall
a814034342 Option value class, to avoid allocations for optional sender 2016-06-07 18:58:59 +02:00
Patrik Nordwall
c808522f6d optimize access to association UniqueAddress 2016-06-07 18:58:58 +02:00
Patrik Nordwall
ea231b1cbc test support for blackhole in Artery, #20589 2016-06-07 15:47:12 +02:00
Patrik Nordwall
d236b8e152 new queue Source for remote sends
* new SendQueue Source based on agrona ManyToOneConcurrentArrayQueue
* jmh benchmark for send queue
* JMH benchmark for Source.queue, Source.actorRef and the new SendQueue
* inject the queue so that we can start sending to it before materialization
* Get rid of computeIfAbsent in the AssociationRegistry
  by making it possible to send (enque) messages to the
  Association instance immediatly after construction.
2016-06-03 17:23:19 +02:00
Patrik Nordwall
3465a221f0 format with new Scalariform version
* and fix mima issue
2016-06-03 12:56:49 +02:00
Patrik Nordwall
7505393c89 initiate new handshake after restart of receiving system, #20568
* we don't want to include the full origin address in each message,
  only the UID
* that means that the restarted receiving system can't initate a
  new handshake immediately when it sees message from unknown origin
* instead we inject HandshakeReq from the sending system once in a while
  (1 per second) which will trigger the new handshake
* any messages that arrives before the HandshakeReq are dropped, but
  that is fine since the system was just restarted anyway
* note that the injected handshake is only done for active connections,
  when a message is sent
* also changed the UID to a Long, but there are more places in old remoting
  that must be changed before we actually can use a Long value

fix lost first message, #20566

* the first message was sometimes dropped by the InboundHandshake stage
  because it came from unknown origin, i.e. the handshake had not completed
* that happended because the ordinary messagage arrived before the
  first HandshakeReq, which may happen since we sent the HandshakeReq
  over the control stream
* this changes so that HandshakeReq is sent over the same stream, not
  only on the control stream and thereby the HandshakeReq will arrive
  before any other message
* always send HandshakeReq as first message
  * also when the handshake on sender side has been completed at startup
  * moved code from preStart to onPull
2016-05-27 17:05:23 +02:00
Patrik Nordwall
5b7c978844 add JMH benchmark for encoder decoder stage
* CodecBenchmark that tests encode, decode and combined
  encode + decode
* refactoring of codec stages to make it possible to
  run them without real ArteryTransport
* also fixed a bug in inbound stream for large messages,
  it was using wrong envelope pool
2016-05-27 12:21:30 +02:00
Patrik Nordwall
e9e65c463f improve restart logging 2016-05-20 13:51:39 +02:00
Patrik Nordwall
c90121485f give up sending after a while, #20317 2016-05-20 13:51:39 +02:00
Johan Andrén
cd71643a91 [WIP] Large message stream for Artery (#20545)
* First stab at separate large message channel for Artery

* Full actor paths, no implicit "/user/" part

* Various small fixes after review

* Fixes to make it work after rebasing

* Use a separate EnvelopeBufferPool for the large message stream

* Docs for actorSelection not sending through large message stream
2016-05-20 12:40:56 +02:00
Patrik Nordwall
96b697d92f handle stream failures by restarting, #20317
* allow X restarts within Y seconds
* and handle handshake timeout
2016-05-18 08:13:22 +02:00
Patrik Nordwall
d4c086c0ff add quarantining state and inbound quarantine check, #20313
* InboundQuarantineCheck stage sends back Quarantined control
  message if sender system is quarantined
* Ported old RemoteRestartedQuarantinedSpec
* outbound quarantine check and piercing with ActorSelectionMessage
* port of old RemoteQuarantinePiercingSpec and PiercingShouldKeepQuarantineSpec
* quarantine if sys msg buffer overflow
2016-05-18 08:07:46 +02:00
Patrik Nordwall
67325da722 init new handshake for unknown origin, receiver restarted, #20313
* handle UID incarnations, shared association state that can be swapped
  for new handshakes
* detect that message comes from unknown origin and then initiate new
  handshake (handled by InboundHandshake stage)
* simplify the OutboundHandshake stage
  * doesn't have to listen for HandshakeRsp replies, it can just listen
    to when the uniqueRemoteAddress future is completed, InboundHandshake
    stage completes the handshake when it receives HandshakeRsp
  * send the HandshakeReq via the control message ingress, instead of
    pushing it downstreams, than also means that HandshakeReq is only sent
    on the control stream, which is good
* materialization race condition
2016-05-18 08:01:46 +02:00
Patrik Nordwall
8a04b6d05a rename reply to control 2016-05-12 08:56:28 +02:00
Patrik Nordwall
87386e18cf inject outgoing control messages at lower level
* instead of sending the the control messages (e.g. handshake reply,
  sys msg ack) via the normal message send ingress point they are
  now injected via side channel and will therefore not go through
  higher level stages such as handshake and system message delivery
2016-05-12 08:10:28 +02:00
Patrik Nordwall
16cf8d4ab6 first stab at handshake, #20313
* UID exchange with handshake stages
* second iteration of reply side-channel, observable
* InboundContext and OutboundContext to facilitate testing
  without real transport
* collapse ArterySubsystem and Transport into ArteryTransport
* incomplete HandshakeRestartReceiverSpec (origin address missing
  to be able to implement that part
* remove embedded aeron media driver directory on shutdown
2016-05-11 12:17:37 +02:00