Re: Applause for ZODB! And a question: How do you get pending change info from a transaction object?

David Pesta <[email protected]> Sun, 29 Apr 2018 16:22:03 -0700 (PDT)
Newsgroups gmane.comp.web.zope.zodb
Message-ID <[email protected]>
In Tornado, all things happen on a single thread:
http://www.tornadoweb.org/en/stable/#threads-and-wsgi

(Async/await can also be used in Tornado, but I'm pretty sure I can get by 
without that additional complexity for this.)

So, filestorage really is a consideration of mine and possibly all I will 
ever need. Although, I would definitely be interested in that hack (and 
later API) you mentioned that provides something for ZEO that is equivalent 
to newt.db.follow.

In any case, given everything you said (which was great btw!), RelStorage 
Postgres would probably be overkill for me for a while. I'm just looking 
for the simplicity of the tools that ZODB provides for traversing objects 
in the graph without all the infrastructural overhead.

To that end, these are the tools that are known to me at this time for 
being notified of database updates.

In raw note form:
- transaction.manager.registerSynch(MySynch)
- def beforeCompletion(cls, transaction):
- transaction.get()._resources[0]._registered_objects (yes, checks for None 
along the way are important)

I understand the concerns with that, as mentioned in this discussion:
1. Higher-level notifications at the application level might be better than 
sandwiching a mechanism between the application and the database. I'm 
guessing there are program organizational concerns and flexibility 
considerations that are behind this thought.
2. Transaction hooks only run on a single application server. (And other 
reasons.) Question: Since each of my database instances will be completely 
separate from one another and reside with the application on their own 
small application servers, do you foresee other complications? No need for 
a distributed database on separate machines or anything like that. Not 
desirable for this app. I think I'm in the clear there. Let me know if I 
understood you right, or if there are other concerns.

Let me know if I misunderstood anything. I am willing to take the time to 
get all this right from the start. However, if the above is fine as a 
stop-gap until later, that's good too.

Given my further details, additional feedback and recommendations are 
always welcome.

Many thanks,
David

-- 
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.