On Wed, Apr 6, 2011 at 1:27 PM, Tim Allen <screwt...@froup.com> wrote:
> On Wed, Apr 06, 2011 at 12:41:08PM +0200, Laurens Van Houtven wrote: > > Whoa hang on. Without trying to hijack the thread, this is the entire > > premise of infobarb, the IRC bot I'm building for #python-*, except > > s/pickle/sqlite/, so if this is a horrible idea I'd like to know before I > > build it. > > I'm not familiar with the reasons Twistd moved from .tap to .tac (it's > rather before my time), but as a user I'd be worried about things like > "what happens if, due to a bug, the server winds up choking on some > unexpected input, or deadlocked, or just mis-files some piece of state?" > Restarting the process in question is a sledgehammer approach, but > that's often what you want if the alternative is unscheduled downtime. Right -- I don't think this applies to my bot since if it does the argument can also be extended to "don't have any persistence at all, state is bad" ;-) (It is, but that's not the most pragmatic of answers.) The difference between Pickle and SQLite is that a SQLite database has > probably had some thought put into its schema, and is much less likely > to accidentally scoop up random other objects by reference. Also, if > your database *does* pick up some unwanted state, you have the option of > tinkering with the database manually; something that's much more > difficult to do with pickles. > Right -- I'm giving plugins to the bot a SQLite database, it's up to them if they use it. All state serialization is explicit. I'm hoping it's going to be more sensible as a result. I'd be interested in hearing from Twisted greybeards why .tap was > deprecated, but I don't think your IRC bot has a fatal design flaw. > Whew :) Thanks for confirming anyway :) -- cheers lvh
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python