Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
31e0fe90
Commit
31e0fe90
authored
8 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Fix indentation in docs/
parent
3ba2859e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/tcp_replication.rst
+28
-25
28 additions, 25 deletions
docs/tcp_replication.rst
with
28 additions
and
25 deletions
docs/tcp_replication.rst
+
28
−
25
View file @
31e0fe90
...
@@ -34,20 +34,21 @@ command, and usually the connection will be closed.
...
@@ -34,20 +34,21 @@ command, and usually the connection will be closed.
Since the protocol is a simple line based, its possible to manually connect to
Since the protocol is a simple line based, its possible to manually connect to
the server using a tool like netcat. A few things should be noted when manually
the server using a tool like netcat. A few things should be noted when manually
using the protocol:
using the protocol:
* When subscribing to a stream using ``REPLICATE``, the special token ``NOW`` can
be used to get all future updates. The special stream name ``ALL`` can be used
* When subscribing to a stream using ``REPLICATE``, the special token ``NOW`` can
with ``NOW`` to subscribe to all available streams.
be used to get all future updates. The special stream name ``ALL`` can be used
* The federation stream is only available if federation sending has been
with ``NOW`` to subscribe to all available streams.
disabled on the main process.
* The federation stream is only available if federation sending has been
* The server will only time connections out that have sent a ``PING`` command.
disabled on the main process.
If a ping is sent then the connection will be closed if no further commands
* The server will only time connections out that have sent a ``PING`` command.
are receieved within 15s. Both the client and server protocol implementations
If a ping is sent then the connection will be closed if no further commands
will send an initial PING on connection and ensure at least one command every
are receieved within 15s. Both the client and server protocol implementations
5s is sent (not necessarily ``PING``).
will send an initial PING on connection and ensure at least one command every
* ``RDATA`` commands *usually* include a numeric token, however if the stream
5s is sent (not necessarily ``PING``).
has multiple rows to replicate per token the server will send multiple
* ``RDATA`` commands *usually* include a numeric token, however if the stream
``RDATA`` commands, with all but the last having a token of ``batch``. See
has multiple rows to replicate per token the server will send multiple
the documentation on ``commands.RdataCommand`` for further details.
``RDATA`` commands, with all but the last having a token of ``batch``. See
the documentation on ``commands.RdataCommand`` for further details.
Architecture
Architecture
...
@@ -84,19 +85,21 @@ Start up
...
@@ -84,19 +85,21 @@ Start up
~~~~~~~~
~~~~~~~~
When a new connection is made, the server:
When a new connection is made, the server:
* Sends a ``SERVER`` command, which includes the identity of the server, allowing
the client to detect if its connected to the expected server
* Sends a ``SERVER`` command, which includes the identity of the server, allowing
* Sends a ``PING`` command as above, to enable the client to time out connections
the client to detect if its connected to the expected server
promptly.
* Sends a ``PING`` command as above, to enable the client to time out connections
promptly.
The client:
The client:
* Sends a ``NAME`` command, allowing the server to associate a human friendly
name with the connection. This is optional.
* Sends a ``NAME`` command, allowing the server to associate a human friendly
* Sends a ``PING`` as above
name with the connection. This is optional.
* For each stream the client wishes to subscribe to it sends a ``REPLICATE``
* Sends a ``PING`` as above
with the stream_name and token it wants to subscribe from.
* For each stream the client wishes to subscribe to it sends a ``REPLICATE``
* On receipt of a ``SERVER`` command, checks that the server name matches the
with the stream_name and token it wants to subscribe from.
expected server name.
* On receipt of a ``SERVER`` command, checks that the server name matches the
expected server name.
Error handling
Error handling
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment