From ffd59fbd9ac262b7aba4b86e7da4992a3e668e24 Mon Sep 17 00:00:00 2001
From: Rickard Green
Date: Tue, 1 Aug 2017 18:34:58 +0200
Subject: Introduce sender in distributed signals and dflag configuration
---
erts/doc/src/alt_dist.xml | 69 +++++++++++++++++++++++++++++++++++++
erts/doc/src/erl_dist_protocol.xml | 70 ++++++++++++++++++++++++++++++++++++++
erts/doc/src/erlang.xml | 19 +++--------
3 files changed, 143 insertions(+), 15 deletions(-)
(limited to 'erts/doc/src')
diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml
index 300f75dc13..d3731a5391 100644
--- a/erts/doc/src/alt_dist.xml
+++ b/erts/doc/src/alt_dist.xml
@@ -760,10 +760,79 @@
Only used during handshake phase.
+
+ add_flags
+ -
+
+ Distribution flags
+ to add to the connection. Currently all (non obsolete) flags will
+ automatically be enabled.
+
+
+ This flag field is optional.
+
+
+
+ reject_flags
+ -
+
+ Distribution flags
+ to reject. Currently the following distribution flags can be rejected:
+
+
+ DFLAG_DIST_HDR_ATOM_CACHE
+ - Do not use atom cache over this connection.
+ DFLAGS_STRICT_ORDER_DELIVERY
+ - Do not use any features that require strict
+ order delivery.
+
+
+ This flag field is optional.
+
+
+
+ require_flags
+ -
+
+ Require these distribution
+ flags to be used. The connection will be aborted during the
+ handshake if the other end does not use them.
+
+
+ This flag field is optional.
+
+
+
+
+ Distribution Data Delivery
+
+ When using the default configuration, the data to pass
+ over a connection needs to be delivered as is
+ to the node on the receiving end in the exact same
+ order, with no loss of data what so ever, as sent
+ from the sending node.
+
+
+ The data delivery order can be relaxed by disabling
+ features that require strict ordering. This is done by
+ passing the ?DFLAGS_STRICT_ORDER_DELIVERY
+ distribution
+ flags in the
+ reject_flags
+ field of the #hs_data{}
+ record used when setting up the connection. When relaxed
+ ordering is used, only the order of signals with the same
+ sender/receiver pair has to be preserved.
+ However, note that disabling the features that require
+ strict ordering may have a negative impact on performance,
+ throughput, and/or latency.
+
+
+
Enable Your Distribution Module
diff --git a/erts/doc/src/erl_dist_protocol.xml b/erts/doc/src/erl_dist_protocol.xml
index 610351db6c..a78b13aaa4 100644
--- a/erts/doc/src/erl_dist_protocol.xml
+++ b/erts/doc/src/erl_dist_protocol.xml
@@ -829,7 +829,31 @@ DiB == gen_digest(ChA, ICA)?
-
The node understand UTF-8 encoded atoms.
+ -define(DFLAG_MAP_TAG, 16#20000).
+ -
+
The node understand the map tag.
+
+ -define(DFLAG_BIG_CREATION, 16#40000).
+ -
+
The node understand big node creation.
+
+ -define(DFLAG_SEND_SENDER, 16#80000).
+ -
+
+ Use the SEND_SENDER
+ control message
+ instead of the SEND control message and use the
+ SEND_SENDER_TT control message instead
+ of the SEND_TT control message.
+
+
+
+ There are also a collection of DFLAGs bitwise or:ed
+ together in the DFLAGS_STRICT_ORDER_DELIVERY macro.
+ These flags corresponds to features that require strict
+ ordering of data over distribution channels.
+
@@ -922,6 +946,7 @@ DiB == gen_digest(ChA, ICA)?
+
The ControlMessage is a tuple, where the first element indicates
which distributed operation it encodes:
@@ -1028,4 +1053,49 @@ DiB == gen_digest(ChA, ICA)?
+
+
+ New Ctrlmessages for Erlang/OTP 21
+
+ SEND_SENDER
+ -
+
{22, FromPid, ToPid}
+ Followed by Message.
+
+ This control messages replace the SEND control
+ message and will be sent when the distribution flag
+ DFLAG_SEND_SENDER
+ has been negotiated in the connection setup handshake.
+
+
+ Messages encoded before the connection has
+ been set up may still use the SEND control
+ message. However, once a SEND_SENDER or SEND_SENDER_TT
+ control message has been sent, no more SEND
+ control messages will be sent in the same direction
+ on the connection.
+
+
+ SEND_SENDER_TT
+ -
+
{23, FromPid, ToPid, TraceToken}
+ Followed by Message.
+
+ This control messages replace the SEND_TT control
+ message and will be sent when the distribution flag
+ DFLAG_SEND_SENDER
+ has been negotiated in the connection setup handshake.
+
+
+ Messages encoded before the connection has
+ been set up may still use the SEND_TT control
+ message. However, once a SEND_SENDER or SEND_SENDER_TT
+ control message has been sent, no more SEND_TT
+ control messages will be sent in the same direction
+ on the connection.
+
+
+
+
+
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 8b0f97f30f..f1fcbd7532 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -1235,12 +1235,6 @@ end
data is available by calling
erlang:dist_ctrl_get_data_notification(DHandle).
-
- The data retreived from this function needs to be delivered
- as is to the node on the other end in the exact same order,
- with no loss of data what so ever, as retrived from this
- function.
-
Only the process registered as distribution
controller for the distribution channel identified by
@@ -1253,7 +1247,7 @@ end
controllers. DHandle is retrived
via the callback
f_handshake_complete.
- More information about this can be found in the documentation of
+ More information can be found in the documentation of
ERTS
User's Guide ➜ How to implement an Alternative Carrier
for the Erlang Distribution ➜ Distribution Module.
@@ -1289,7 +1283,7 @@ end
controllers. DHandle is retrived
via the callback
f_handshake_complete.
- More information about this can be found in the documentation of
+ More information can be found in the documentation of
ERTS
User's Guide ➜ How to implement an Alternative Carrier
for the Erlang Distribution ➜ Distribution Module.
@@ -1322,7 +1316,7 @@ end
controllers. DHandle is retrived
via the callback
f_handshake_complete.
- More information about this can be found in the documentation of
+ More information can be found in the documentation of
ERTS
User's Guide ➜ How to implement an Alternative Carrier
for the Erlang Distribution ➜ Distribution Module.
@@ -1338,11 +1332,6 @@ end
Deliver distribution channel data from a remote node to the
local node.
-
- The data passed to the VM using this function needs to be
- passed in the exact same order, and with no loss of data
- what so ever, as sent from the node on the other end.
-
Only the process registered as distribution
controller for the distribution channel identified by
@@ -1360,7 +1349,7 @@ end
controllers. DHandle is retrived
via the callback
f_handshake_complete.
- More information about this can be found in the documentation of
+ More information can be found in the documentation of
ERTS
User's Guide ➜ How to implement an Alternative Carrier
for the Erlang Distribution ➜ Distribution Module.
--
cgit v1.2.3