Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • briar briar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 786
    • Issues 786
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briarbriar
  • briarbriar
  • Merge requests
  • !1121

Create poller for rendezvous connections

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged akwizgran requested to merge 1567-rendezvous-poller into master Jun 05, 2019
  • Overview 18
  • Commits 14
  • Pipelines 4
  • Changes 21

This branch adds a poller for rendezvous connections. The poller manages a rendezvous endpoint for each pair of a pending contact and an enabled transport. The endpoint is closed when the transport is disabled or the pending contact expires or is removed. Endpoints are created by plugins that support rendezvous, which in the first iteration will only be the Tor plugin.

The poller listens for PendingContactAdded/RemovedEvents and TransportEnabled/DisabledEvents, and broadcasts a RendezvousFailedEvent when a pending contact expires.

The polling interval is 1 minute. Once we've tested this we may want to implement some kind of backoff - for example, increasing each endpoint's interval by 1 minute for each hour the endpoint has been open, up to a maximum of 10 minutes. However, I plan to keep the intervals aligned to multiples of 1 minute so we can use a single periodic task, which should make power management easier.

Newly added pending contacts are polled immediately, which should allow us to make a quick connection even if the local and remote devices have both recently polled and therefore won't make another periodic poll for nearly a full interval.

Closes #1567 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 1567-rendezvous-poller