Redis is an open source (BSD licensed), in-memory data structure store, used as database, cache and message broker.
Resque is a Redis-backed Ruby library for creating background jobs, placing them on multiple queues, and processing them later.
This plugin show how to send messages using a hook in the indexer. It's really basic.
To use with ArchivesSpace you must:
## You may have other plugins
AppConfig[:plugins] = ['local', 'aspace_queue']
- Initalize the plugin ( download the gems needed ) In Linux, from your ASPACE directory
$ ./scripts/initialize-plugin.sh aspace-queue
- Start the Resque monitoring web app ( optional )
$ resque-web
or
$ bundle exec resque-web
And open your browser to localhost:5678 to see the redis application
- Start, or restart ArchivesSpace to pick up the configuration.
Have a look at the application. Whenever a record is run through the indexer, it will put it into a queue ( called 'record_created'). If you look at this queue, you'll see each job will have the ASPACE JSON waiting there for some other process to pick it up and act on it.
Here's what the Resque app looked like:
Questions?