With Cytomine, we can run softwares (see Package Software for more details about softwares and jobs). The middleware packaged is used to transmit data from the core to any other entity whether it is on the same machine (server) or not. When you add a software the core will automatically create the ressources needed to send data related to that specific software.
Package main classes
A domain that supports Advanced Message Queuing Protocol.
Represents a configuration (one parameter) for an AMQP queue implemented with
|AmqpQueueConfigInstance||Domain used to override a RabbitMQ configuration (i.e. when you want to use something|
else other than a default value).
Cytomine uses RabbitMQ as a middleware. A few grails plugins that focus on RabbitMQ exist but we wanted more flexibility and we didn't want to be reliant on a developer. For those reasons, the middleware package tries to be independent on the middleware (here RabbitMQ). The middleware could be replaced without much alteration inside the core.
When we add a software, the service SoftwareService will add an AmqpQueue.
The queue creation is possible with default values of custom values (using AMQPQueueConfigInstance). These two methods are available inside the AMQPService :
You can also easily publish a message (put data on a RabbitMQ queue) with this method :
The package also provides a utility class to create connections to the middleware, this service is RabbitConnectionService :