[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-tools] Xend's xenstore interface



On Fri, Jul 29, 2005 at 11:33:28AM -0700, Dan Smith wrote:
> 
> What is the best way to write a value to the xenstore immediately,
> from within xend?  Currently, I'm setting a DBVar and then explicitly
> calling exportToDB() on the DBMap, from inside XendDomainInfo.
> 
> Is there a more appropriate way?

I find the best way to write to the store is to create a DBMap for
a subtree and then use saveDB(save=True) on the DBMap, i.e.:
            db = self.db.addChild("/subtree/path")
            db['key'] = ...
            db.saveDB(save=True)

I'm not so keen on the DBVar interface...

Also, the current interface doesn't use transactions, as far as I can
tell and even more annoyingly creates empty nodes first and then fills
in the data which causes watches to fire way too many times.

It would be much appreciated if someone could look into this and also
add an interface to do updates using transactions, maybe something like:
            transdb = db.addTrans("/subtree/path")
            transdb['key'] = ...
            transdb.commitTrans()

    christian


_______________________________________________
Xen-tools mailing list
Xen-tools@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-tools


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.