<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Twisted-Python] How do I get at the Application object (using twistd)</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>> >Twisted documentation says I can manually save my</FONT>
<BR><FONT SIZE=2>> >application by using</FONT>
<BR><FONT SIZE=2>> >the 'save' method on the Application object. That's fine if I'm</FONT>
<BR><FONT SIZE=2>> >creating the Application object myself, but how do I get at this </FONT>
<BR><FONT SIZE=2>> >object if I'm using twistd to start it?</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> > ...</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> The Application is the wrong place to serialize updated DNS</FONT>
<BR><FONT SIZE=2>> records. The Application is for application configuration </FONT>
<BR><FONT SIZE=2>> (what user should it run as? what services should it </FONT>
<BR><FONT SIZE=2>> provide?). Application data should be serialized elsewhere.</FONT>
<BR><FONT SIZE=2>> Jp</FONT>
</P>
<P><FONT SIZE=2>Hmmm... I take your point. But...</FONT>
<BR><FONT SIZE=2>I was looking at doing it at the Application level because that</FONT>
<BR><FONT SIZE=2>seemed to fit with how twisted.names works. The full configuration</FONT>
<BR><FONT SIZE=2>of the DNS server, including all the name<->address mapping, is</FONT>
<BR><FONT SIZE=2>in the dns.tap file. When the server is stopped, this is saved</FONT>
<BR><FONT SIZE=2>in the dns-shutdown.tap file. So, if I apply some updates, then</FONT>
<BR><FONT SIZE=2>shut the server down, I can restart the server complete with</FONT>
<BR><FONT SIZE=2>updates by using dns-shutdown.tap. What I wanted to do was utilize</FONT>
<BR><FONT SIZE=2>that mechanism rather than do my own serializing, and have to </FONT>
<BR><FONT SIZE=2>manage two configuration files.</FONT>
<BR><FONT SIZE=2>Perhaps the question changes to:</FONT>
<BR><FONT SIZE=2> How do I separate the application data (DNS config) from</FONT>
<BR><FONT SIZE=2> the rest of the application?</FONT>
<BR><FONT SIZE=2> How do I start the application using that separate data?</FONT>
</P>
<P><FONT SIZE=2>It looked so elegant just to re-use the shutdown code!</FONT>
</P>
<P><FONT SIZE=2>Jeff</FONT>
</P>
</BODY>
</HTML>