The WLM server should be able to control and monitor WLM independently to the main thread, i.e., request handler by Django.
For this, we can implement another thread and a channel for communicating from request handler to task handler.
(We will name it "message queue".)
Meanwhile, it is necessary to implement a measurement task container for managing periodic measurement tasks and determining which task to perform next.
It will be constructed as a custom priority queue and the task handler will keep watching this.
The overall structure and scheme are shown below.
How the feature is implemented
All features about WLM tasks will be located in task/ directory.
The overall file structure in task/ is as follows.
handler.py: Implement task handler using threading.
message.py: Implement message queue using queue.Queue.
measure.py: Implement measurement queue using heapq.
wlm.py: Implement features communicating with WLM.
As we discussed in #10, a task handler will be started when measurement starts.
(updated at 241114)
Feature you want to implement
The WLM server should be able to control and monitor WLM independently to the main thread, i.e., request handler by Django. For this, we can implement another thread and a channel for communicating from request handler to task handler. (We will name it "message queue".)
Meanwhile, it is necessary to implement a measurement task container for managing periodic measurement tasks and determining which task to perform next. It will be constructed as a custom priority queue and the task handler will keep watching this.
The overall structure and scheme are shown below.
How the feature is implemented
All features about WLM tasks will be located in
task/
directory.The overall file structure in
task/
is as follows.handler.py
: Implement task handler using threading.message.py
: Implement message queue using queue.Queue.measure.py
: Implement measurement queue using heapq.wlm.py
: Implement features communicating with WLM.As we discussed in #10, a task handler will be started when measurement starts.