Print this page
Try versioning as a new state


 200  *                              currently backing off, waiting to try again.
 201  *
 202  *      SVP_CS_ACTIVE           We have successfully connected to the remote
 203  *                              system.
 204  *
 205  *      SVP_CS_WINDDOWN         This connection is going to valhalla. In other
 206  *                              words, a previously active connection is no
 207  *                              longer valid in DNS, so we should curb our use
 208  *                              of it, and reap it as soon as we have other
 209  *                              active connections.
 210  *
 211  * The following diagram attempts to describe our state transition scheme, and
 212  * when we transition from one state to the next.
 213  *
 214  *                               |
 215  *                               * New remote IP from DNS resolution,
 216  *                               | not currently active in the system.
 217  *                               |
 218  *                               v                                Socket Error,
 219  *                       +----------------+                       still in DNS
 220  *  +----------------<---| SVP_CS_INITIAL |<----------------------*-----+
 221  *  |                    +----------------+                             |
 222  *  |                            System  |                              |
 223  *  | Connection . . . . .       success *               Successful     |
 224  *  | failed             .               |               connect()      |
 225  *  |               +----*---------+     |        +-----------*--+      |
 226  *  |               |              |     |        |              |      |
 227  *  |               V              ^     v        ^              V      ^
 228  *  |  +----------------+         +-------------------+     +---------------+
 229  *  +<-| SVP_CS_BACKOFF |         | SVP_CS_CONNECTING |     | SVP_CS_ACTIVE |
 230  *  |  +----------------+         +-------------------+     +---------------+
 231  *  |               V              ^  V                       V  V
 232  *  | Backoff wait  *              |  |                       |  * Removed
 233  *  v interval      +--------------+  +-----------------<-----+  | from DNS




 234  *  | finished                        |                          |
 235  *  |                                 V                          |
 236  *  |                                 |                          V
 237  *  |                                 |            +-----------------+
 238  *  +----------------+----------<-----+-------<----| SVP_CS_WINDDOWN |
 239  *                   |                             +-----------------+
 240  *                   * . . .   Fatal system, not
 241  *                   |         socket error or
 242  *                   V         quiesced after
 243  *           +--------------+  removal from DNS
 244  *           | SVP_CS_ERROR |
 245  *           +--------------+
 246  *                   |
 247  *                   * . . . Removed from DNS
 248  *                   v
 249  *            +------------+
 250  *            | Connection |
 251  *            | Destroyed  |
 252  *            +------------+
 253  *




 200  *                              currently backing off, waiting to try again.
 201  *
 202  *      SVP_CS_ACTIVE           We have successfully connected to the remote
 203  *                              system.
 204  *
 205  *      SVP_CS_WINDDOWN         This connection is going to valhalla. In other
 206  *                              words, a previously active connection is no
 207  *                              longer valid in DNS, so we should curb our use
 208  *                              of it, and reap it as soon as we have other
 209  *                              active connections.
 210  *
 211  * The following diagram attempts to describe our state transition scheme, and
 212  * when we transition from one state to the next.
 213  *
 214  *                               |
 215  *                               * New remote IP from DNS resolution,
 216  *                               | not currently active in the system.
 217  *                               |
 218  *                               v                                Socket Error,
 219  *                       +----------------+                       still in DNS
 220  *  +----------------<---| SVP_CS_INITIAL |<----------------------*--------+
 221  *  |                    +----------------+                                |
 222  *  |                            System  |                                 |
 223  *  | Connection . . . . .       success *     Successful                  |
 224  *  | failed             .               |     connect()                   |
 225  *  |                    .               |        +-------------------+    |
 226  *  |               +----*---------+     |    +-*>| SVP_CS_VERSIONING +    |
 227  *  |               |              |     |    |   +-------------------+    |
 228  *  |               |              |     |    |          V   V Set version |
 229  *  |               |              |     |    |          |   * based on    |
 230  *  |               |              |     |    |          |   | SVP_R_PONG  |
 231  *  |               V              ^     v    ^          |   V             ^
 232  *  |  +----------------+         +-------------------+  |  +---------------+
 233  *  +<-| SVP_CS_BACKOFF |         | SVP_CS_CONNECTING |  |  | SVP_CS_ACTIVE |
 234  *  |  +----------------+         +-------------------+  |  +---------------+
 235  *  |               V              ^  V                  |    V  V
 236  *  | Backoff wait  *              |  |                  |    |  * Removed
 237  *  v interval      +--------------+  +-----------------<+----+  | from DNS
 238  *  | finished                        |                          |
 239  *  |                                 V                          |
 240  *  |                                 |                          V
 241  *  |                                 |            +-----------------+
 242  *  +----------------+----------<-----+-------<----| SVP_CS_WINDDOWN |
 243  *                   |                             +-----------------+
 244  *                   * . . .   Fatal system, not
 245  *                   |         socket error or
 246  *                   V         quiesced after
 247  *           +--------------+  removal from DNS
 248  *           | SVP_CS_ERROR |
 249  *           +--------------+
 250  *                   |
 251  *                   * . . . Removed from DNS
 252  *                   v
 253  *            +------------+
 254  *            | Connection |
 255  *            | Destroyed  |
 256  *            +------------+
 257  *