Permalink
Browse files

Reorder the paragraphs for better flow.

  • Loading branch information...
1 parent 2c25676 commit e59508dcdecc3f3542cfd15819eeffb1f93e2cc0 Keith Rarick committed Jan 3, 2008
Showing with 13 additions and 13 deletions.
  1. +13 −13 doc/protocol.txt
View
@@ -10,6 +10,19 @@ were received and sends responses in the same order. All integers in the
protocol are formatted in decimal and (unless otherwise indicated)
nonnegative.
+The protocol contains two kinds of data: text lines and unstructured chunks of
+data. Text lines are used for client commands and server responses. Chunks are
+used to transfer job bodies and stats information. Each job body is an opaque
+sequence of bytes. The server never inspects or modifies a job body and always
+sends it back in its original form. It is up to the clients to agree on a
+meaningful interpretation of job bodies.
+
+There is no command to close the connection -- the client may simply close the
+TCP connection when it no longer has use for the server. However, beanstalkd
+performs very well with a large number of open connections, so it is usually
+better for the client to keep its connection open and reuse it as much as
+possible. This also avoids the overhead of establishing new TCP connections.
+
If a client violates the protocol (such as by sending a request that is not
well-formed or a command that does not exist) or if the server has an error,
the server will reply with one of the following error messages:
@@ -50,19 +63,6 @@ As a last resort, if the server has a serious error that prevents it from
continuing service to the current client, the server will close the
connection.
-There is no command to close the connection -- the client may simply close the
-TCP connection when it no longer has use for the server. However, beanstalkd
-performs very well with a large number of open connections, so it is usually
-better for the client to keep its connection open and reuse it as much as
-possible. This also avoids the overhead of establishing new TCP connections.
-
-The beanstalk protocol contains two kinds of data: text lines and
-unstructured chunks of data. Text lines are used for client commands and server
-responses. Chunks are used to transfer job bodies and stats information. Each
-job body is an opaque sequence of bytes. The server never inspects or modifies
-a job body and always sends it back in its original form. It is up to the
-clients to agree on a meaningful interpretation of job bodies.
-
Job Lifecycle
-------------

0 comments on commit e59508d

Please sign in to comment.