The cl-disque Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-disque Reference Manual

This is the cl-disque Reference Manual, version 0.0.1, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:03:46 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

#+TITLE: CL-DISQUE
#+AUTHOR: Cody Reichert
#+EMAIL: codyreichert@gmail.com

A [[https://github.com/antirez/disque][Disque]] client for Common Lisp.

Disque is an in-memory job queue and message broker. It's distributed
and fault-tolerant so it works as a middle layer among processes that
want to exchange messages.

Learn more about message queues [[https://github.com/antirez/disque#what-is-a-message-queue][here]], and more about the Disque
implementation [[https://github.com/antirez/disque#give-me-the-details][here]].

cl-disque provides a client for working with Disque through sending
and receiving jobs and commands.

* Usage
** Quickstart
   First, make sure a Disque server is running.

   Load cl-disque and connect to the Disque server on the given host and port:

   #+BEGIN_SRC lisp
     (ql:quickload 'cl-disque)

     ; host defaults to 127.0.0.1, port defaults to 7711
     (cl-disque:connect :host  :port )
   #+END_SRC

   You can interact with the server using commands from the =disque= package.

   #+BEGIN_SRC lisp
   (disque:hello)
   ;=> (1 "node-id"
   ;    ("node-ids" "host" "7711" "1"))
   #+END_SRC

   Disconnect from the Disque server with:

   #+BEGIN_SRC lisp
   (cl-disque:disconnect)
   #+END_SRC

   Alternatively, you can wrap all interactions in the
   =with-connection= macro, which creates a new connection to
   execute the given body, and assures a disconnect afterwards:

   #+BEGIN_SRC lisp
   (cl-disque:with-connection ()
     (disque:addjob "queue" "job" 0)
     (disque:getjob "queue" 1))
   ;=> (("queue" "job-hash" "job"))
   #+END_SRC

   The Makefile offers a couple of commands for running the test-suite
   and loading cl-disque into an SBCL repl:

   #+BEGIN_SRC sh
   # To run the test suite
   $ make test
   #+END_SRC

   #+BEGIN_SRC sh
   # To load an SBCL repl
   $ make sbcl-repl
   #+END_SRC

** Available commands
   Cl-Disque supports all of the Disque client commands and their
   arguments. See [[https://github.com/antirez/disque][The Disque Documentation]] for more specifics on each
   command

*** INFO
    - Args: ()
    - Response-type: :bulk

*** HELLO
    - Args: ()
    - Response-type: :multi

*** QLEN
    - Args: (queue)
    - Response-type: :integer

*** QPEEK
    - Args: (queue count)
    - Response-type: :multi

*** QSCAN
    - Args: (&rest args &key count busyloop minlen maxlen importrate)
    - Response-type: :multi

*** GETJOB
    - Args: (queues &rest args &key nohang timeout count withcounters)
    - Reponse-type: :multi

    /Note: queues can either be a single queue or a list of queues:/

    #+BEGIN_SRC lisp
    (disque:getjob "queue1")
    ;; or
    (disque:getjob '("queue1" "queue2" "queue3")
    #+END_SRC

*** ADDJOB
    - Args: (queue job timeout &rest args &key replicate delay retry ttl
    maxlen async)
    - Response-type: :status

*** ACKJOB
    - Args: (job &rest jobs)
    - Response-type: :integer

*** FASTACK
    - Args: (job &rest jobs)
    - Response-type: :integer

*** WORKING
    - Args: (job)
    - Response-type: :integer

*** NACK
    - Args: (job &rest jobs)
    - Response-type: :integer

*** ENQUEUE
    - Args: (job &rest jobs)
    - Reponse-type: :integer

*** DEQUEUE
    - Args: (job &rest jobs)
    - Response-type :integer

*** DELJOB
    - Args: (job &rest jobs)
    - Response-type: :integer

*** SHOW
    - Args: (job)
    - Response-type: :multi

*** JSCAN
    - Args: (cursor &rest args &key count blocking queue state reply)
    - Response-type: :multi

** Code organization
   The system provides two packages: =CL-DISQUE= and =DISQUE=.

   Everything is available in the =CL-DISQUE= package.

   The =DISQUE= package contains all of the commands for interacting
   with a Disque server. This is simply syntactic sugar, as all of the
   commands are /also/ available in the =CL-DISQUE= package with a
   command prefix. For Example:

   #+BEGIN_SRC lisp
   (disque:info)
   ; is the same as
   (cl-disque:disque-info)
   #+END_SRC

** Installation

Git clone this repo into your =~/quicklisp/local-projects/= directory,
and =(ql:quickload :cl-disque)=.

** Dependencies

- [[http://common-lisp.net/project/usocket/][usocket]]
- [[http://common-lisp.net/project/flexi-streams/][flexi-streams]]
- [[http://github.com/vseloved/rutils][rutils]]
- [[http://github.com/fukamachi/prove][prove]] (only for tests)

** Debugging and error recovery

If =*echo-p*= is =T=, all client-server communications will be
echoed to the stream =*echo-stream*=, which defaults to =*standard-output*=.

Error handling is mimicked after [[http://common-lisp.net/project/postmodern/][Postmodern]]. In particular, whenever
an error occurs that breaks the communication stream, a condition of
type =disque-connection-error= is signalled offering a =:reconnect=
restart.  If it is selected the whole Disque command will be resent, if
the reconnection attempt succeeds.  Furthermore, =connect= checks if a
connection to Disque is already established, and offers two restarts
(=:leave= and =:replace=) if this is the case.

When the server respondes with an error reply a condition of type
=disque-error-reply= is signalled.

There's also a high-level =with-persistent-connection= macro, that
tries to do the right thing™ (i.e. automatically reopen the connection
once, if it is broken).

** Advanced usage
*** Pipelining

For better performance Disque allows to pipeline commands and delay
receiving results until the end, and process them all in oine batch
afterwards.  To support that there's =with-pipelining= macro.

Note, that =with-pipelining= calls theoretically may nest, but the
results will only be available to the highest-level pipeline, all the
nested pipelines will return :PIPELINED.  So a warining is signalled
in this situation.

*Note: Pipelining has not been tested since being ported form cl-redis.*

** Credits

Cody Reichert  is the maintainer of =CL-DISQUE=.

=CL-DISQUE= is a ported of the [[http://github.com/vseloved/cl-redis][CL-REDIS]] client, which is developed and
maintained by Vsevolod Dyomkin . Many thanks to
him for implementing the protocol and providing most of the internals.

Alexandr Manzyuk  also contributed to
=CL-REDIS= client and developed the connection handling code following
the implementation in [[http://common-lisp.net/project/postmodern/][Postmodern]]. It was since partially rewritten to
accommodate more advanced connection handling strategies, like
persistent connection.

** License

MIT (See LICENSE file for details).


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-disque

Maintainer

Cody Reichert <codyreichert@gmail.com>

Author

Cody Reichert <codyreichert@gmail.com>

License

MIT

Description

A Disque client for Common Lisp

Version

0.0.1

Dependencies
Source

cl-disque.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 cl-disque/src

Parent

cl-disque (system)

Location

src/

Components

Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 cl-disque.asd

Location

cl-disque.asd

Systems

cl-disque (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.2 cl-disque/src/package.lisp

Parent

src (module)

Location

src/package.lisp

Packages

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.3 cl-disque/src/float.lisp

Parent

src (module)

Location

src/float.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.4 cl-disque/src/connection.lisp

Parent

src (module)

Location

src/connection.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.5 cl-disque/src/cl-disque.lisp

Parent

src (module)

Location

src/cl-disque.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

4.1.6 cl-disque/src/commands.lisp

Parent

src (module)

Location

src/commands.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

5.1 disque

Source

package.lisp (file)


Previous: , Up: Packages   [Contents][Index]

5.2 cl-disque

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Special variables

Special Variable: *cmd-prefix*

Prefix for functions names that implement Disque commands.

Package

cl-disque

Source

cl-disque.lisp (file)

Special Variable: *connection*

The current Disque connection.

Package

cl-disque

Source

connection.lisp (file)

Special Variable: *echo-p*

Whether the server-client communication should be echoed to the stream specified by *ECHO-STREAM*. The default is NIL, meaning no echoing.

Package

cl-disque

Source

connection.lisp (file)

Special Variable: *echo-stream*

A stream to which the server-client communication will be echoed for debugging purposes. The default is *STANDARD-OUTPUT*.

Package

cl-disque

Source

connection.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Macros

Macro: def-cmd CMD (&rest ARGS) REPLY-TYPE DOCSTRING

Define and export a function with the name <*CMD-REDIX*>-<CMD> for processing a Disque command CMD. Here REPLY-TYPE is the expected reply format.

Package

cl-disque

Source

cl-disque.lisp (file)

Macro: def-expect-method TYPE &body BODY

Define a specialized EXPECT method. BODY may refer to the ~ variable REPLY, which is bound to the reply received from Disque ~ server with the first character removed.

Package

cl-disque

Source

cl-disque.lisp (file)

Macro: with-connection (&key HOST PORT AUTH) &body BODY

Evaluate BODY with the current connection bound to a new connection specified by the given HOST and PORT

Package

cl-disque

Source

connection.lisp (file)

Macro: with-persistent-connection (&key HOST PORT AUTH) &body BODY

Execute BODY inside WITH-CONNECTION. But if connection is broken due to DISQUE-CONNECTION-ERROR (a network error or timeout), transparently reopen it.

Package

cl-disque

Source

connection.lisp (file)

Macro: with-pipelining &body BODY

Delay execution of EXPECT’s inside BODY to the end, so that all commands are first sent to the server and then their output is received and collected into a list. So commands return :PIPELINED instead of the expected results.

Package

cl-disque

Source

cl-disque.lisp (file)

Macro: with-recursive-connection (&key HOST PORT AUTH) &body BODY

Execute BODY with *CONNECTION* bound to the default Disque connection. If connection is already established, reuse it.

Package

cl-disque

Source

connection.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.3 Functions

Function: close-connection CONN

Close the socket of CONN.

Package

cl-disque

Source

connection.lisp (file)

Function: connect &key HOST PORT AUTH

Connect to Disque server.

Package

cl-disque

Source

connection.lisp (file)

Function: connected-p ()

Is there a current connection?

Package

cl-disque

Source

connection.lisp (file)

Function: disconnect ()

Disconnect from Disque server.

Package

cl-disque

Source

connection.lisp (file)

Function: disque-ackjob JOB &rest JOBS

Acknowledges the execution of one or more jobs via jobs IDs. The node receiving the ACK will replicate it to multiple nodes and will try to garbage collect both the job and the ACKs from the cluster so that memory can be freed.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-addjob QUEUE JOB TIMEOUT &rest ARGS &key REPLICATE DELAY RETRY TTL MAXLEN ASYNC

Adds a job to the specified queue.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-deljob JOB &rest JOBS

Completely delete a job from a node. Note that this is similar to FASTACK, but limited to a single node since no DELJOB cluster bus message is sent to other nodes.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-dequeue JOB &rest JOBS

Remove jobs from the queue.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-enqueue JOB &rest JOBS

Queue jobs if not already queued.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-fastack JOB &rest JOBS

Acknowledges the execution of one or more jobs via jobs IDs. The node receiving the ACK will replicate it to multiple nodes and will try to garbage collect both the job and the ACKs from the cluster so that memory can be freed.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-getjob QUEUES &rest ARGS &key NOHANG TIMEOUT COUNT WITHCOUNTERS

Gets a job from the specific queue.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-hello ()

Returns hello format version, this node ID, all the nodes IDs, IP addresses, ports, and priority (lower is better, means node more available). Clients should use this as an handshake command when connecting with a Disque node.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-info ()

Generic server information / stats.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-jscan CURSOR &rest ARGS &key COUNT BLOCKING QUEUE STATE REPLY

JSCAN provides an interface to iterate all the existing jobs in the local node, providing a cursor in the form of an integer that is passed to the next command invocation. During the first call the cursor must be 0, in the next calls the cursor returned in the previous call is used next. The iterator guarantees to return all elements but may return duplicates.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-nack JOB &rest JOBS

The NACK command tells Disque to put back the job in the queue ASAP. It is very similar to ENQUEUE but it increments the job nacks counter instead of the additional-deliveries counter. The command should be used when the worker was not able to process a message and wants the message to be put back into the queue in order to be processed again.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-qlen QUEUE

Returns the length of the queue.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-qpeek QUEUE COUNT

Return, without consuming from queue, count jobs. If count is positive the specified number of jobs are returned from the oldest to the newest (in the same best-effort FIFO order as GETJOB). If count is negative the commands changes behavior and shows the count newest jobs, from the newest from the oldest.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-qscan &rest ARGS &key COUNT BUSYLOOP MINLEN MAXLEN IMPORTRATE

The command provides an interface to iterate all the existing queues in the local node, providing a cursor in the form of an integer that is passed to the next command invocation. During the first call cursor must be 0, in the next calls the cursor returned in the previous call is used in the next. The iterator guarantees to return all the elements but may return duplicated elements.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-show JOB

Describe the job.

Package

cl-disque

Source

commands.lisp (file)

Function: disque-working JOB

Claims to be still working with the specified job, and asks Disque to postpone the next time it will deliver again the job. The next delivery is postponed for the job retry time, however the command works in a best effort way since there is no way to guarantee during failures that another node in a different network partition is performing a delivery of the same job.

Package

cl-disque

Source

commands.lisp (file)

Function: open-connection CONN

Create a socket connection to the host and port of CONNECTION and set the socket of CONN to the associated socket.

Package

cl-disque

Source

connection.lisp (file)

Function: reconnect ()

Close and reopen the connection to Disque server.

Package

cl-disque

Source

connection.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.4 Generic functions

Generic Function: disque-error-message CONDITION
Package

cl-disque

Methods
Method: disque-error-message (CONDITION disque-error)
Source

cl-disque.lisp (file)

Generic Function: expect TYPE

Receive and process the reply of the given type from Disque server.

Package

cl-disque

Source

cl-disque.lisp (file)

Methods
Method: expect (TYPE (eql bytes))

Receive and process the reply of type BYTES.

Method: expect (TYPE (eql float))

Receive and process the reply of type FLOAT.

Method: expect (TYPE (eql list))
Method: expect (TYPE (eql end))
Method: expect (TYPE (eql pubsub))
Method: expect (TYPE (eql queued))

Receive and process the reply of type QUEUED.

Method: expect (TYPE (eql multi))

Receive and process the reply of type MULTI.

Method: expect (TYPE (eql bulk))

Receive and process the reply of type BULK.

Method: expect (TYPE (eql integer))

Receive and process the reply of type INTEGER.

Method: expect (TYPE (eql boolean))

Receive and process the reply of type BOOLEAN.

Method: expect (TYPE (eql inline))

Receive and process the reply of type INLINE.

Method: expect (TYPE (eql status))

Receive and process status reply, which is just a string, preceeded with +.

Method: expect (TYPE (eql anything))

Receive and process status reply, which is just a string, preceeded with +.

Method: expect TYPE around
Generic Function: tell CMD &rest ARGS

Send a command to Disque server over a socket connection.
CMD is the command name (a string or a symbol), and ARGS are its arguments (keyword arguments are also supported).

Package

cl-disque

Source

cl-disque.lisp (file)

Methods
Method: tell (CURSOR (eql jscan)) &rest ARGS
Source

commands.lisp (file)

Method: tell (CMD (eql addjob)) &rest ARGS
Source

commands.lisp (file)

Method: tell (CMD (eql getjob)) &rest ARGS
Source

commands.lisp (file)

Method: tell (CMD (eql qscan)) &rest ARGS
Source

commands.lisp (file)

Method: tell CMD &rest ARGS
Method: tell CMD &rest ARGS after

Previous: , Up: Exported definitions   [Contents][Index]

6.1.5 Conditions

Condition: disque-bad-reply ()

Disque protocol error is detected.

Package

cl-disque

Source

cl-disque.lisp (file)

Direct superclasses

disque-error (condition)

Condition: disque-connection-error ()

Conditions of this type are signaled when errors occur
that break the connection stream. They offer a :RECONNECT restart.

Package

cl-disque

Source

cl-disque.lisp (file)

Direct superclasses

disque-error (condition)

Condition: disque-error ()

Any Disque-related error.

Package

cl-disque

Source

cl-disque.lisp (file)

Direct superclasses

error (condition)

Direct subclasses
Direct methods
Direct slots
Slot: error
Initargs

:error

Initform

(quote nil)

Readers

disque-error-error (generic function)

Slot: message
Initargs

:message

Initform

(quote nil)

Readers

disque-error-message (generic function)

Condition: disque-error-reply ()

Error reply is received from Disque server.

Package

cl-disque

Source

cl-disque.lisp (file)

Direct superclasses

disque-error (condition)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *pipeline*

A list of expected results from the current pipeline.

Package

cl-disque

Source

cl-disque.lisp (file)

Special Variable: *pipelined*

Indicates, that commands are sent in pipelined mode.

Package

cl-disque

Source

cl-disque.lisp (file)

Special Variable: +utf8+
Package

cl-disque

Source

connection.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Macros

Macro: read-bulk-reply &key POST-PROCESSING DECODE
Package

cl-disque

Source

cl-disque.lisp (file)

Macro: reconnect-restart-case (&key ERROR COMMENT) &body BODY

Signal the condition of type DISQUE-CONNECTION-ERROR denoted by
the given ERROR and COMMENT offering a :RECONNECT restart to re-evaluate BODY.

Package

cl-disque

Source

connection.lisp (file)

Macro: with-disque-in (LINE CHAR) &body BODY
Package

cl-disque

Source

cl-disque.lisp (file)

Macro: with-reconnect-restart &body BODY

When, during the execution of BODY, an error occurs that breaks the connection, a DISQUE-CONNECTION-ERROR is signalled, offering a :RECONNECT restart that will re-evaluate body after the conenction is re-established.

Package

cl-disque

Source

connection.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.3 Functions

Function: ackjob JOB &rest JOBS

Acknowledges the execution of one or more jobs via jobs IDs. The node receiving the ACK will replicate it to multiple nodes and will try to garbage collect both the job and the ACKs from the cluster so that memory can be freed.

Package

cl-disque

Source

commands.lisp (file)

Function: addjob QUEUE JOB TIMEOUT &rest ARGS &key REPLICATE DELAY RETRY TTL MAXLEN ASYNC

Adds a job to the specified queue.

Package

cl-disque

Source

commands.lisp (file)

Function: connection-open-p CONN

Is the socket of CONNECTION open?

Package

cl-disque

Source

connection.lisp (file)

Function: deljob JOB &rest JOBS

Completely delete a job from a node. Note that this is similar to FASTACK, but limited to a single node since no DELJOB cluster bus message is sent to other nodes.

Package

cl-disque

Source

commands.lisp (file)

Function: dequeue JOB &rest JOBS

Remove jobs from the queue.

Package

cl-disque

Source

commands.lisp (file)

Function: enqueue JOB &rest JOBS

Queue jobs if not already queued.

Package

cl-disque

Source

commands.lisp (file)

Function: ensure-string OBJ
Package

cl-disque

Source

cl-disque.lisp (file)

Function: fastack JOB &rest JOBS

Acknowledges the execution of one or more jobs via jobs IDs. The node receiving the ACK will replicate it to multiple nodes and will try to garbage collect both the job and the ACKs from the cluster so that memory can be freed.

Package

cl-disque

Source

commands.lisp (file)

Function: format-disque-number CHAR NUMBER

Write a prefix char and a number to the stream of the current connection. If *ECHOP-P* is not NIL, write that string to *ECHO-STREAM*, too.

Package

cl-disque

Source

cl-disque.lisp (file)

Function: format-disque-string STRING

Write a string and CRLF-terminator to the stream of the current connection. If *ECHOP-P* is not NIL, write that string to *ECHO-STREAM*, too.

Package

cl-disque

Source

cl-disque.lisp (file)

Function: getjob QUEUES &rest ARGS &key NOHANG TIMEOUT COUNT WITHCOUNTERS

Gets a job from the specific queue.

Package

cl-disque

Source

commands.lisp (file)

Function: hello ()

Returns hello format version, this node ID, all the nodes IDs, IP addresses, ports, and priority (lower is better, means node more available). Clients should use this as an handshake command when connecting with a Disque node.

Package

cl-disque

Source

commands.lisp (file)

Function: info ()

Generic server information / stats.

Package

cl-disque

Source

commands.lisp (file)

Function: jscan CURSOR &rest ARGS &key COUNT BLOCKING QUEUE STATE REPLY

JSCAN provides an interface to iterate all the existing jobs in the local node, providing a cursor in the form of an integer that is passed to the next command invocation. During the first call the cursor must be 0, in the next calls the cursor returned in the previous call is used next. The iterator guarantees to return all elements but may return duplicates.

Package

cl-disque

Source

commands.lisp (file)

Function: nack JOB &rest JOBS

The NACK command tells Disque to put back the job in the queue ASAP. It is very similar to ENQUEUE but it increments the job nacks counter instead of the additional-deliveries counter. The command should be used when the worker was not able to process a message and wants the message to be put back into the queue in order to be processed again.

Package

cl-disque

Source

commands.lisp (file)

Function: parse-float FLOAT-STRING &key START END RADIX JUNK-ALLOWED TYPE DECIMAL-CHARACTER
Package

cl-disque

Source

float.lisp (file)

Function: qlen QUEUE

Returns the length of the queue.

Package

cl-disque

Source

commands.lisp (file)

Function: qpeek QUEUE COUNT

Return, without consuming from queue, count jobs. If count is positive the specified number of jobs are returned from the oldest to the newest (in the same best-effort FIFO order as GETJOB). If count is negative the commands changes behavior and shows the count newest jobs, from the newest from the oldest.

Package

cl-disque

Source

commands.lisp (file)

Function: qscan &rest ARGS &key COUNT BUSYLOOP MINLEN MAXLEN IMPORTRATE

The command provides an interface to iterate all the existing queues in the local node, providing a cursor in the form of an integer that is passed to the next command invocation. During the first call cursor must be 0, in the next calls the cursor returned in the previous call is used in the next. The iterator guarantees to return all the elements but may return duplicated elements.

Package

cl-disque

Source

commands.lisp (file)

Function: radix-values RADIX
Package

cl-disque

Source

float.lisp (file)

Function: reopen-connection CONN

Close and reopen CONN.

Package

cl-disque

Source

connection.lisp (file)

Function: show JOB

Describe the job.

Package

cl-disque

Source

commands.lisp (file)

Function: working JOB

Claims to be still working with the specified job, and asks Disque to postpone the next time it will deliver again the job. The next delivery is postponed for the job retry time, however the command works in a best effort way since there is no way to guarantee during failures that another node in a different network partition is performing a delivery of the same job.

Package

cl-disque

Source

commands.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.4 Generic functions

Generic Function: conn-auth OBJECT
Package

cl-disque

Methods
Method: conn-auth (CL-DISQUE-CONNECTION cl-disque-connection)

automatically generated reader method

Source

connection.lisp (file)

Generic Function: conn-host OBJECT
Package

cl-disque

Methods
Method: conn-host (CL-DISQUE-CONNECTION cl-disque-connection)

automatically generated reader method

Source

connection.lisp (file)

Generic Function: conn-port OBJECT
Package

cl-disque

Methods
Method: conn-port (CL-DISQUE-CONNECTION cl-disque-connection)

automatically generated reader method

Source

connection.lisp (file)

Generic Function: conn-socket OBJECT
Generic Function: (setf conn-socket) NEW-VALUE OBJECT
Package

cl-disque

Methods
Method: conn-socket (CL-DISQUE-CONNECTION cl-disque-connection)

automatically generated reader method

Source

connection.lisp (file)

Method: (setf conn-socket) NEW-VALUE (CL-DISQUE-CONNECTION cl-disque-connection)

automatically generated writer method

Source

connection.lisp (file)

Generic Function: conn-stream OBJECT
Generic Function: (setf conn-stream) NEW-VALUE OBJECT
Package

cl-disque

Methods
Method: conn-stream (CL-DISQUE-CONNECTION cl-disque-connection)

automatically generated reader method

Source

connection.lisp (file)

Method: (setf conn-stream) NEW-VALUE (CL-DISQUE-CONNECTION cl-disque-connection)

automatically generated writer method

Source

connection.lisp (file)

Generic Function: disque-error-error CONDITION
Package

cl-disque

Methods
Method: disque-error-error (CONDITION disque-error)
Source

cl-disque.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.5 Classes

Class: cl-disque-connection ()

Representation of a Disque connection.

Package

cl-disque

Source

connection.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: host
Initargs

:host

Initform

#(127 0 0 1)

Readers

conn-host (generic function)

Slot: port
Initargs

:port

Initform

7711

Readers

conn-port (generic function)

Slot: auth
Initargs

:auth

Readers

conn-auth (generic function)

Slot: socket
Readers

conn-socket (generic function)

Writers

(setf conn-socket) (generic function)

Slot: stream
Readers

conn-stream (generic function)

Writers

(setf conn-stream) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
cl-disque.asd: The cl-disque<dot>asd file
cl-disque/src: The cl-disque/src module
cl-disque/src/cl-disque.lisp: The cl-disque/src/cl-disque<dot>lisp file
cl-disque/src/commands.lisp: The cl-disque/src/commands<dot>lisp file
cl-disque/src/connection.lisp: The cl-disque/src/connection<dot>lisp file
cl-disque/src/float.lisp: The cl-disque/src/float<dot>lisp file
cl-disque/src/package.lisp: The cl-disque/src/package<dot>lisp file

F
File, Lisp, cl-disque.asd: The cl-disque<dot>asd file
File, Lisp, cl-disque/src/cl-disque.lisp: The cl-disque/src/cl-disque<dot>lisp file
File, Lisp, cl-disque/src/commands.lisp: The cl-disque/src/commands<dot>lisp file
File, Lisp, cl-disque/src/connection.lisp: The cl-disque/src/connection<dot>lisp file
File, Lisp, cl-disque/src/float.lisp: The cl-disque/src/float<dot>lisp file
File, Lisp, cl-disque/src/package.lisp: The cl-disque/src/package<dot>lisp file

L
Lisp File, cl-disque.asd: The cl-disque<dot>asd file
Lisp File, cl-disque/src/cl-disque.lisp: The cl-disque/src/cl-disque<dot>lisp file
Lisp File, cl-disque/src/commands.lisp: The cl-disque/src/commands<dot>lisp file
Lisp File, cl-disque/src/connection.lisp: The cl-disque/src/connection<dot>lisp file
Lisp File, cl-disque/src/float.lisp: The cl-disque/src/float<dot>lisp file
Lisp File, cl-disque/src/package.lisp: The cl-disque/src/package<dot>lisp file

M
Module, cl-disque/src: The cl-disque/src module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   D   E   F   G   H   I   J   M   N   O   P   Q   R   S   T   W  
Index Entry  Section

(
(setf conn-socket): Internal generic functions
(setf conn-socket): Internal generic functions
(setf conn-stream): Internal generic functions
(setf conn-stream): Internal generic functions

A
ackjob: Internal functions
addjob: Internal functions

C
close-connection: Exported functions
conn-auth: Internal generic functions
conn-auth: Internal generic functions
conn-host: Internal generic functions
conn-host: Internal generic functions
conn-port: Internal generic functions
conn-port: Internal generic functions
conn-socket: Internal generic functions
conn-socket: Internal generic functions
conn-stream: Internal generic functions
conn-stream: Internal generic functions
connect: Exported functions
connected-p: Exported functions
connection-open-p: Internal functions

D
def-cmd: Exported macros
def-expect-method: Exported macros
deljob: Internal functions
dequeue: Internal functions
disconnect: Exported functions
disque-ackjob: Exported functions
disque-addjob: Exported functions
disque-deljob: Exported functions
disque-dequeue: Exported functions
disque-enqueue: Exported functions
disque-error-error: Internal generic functions
disque-error-error: Internal generic functions
disque-error-message: Exported generic functions
disque-error-message: Exported generic functions
disque-fastack: Exported functions
disque-getjob: Exported functions
disque-hello: Exported functions
disque-info: Exported functions
disque-jscan: Exported functions
disque-nack: Exported functions
disque-qlen: Exported functions
disque-qpeek: Exported functions
disque-qscan: Exported functions
disque-show: Exported functions
disque-working: Exported functions

E
enqueue: Internal functions
ensure-string: Internal functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions
expect: Exported generic functions

F
fastack: Internal functions
format-disque-number: Internal functions
format-disque-string: Internal functions
Function, ackjob: Internal functions
Function, addjob: Internal functions
Function, close-connection: Exported functions
Function, connect: Exported functions
Function, connected-p: Exported functions
Function, connection-open-p: Internal functions
Function, deljob: Internal functions
Function, dequeue: Internal functions
Function, disconnect: Exported functions
Function, disque-ackjob: Exported functions
Function, disque-addjob: Exported functions
Function, disque-deljob: Exported functions
Function, disque-dequeue: Exported functions
Function, disque-enqueue: Exported functions
Function, disque-fastack: Exported functions
Function, disque-getjob: Exported functions
Function, disque-hello: Exported functions
Function, disque-info: Exported functions
Function, disque-jscan: Exported functions
Function, disque-nack: Exported functions
Function, disque-qlen: Exported functions
Function, disque-qpeek: Exported functions
Function, disque-qscan: Exported functions
Function, disque-show: Exported functions
Function, disque-working: Exported functions
Function, enqueue: Internal functions
Function, ensure-string: Internal functions
Function, fastack: Internal functions
Function, format-disque-number: Internal functions
Function, format-disque-string: Internal functions
Function, getjob: Internal functions
Function, hello: Internal functions
Function, info: Internal functions
Function, jscan: Internal functions
Function, nack: Internal functions
Function, open-connection: Exported functions
Function, parse-float: Internal functions
Function, qlen: Internal functions
Function, qpeek: Internal functions
Function, qscan: Internal functions
Function, radix-values: Internal functions
Function, reconnect: Exported functions
Function, reopen-connection: Internal functions
Function, show: Internal functions
Function, working: Internal functions

G
Generic Function, (setf conn-socket): Internal generic functions
Generic Function, (setf conn-stream): Internal generic functions
Generic Function, conn-auth: Internal generic functions
Generic Function, conn-host: Internal generic functions
Generic Function, conn-port: Internal generic functions
Generic Function, conn-socket: Internal generic functions
Generic Function, conn-stream: Internal generic functions
Generic Function, disque-error-error: Internal generic functions
Generic Function, disque-error-message: Exported generic functions
Generic Function, expect: Exported generic functions
Generic Function, tell: Exported generic functions
getjob: Internal functions

H
hello: Internal functions

I
info: Internal functions

J
jscan: Internal functions

M
Macro, def-cmd: Exported macros
Macro, def-expect-method: Exported macros
Macro, read-bulk-reply: Internal macros
Macro, reconnect-restart-case: Internal macros
Macro, with-connection: Exported macros
Macro, with-disque-in: Internal macros
Macro, with-persistent-connection: Exported macros
Macro, with-pipelining: Exported macros
Macro, with-reconnect-restart: Internal macros
Macro, with-recursive-connection: Exported macros
Method, (setf conn-socket): Internal generic functions
Method, (setf conn-stream): Internal generic functions
Method, conn-auth: Internal generic functions
Method, conn-host: Internal generic functions
Method, conn-port: Internal generic functions
Method, conn-socket: Internal generic functions
Method, conn-stream: Internal generic functions
Method, disque-error-error: Internal generic functions
Method, disque-error-message: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, expect: Exported generic functions
Method, tell: Exported generic functions
Method, tell: Exported generic functions
Method, tell: Exported generic functions
Method, tell: Exported generic functions
Method, tell: Exported generic functions
Method, tell: Exported generic functions

N
nack: Internal functions

O
open-connection: Exported functions

P
parse-float: Internal functions

Q
qlen: Internal functions
qpeek: Internal functions
qscan: Internal functions

R
radix-values: Internal functions
read-bulk-reply: Internal macros
reconnect: Exported functions
reconnect-restart-case: Internal macros
reopen-connection: Internal functions

S
show: Internal functions

T
tell: Exported generic functions
tell: Exported generic functions
tell: Exported generic functions
tell: Exported generic functions
tell: Exported generic functions
tell: Exported generic functions
tell: Exported generic functions

W
with-connection: Exported macros
with-disque-in: Internal macros
with-persistent-connection: Exported macros
with-pipelining: Exported macros
with-reconnect-restart: Internal macros
with-recursive-connection: Exported macros
working: Internal functions

Jump to:   (  
A   C   D   E   F   G   H   I   J   M   N   O   P   Q   R   S   T   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
A   E   H   M   P   S  
Index Entry  Section

*
*cmd-prefix*: Exported special variables
*connection*: Exported special variables
*echo-p*: Exported special variables
*echo-stream*: Exported special variables
*pipeline*: Internal special variables
*pipelined*: Internal special variables

+
+utf8+: Internal special variables

A
auth: Internal classes

E
error: Exported conditions

H
host: Internal classes

M
message: Exported conditions

P
port: Internal classes

S
Slot, auth: Internal classes
Slot, error: Exported conditions
Slot, host: Internal classes
Slot, message: Exported conditions
Slot, port: Internal classes
Slot, socket: Internal classes
Slot, stream: Internal classes
socket: Internal classes
Special Variable, *cmd-prefix*: Exported special variables
Special Variable, *connection*: Exported special variables
Special Variable, *echo-p*: Exported special variables
Special Variable, *echo-stream*: Exported special variables
Special Variable, *pipeline*: Internal special variables
Special Variable, *pipelined*: Internal special variables
Special Variable, +utf8+: Internal special variables
stream: Internal classes

Jump to:   *   +  
A   E   H   M   P   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   D   P   S  
Index Entry  Section

C
cl-disque: The cl-disque system
cl-disque: The cl-disque package
cl-disque-connection: Internal classes
Class, cl-disque-connection: Internal classes
Condition, disque-bad-reply: Exported conditions
Condition, disque-connection-error: Exported conditions
Condition, disque-error: Exported conditions
Condition, disque-error-reply: Exported conditions

D
disque: The disque package
disque-bad-reply: Exported conditions
disque-connection-error: Exported conditions
disque-error: Exported conditions
disque-error-reply: Exported conditions

P
Package, cl-disque: The cl-disque package
Package, disque: The disque package

S
System, cl-disque: The cl-disque system

Jump to:   C   D   P   S