Plugins You can find out about all the publicly available Grails plugins.

queuekit plugin

0 vote
Dependency:
compile "org.grails.plugins:queuekit:1.5"

 Documentation  Source  Issues

Summary

Queuekit plugin provides you with various ways of calling on TaskExecutor and specifically it's underlying queuing mechanism to control the creation of reports on your grails application. Queuekit can help whether you are using the existing grails export plugin or you manually produce csv,tsv or maybe even rely on apache-poi or it's likes to produce xls files as per user request. With this plugin you can change the process of files produces as requested to files produced when there is an available runable space for it to be executed. In effect saving your application from slowing down if there are surges for reports by your userbase.

Installation

compile ":queuekit:1.4"

Description

Queuekit is a plugin for grails which uses TaskExecutor with Spring Events for grails 2 and for grails 3 using default Reactor events to manage concurrent submitted reports.

At work we face a scenario where reports and core application are integrated and even if separated they would still hit the same database.

The reports are typically rendered through response as a file stream and saved to user's desktop.

At some periods of the day the application runs slow, we think due to people running reports concurrently. Without going into further complexity of database, application and reporting system. A cure would be to limit the amount of concurrent reports that can run and sort reports based on a priority system allowing (HIGHER: Speedier ones through over LOWER: Calculations would suggest it will take long per report basis)

Queuekit plugin incorporates TaskExecutor ArrayBlocking / LinkBlocking and PriorityBlocking.

It also enhances on PriorityBlocking with a new custom method called EnhancedPriorityBlocking.

Define queue limit which in turn limits concurrent usage of all users.

Typical request on demand report system will change to background queued reports system. Choose the best blocking method for your queues.

Both Priority and EnhancedPriority allow queue items to have a default or on the fly priority.

EnhancedPriorityBlocking is more costly and launches addition threads per job but all in aid of actually being able to kill a live running IO task.

When master task or live running task is cancelled. The underlying thread is cancelled. This gives you the feature to cancel live background threaded tasks.