[Twisted-Python] Coil refactor more or less done
![](https://secure.gravatar.com/avatar/433365de0f787faa3ed3e6dd1da5884f.jpg?s=120&d=mm&r=g)
Hi, Background: COIL is a configuration system for Twisted, allowing you to manage and configure your server via the web, developed by glyph. To test it out: $ mktap coil $ twistd -n -f coil.tap And point your browser at http://localhost:9080 In CVS, the coil system has been refactored, and now resides in twisted.coil. I feel that at this point it is now usable for configuring real apps. Real world use will help us find missing requirements and find issues and bugs. Examples of how to use it can be found in twisted.coil.plugins. Things that should really be coiled include cred, to the point that you can use coil to administrate users for manhole. t.mail is another candidate, and of course any servers based on twisted. If you are not using CVS Twisted, do not use coil - the interfaces have all been changed. You can still play around with it however, since it does work in the released code as well.
![](https://secure.gravatar.com/avatar/b3407ff6ccd34c6e7c7a9fdcfba67a45.jpg?s=120&d=mm&r=g)
On Mon, Mar 25, 2002 at 01:46:14PM +0200, Itamar Shtull-Trauring wrote:
Hi,
Background: COIL is a configuration system for Twisted, allowing you to manage and configure your server via the web, developed by glyph. To test it out:
$ mktap coil $ twistd -n -f coil.tap
And point your browser at http://localhost:9080
That's so cool! :) This is going to be great. I hadn't looked at coil before (I didn't understand how to use it), but it's going to be really, really handy. A few small glitches I've found mucking about with it: 1) You can't delete a manhole service once you create one. 2) If you create and configure an FTP server, connect to it, and then delete it, you can still use the server from the existing connection. I expect that this might be hard to fix, and may even be desirable in most cases anyway. 3) There's no warning if you try to delete or replace the thing on port 9080 with something else, causing you to think you've broken the configurator until you realise you've been an idiot :) -Andrew.
![](https://secure.gravatar.com/avatar/e1554622707bedd9202884900430b838.jpg?s=120&d=mm&r=g)
On Tue, Mar 26, 2002 at 11:24:30AM +1100, Andrew Bennetts wrote:
On Mon, Mar 25, 2002 at 01:46:14PM +0200, Itamar Shtull-Trauring wrote:
$ twistd -n -f coil.tap
That's so cool! :)
Hey, andrew -- Thanks for trying this out and giving feedback! Coil does have a lot of potential, but we need to test it out against a large set of real-world requirements :) -- ______ you are in a maze of twisted little applications, all | |_\ remarkably consistent. | | -- glyph lefkowitz, glyph @ twisted matrix . com |_____| http://www.twistedmatrix.com/
![](https://secure.gravatar.com/avatar/b3407ff6ccd34c6e7c7a9fdcfba67a45.jpg?s=120&d=mm&r=g)
On Mon, Mar 25, 2002 at 09:55:01PM -0600, Glyph Lefkowitz wrote:
Hey, andrew --
Thanks for trying this out and giving feedback! Coil does have a lot of potential, but we need to test it out against a large set of real-world requirements :)
Of course :) I'm thinking I can find some good uses for it at work. It is currently geared towards configuration (and that's something I've got alot of use for), but what I think I have the most immediate use for is status reporting -- statistics like "served n requests", "been running since", "last packet from upstream data feed arrived at ... and had a timestamp of ...". The sort of configuration I'd want to do is basically what you appear to already have -- start component X listening on port 1234, and connect it to upstream server Y on 9876. I possibly also want to save configuration to the registry rather than to taps, but I think taps are a better idea. Say, is there anyway to do "offline" editing of the configuration held in a tap? -Andrew.
![](https://secure.gravatar.com/avatar/433365de0f787faa3ed3e6dd1da5884f.jpg?s=120&d=mm&r=g)
Andrew Bennetts wrote:
Say, is there anyway to do "offline" editing of the configuration held in a tap?
Glyph was discussing this. It could be done very easily, basically by not activating Ports. At some point we'll probably set something where you use coil to edit an Application isntance that is *different* from the one that is running, so that coil doesn't show up in the ports list.
![](https://secure.gravatar.com/avatar/e1554622707bedd9202884900430b838.jpg?s=120&d=mm&r=g)
On Mon, 2002-03-25 at 22:13, Andrew Bennetts wrote:
On Mon, Mar 25, 2002 at 09:55:01PM -0600, Glyph Lefkowitz wrote:
Thanks for trying this out and giving feedback!
I'm thinking I can find some good uses for it at work. It is currently geared towards configuration (and that's something I've got alot of use for), but what I think I have the most immediate use for is status reporting -- statistics like "served n requests", "been running since", "last packet from upstream data feed arrived at ... and had a timestamp of ...".
It originally seemed to me that data-display would be a different component. (Remember Sean's twisted.metrics, anyone?) I guess you're right that it would be handy to display it in the same web interface, though... hmm...
The sort of configuration I'd want to do is basically what you appear to already have -- start component X listening on port 1234, and connect it to upstream server Y on 9876. I possibly also want to save configuration to the registry rather than to taps, but I think taps are a better idea.
You can introspect on the objects to save them to wherever :-). I'm sure that the registry can be contorted in order to save "arbitrary" Python objects.
Say, is there anyway to do "offline" editing of the configuration held in a tap?
Well, the existing coil code can edit "offline" as well as "online" configurations; it just takes an Application object and mutates it. Adding some buttons to the interface to save / load the app to a particular file should be trivial.
![](https://secure.gravatar.com/avatar/433365de0f787faa3ed3e6dd1da5884f.jpg?s=120&d=mm&r=g)
Glyph Lefkowitz wrote:
Well, the existing coil code can edit "offline" as well as "online" configurations; it just takes an Application object and mutates it. Adding some buttons to the interface to save / load the app to a particular file should be trivial.
The coil command-line app (bin/coil in CVS) works in "offline" mode. I do not want buttons for saving and loading - specifying the file on the command line is more secure, and lets me e.g. setup a coil on a website so I can give people URLs for demo purposes. And I see no reason why coil should be continiusly running if it's not configuring the same Application.
![](https://secure.gravatar.com/avatar/e8d7e03b9981c937597d9bf9ef1f704b.jpg?s=120&d=mm&r=g)
On Sat, 2002-03-30 at 04:40, Itamar Shtull-Trauring wrote:
Glyph Lefkowitz wrote:
Well, the existing coil code can edit "offline" as well as "online" configurations; it just takes an Application object and mutates it. Adding some buttons to the interface to save / load the app to a particular file should be trivial.
The coil command-line app (bin/coil in CVS) works in "offline" mode. I do not want buttons for saving and loading - specifying the file on the command line is more secure, and lets me e.g. setup a coil on a website so I can give people URLs for demo purposes. And I see no reason why coil should be continiusly running if it's not configuring the same Application.
I still think that there should be an option for saving/loading Applications. Personally, I *would* like to have a continuously-running COIL server on my machine. It could be an option to 'mktap coil'. -- Chris Armstrong << radix@twistedmatrix.com >> http://twistedmatrix.com/users/carmstro.twistd/
![](https://secure.gravatar.com/avatar/433365de0f787faa3ed3e6dd1da5884f.jpg?s=120&d=mm&r=g)
Andrew Bennetts wrote:
A few small glitches I've found mucking about with it: 1) You can't delete a manhole service once you create one.
I'll check this out - I think it should be easy to fix, just write an extra method in the services collection.
2) If you create and configure an FTP server, connect to it, and then delete it, you can still use the server from the existing connection. I expect that this might be hard to fix, and may even be desirable in most cases anyway.
I'll see if I can figure this out.
3) There's no warning if you try to delete or replace the thing on port 9080 with something else, causing you to think you've broken the configurator until you realise you've been an idiot :)
See my other email.
participants (4)
-
Andrew Bennetts
-
Christopher Armstrong
-
Glyph Lefkowitz
-
Itamar Shtull-Trauring