Book Image

Learning Redis

By : Vinoo Das
Book Image

Learning Redis

By: Vinoo Das

Overview of this book

Table of Contents (16 chapters)
Learning Redis
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Client node commands


The following is a list of commands that can be fired from client nodes:

  • The register command

  • The activate command

  • The set command

  • The get command

  • The status command

  • The del command

  • The passivate command

  • The reacyivate command

  • The archive command

  • The sync command

  • The reconnect command

Let's take a look at each command from a design and implementation perspective.

The register command

This command will register the node into the gossip server ecosystem. The precondition for executing this command is that the node name should be unique; otherwise, a response of failure will be sent to the Shell. The node name will be stored in the Registration holder, which is implemented as a Set data structure in Redis. Apart from this, when the registration process takes place, an archive file is created in the local machine of the node.

Sequence of flow of data in a Register command

The syntax for this command is: register. The following screenshot shows the response in the Shell console:

Implementation...