Include outgoing connection events in receive queue
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- haskell
- Domaine
- distributed-systems
Piste de recherche
Commencez par lire l’issue haskell-distributed/distributed-process#406 et par comparer son problème aux deux conceptions alternatives de Event décrites ici. Examinez ensuite les définitions existantes de Event et Connection, ainsi que les chemins de connect, send et close. Le travail est terminé lorsqu’une conception a été choisie et que la provenance, l’ordre, l’unicité et la sémantique d’événements exactement une fois spécifiés sont préservés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
This is an alternative to, and intended to solve the same problem as, issue haskell-distributed/distributed-process#406.
New Events
Three new event constructors are introduced:
data Event =
...
| OutboundConnectionOpened ConnectionId Reliability EndPointAddress
| OutboundConnectionClosed ConnectionId
| OutboundConnectionSent ConnectionId [ByteString]
Or perhaps instead:
data Provenance = Local | Peer
deriving (Show, Eq, Generic)
instance Binary Provenance
data Event =
-- Replaces 'Received', which can now mean 'Sent'.
Data Provenance ConnectionId [ByteString]
| ConnectionOpened Provenance ConnectionId Reliability EndPointAddress
| ConnectionClosed Provenance ConnectionId
| ...
deriving (Show, Eq, Generic)
pattern Received connid bss = Data Peer connid bss
pattern Sent connid bss = Data Local connid bss
and in any case:
data Connection = Connection {
...
, connectionId :: ConnectionId
}
Events with provenance Peer are the familiar incoming events, whereas events with provenance Local are generated in response to locally-initiated connection features: connect, send, and close.
Semantics of local-provenance Events
When connect ep address reliability hints succeeds, a ConnectionOpened Local connid reliability address must be posted exactly once to eps event queue, where connid is any suitable (unique) ConnectionId.
When close conn succeeds, a ConnectionClosed connid must be posted exactly once to the event queue of the EndPoint against which conn was created.
When send conn bs succeeds, a Data Local connid bs must be posted exactly once to the event queue of the EndPoint against which conn was created, even if the connection is not reliable (in which case the receiver may see different Data events than the sender for the same connection).
If the connection is ordered, then Data Local events must be posted in the same order that the peer will observe the Data Peer events corresponding to these sends (it's assumed the concrete transport is capable of doing this, else it shouldn't allow an ordered connection).
Regardless of reliability and ordering, a Data Local event must come after the ConnectionOpened for that connection, and before any event which terminates that connection (ConnectionClosed or error events which cause it to close).
Note that these rules imply that for self connections (from one EndPoint to itself), the EndPoint will see two of each posted event, one for each provenance (they are both Local and Peer).
The connectionId of a Connection must be unique among incoming and outgoing connections, but need not match the ConnectionId which the peer uses for that same connection.
It solves the problem brought up in haskell-distributed/distributed-process#406
There is now an ordering on outgoing connections. If we observe ErrorEvent (TransportError (EventConnectionLost addr) _) then every ConnectionOpened Local connid _ addr which is unmatched by a ConnectionClosed Local connid is known to be broken, and subsequent ConnectionOpened Local connid' _ addr are not broken by that error event.
- Langage dominant
- Haskell
- Étoiles
- 755
- Forks
- 101
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 4
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de haskell-distributed/distributed-process
-
enhancement Feature Request
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
haskell-distributed/distributed-process#486 · 1 commentaire · 1 réaction ·
-
discuss enhancement Feature Request
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
haskell-distributed/distributed-process#478 · 4 commentaires · 3 réactions ·
-
enhancement Feature Request
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
haskell-distributed/distributed-process#476 · 3 commentaires · 3 réactions ·
-
Demonstrating the use of Cloud Haskell for a Raft implementationPeut-être à nouveau libre @LaurentRDC l’a pris il y a 495 jours, et aucune pull request n’est ouverte. Ouverteenhancement Feature Request
haskell-distributed/distributed-process#475 · 3 réactions · 1 personne assignée ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 20/100
haskell-distributed/distributed-process#473 · 4 commentaires · 1 réaction ·
Toutes les issues de haskell-distributed/distributed-process
Issues similaires
-
docs
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Les mainteneurs répondent en général sous 1 jour
-
enhancement triage
Difficulté 1/5 1-3 heures Accessibilité débutants 66/100
simplex-chat/simplex-chat#8043 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
haskell-servant/servant#1929 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
fmidue/haskell-template-task#77 · 2 commentaires ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
haskell/network-uri#92 ·