Class router

Package:

CL-GSERVER.ROUTER

Class Precedence List:

ROUTER → ... → T

Slots:

ROUTEES
Initform: (MAKE-ARRAY 2 ADJUSTABLE T FILL-POINTER 0)
The routees.
STRATEGY
Initarg: STRATEGY
Initform: (GET-STRATEGY RANDOM)
The router strategy. The `strategy' is a function with a `fixnum' as input and a `fixnum' as output. The input represents the number of routees. The output represents the index of the routee to choose.

Description:

A router combines a pool of actors and implements the actor-api protocol. So a `tell', `ask-s' and `ask' is delegated to one of the routers routees. While a router implements parts of the actor protocol it doesn't implement all. I.e. a router cannot be `watch'ed. A router `strategy' defines how one of the actors is determined as the forwarding target of the message.