Using Redis

By default, Batsim’s Protocol transfers job metadata directly on the socket between Batsim and the Decision Process. Alternatively, you can use a Redis server to transfer this information. Redis support is enabled by providing the --enable-redis Command-line Interface flag to the Batsim command.

Warning

Redis should also be configured in your Scheduler implementation. Redis information is forwarded to the scheduler in the SIMULATION_BEGINS protocol event.

Key prefix

Since several Batsim instances can be run at the same time, all the keys explained in this document must be prefixed by some instance-specific prefix. The key prefix can be set by the --redis-prefix Command-line Interface option. Batsim will write and read keys by prefixing them by the user-given prefix followed by a colon :.

List of used keys

Job information

As soon as job <ID> is submitted within Batsim, the job_<ID> key is set. Its value is the JSON description of the job (cf. Job definition).

Note

When using Redis with Dynamic registration of jobs, Batsim expects to find job information in the Redis store when it receives a REGISTER_JOB event.

Profile information

If profile forwarding is enabled (--forward-profiles-on-submission Command-line Interface option, forwarded in SIMULATION_BEGINS), the profile of jobs is also set in the Redis store at job submission time. If the submitted job uses the <PROF> profile, the profile_<PROF> key is set. Its value is the JSON description of the profile (cf. Profile definition).

Note

When using Redis with Dynamic registration of jobs, Batsim expects to find profile information in the Redis store when it receives a REGISTER_PROFILE event.