<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
hi magnum team,<br>
<br>
I am planing to add periodic task for magnum conductor service, it
will be good<br>
to sync task status with heat and container service. and I have
already have a WIP<br>
patch[1], I'd like to start a discussion on the implement.<br>
<br>
Currently, conductor service is an rpc server, and it has several
handlers<br>
endpoints = [<br>
docker_conductor.Handler(),<br>
k8s_conductor.Handler(),<br>
bay_conductor.Handler(),<br>
conductor_listener.Handler(),<br>
]<br>
all handler runs in the rpc server.<br>
<br>
1. my patch [1] is to add periodic task functions in each handlers
(if it requires such tasks)<br>
and setup these functions when start rpc server, add them to a
thread group.<br>
so for example:<br>
<br>
if we have task in bay_conductor.Handler() and
docker_conductor.Handler(),<br>
then adding 2 threads to current service's tg. each thread run it
own periodic tasks.<br>
<br>
the advantage is we separate each handler's task job to separate
thread.<br>
but hongbin's concern is if it will has some impacts on horizontally
scalability.
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<br>
<br>
2. another implement is put all tasks in a thread, this thread will
run all<br>
tasks(for bay,k8s, docker etc), just like sahara does see [2]<br>
<br>
3 last one is start a new service in a separate process to run
tasks.( I think this<br>
will be too heavy/wasteful)<br>
<br>
I'd like to get what's your suggestion, thanks in advance.<br>
<br>
[1] <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/187090/4">https://review.openstack.org/#/c/187090/4</a><br>
[2]
<a class="moz-txt-link-freetext" href="https://github.com/openstack/sahara/blob/master/sahara/service/periodic.py#L118">https://github.com/openstack/sahara/blob/master/sahara/service/periodic.py#L118</a><br>
<pre class="moz-signature" cols="72">--
BR, Eli(Li Yong)Qiao</pre>
</body>
</html>