[Twisted-web] Twisted Application(Daemon) with multiple clients

Carl Waldbieser cwaldbieser at gmail.com
Sun Oct 22 18:28:27 MDT 2017


Without knowing many details, it seems like your approach seems
reasonable.  I'd have expected that your configuration service would act as
both a client (using the REST service to download configuration) and a
server (providing config information over UNIX sockets), but I don't really
know much about your particular set up.

To turn the program into a service, you could follow the steps for "Writing
A Twisted Plugin" [1], or "Using the Twisted Application Framework" [2].

Thanks,
Carl Waldbieser

[1]  http://twistedmatrix.com/documents/current/core/howto/tap.html
[2] http://twistedmatrix.com/documents/current/core/howto/application.html


On Tue, Oct 17, 2017 at 5:12 AM, Daniel Doron <danielmeirdoron at gmail.com>
wrote:

> Hi,
>
> Sorry in advance for sending this to both Twisted mailing list. i was
> not sure for which was it was most appropriate.
>
> I have a design in which I would like to have a Twisted Application
> which would periodically connect to a REST Server to pull
> configuration information, i.e. as client and upon receiving that
> information and processing would communicate spawn 1 or more clients
> connecting to local process via Unix sockets to send them
> configuration information.
> I think I understand how the standard approach would be:
> 1. create a function that would be called with callLater/LoopingCall
> 2. in that function create my client, connect to the REST Server, get
> info etc...
>
> So:
> 1. Do you think my approach is correct? Essentially as explained I
> need a service/daemon to periodically connect ot one server to pull
> information and then connect to other local process to forward them
> the relevant configuration.
> 2. How do I turn this into a twisted plugin? (daemon)
>
>
> Thanks
> -Daniel
>
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-web/attachments/20171022/de32d2d2/attachment.html>


More information about the Twisted-web mailing list