Re: Applause for ZODB! And a question: How do you get pending change info from a transaction object?
David Pesta <[email protected]> Sat, 28 Apr 2018 04:17:29 -0700 (PDT)
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <[email protected]> |
Correct me if I'm wrong, but isn't the _p_changed flag on the object itself? If I have the transaction object in hand and it's about to commit, I need to know just the objects that have changed, so wouldn't your suggestion mean that I have to traverse every object in the entire repository to look for _p_changed flags? I would expect that the transaction object maintains an internal list of objects that are getting ready to change so that it can efficiently commit them. I would simply want access to whatever enables the transaction to do that so that I can use it to inform sockets about the changes that they want to know about. But again, my familiarity of ZODB internals is next to nothing. (That may change.) So there may be some hidden assumption that yanks the floor under everything that I'm saying. :D I read that transactions are more than just ZODB and could also be combined with pretty much anything, so I have a general idea of the strategy you are talking about with MQTT, which I'll spend time looking into. Yes, that would be interesting. One thing that interests me about Tornado, and perhaps this is true of MQTT as well, is that it can accept an http or https connection on port 80 or 443 and then turn right around and establish a websocket connection on the same port. (And you can do that with almost no code, which is nifty, but not a requirement.) If MQTT can accomplish this, that would be interesting. I'll still take a look at it either way. GoLang has also been interesting to me (neat for MQTT), but not for high level business logic for my app--I'm glad it ties in to Python. Subscribing to a tree of objects would be interesting, yes. As long as I can also get surgical and subscribe to specific objects if I want to. I also want to be careful not to get lost. A clear path to what I'm trying to accomplish this time around may simply be to find a way to ask the transaction object what the pending object changes are without traversing the entire repository. At least as an alternative as I investigate your recommendations. I will now check out all of the resources you provided. Thank you much! -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.