Re: ZODB and asyncio interaction
Jim Fulton <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <CAPDm-FhRFMu4EGoBfhNjDQAF_s5TzE+0WTgJkCGhMXcYtz4ghQ@mail.gmail.com> |
On Thu, Apr 21, 2016 at 10:03 PM, Jesus Cea <[email protected]> wrote: > Hi there. I kind of remember a discussion some time ago about the > strategy to mix ZODB and asyncio, with references to some other work, > but I don't remember the details and I can't find the thread. > > Thinking of my own, I can't devise how to be able to suspend an > attribute access to fetch the data and, at the same time, allow other > asyncio activity to progress in the same thread. > > What am I missing or I misunderstood the thread and it can't just be > done? :-) I don't think the ZODB model fits with asynchronous development. I'm a huge fan of asynchronous development for I/O or when dealing with external services. I'm not a fan of asynchronous development as a general development model. I get why some people embrace it; in a browser, you often have to wait for a server without blocking a UI, and browser developers are bringing their habits to the server, where it might not make much sense. One might argue that ZODB applications sometimes block waiting for a storage server, but I would argue that if this is significant, then perhaps the application isn't tuned well, and that this can be mitigated with a modest thread pool, in addition to tuning, if possible. BTW, I've been thinking off an on about how someone might leverage ZODB in a browser. A model I've been thinking about is one where ZODB could be used in web-workers that are exposed as services with asynchronous interfaces, but work imperatively internally. Jim -- Jim Fulton http://jimfulton.info -- 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.