[Serusers] Dispatcher and a dynamic list file
Daniel-Constantin Mierla
daniel at voice-system.ro
Tue Aug 9 14:50:50 CEST 2005
On 08/09/05 13:51, Alistair Cunningham wrote:
> I'm looking for ideas on how to use the dispatcher module with a list
> file that is frequently updated by another process (specifically, it
> checks the availability of the remote machines, and also interacts
> with the heartbeat program).
>
> In the past, I've always used an exec_dst() call to run an external
> program which does this, but would now like to migrate to using
> dispatcher for performance. If that's not possible, I'll go back to
> the old method.
>
> I've considered adding a call to ds_select_dst() to call
> ds_destroy_list(); ds_load_list() on each request with file locking.
> It looks like it should work. Has anyone implemented this? Does it
> work? Does it have a significant impact on performance?
there is on the todo list to add support to reload the destination list
upon a fifo command or other external event. Destroying and reloading
the list for each request will have quite big performance impact, so it
is better to do it only when needed.
>
> I'd also be open to having the other process write to a database
> table, which then SER reads. I'm not sure what's the best mechanism
> within SER to look up the table - perhaps avpops? I'd even be willing
> write a new module to do it - 'dispatcher_db' perhaps, but this
> wouldn't be in the short future.
Do you want a db lookup for each request, or when the server starts and
then use a cache?
Daniel
More information about the sr-users
mailing list