If the "components" are all served by the same they are serialized even if served via ajax. If they are served by different apps that do not share a session then they are not serialized. There is no possibility of deadlocks. Everything is parallelized if there you do not use session.
Massimo On Apr 4, 5:54 am, AchipA <[email protected]> wrote: > Just an itsy bitsy note. How does this stuff handle sessions ? Joe B > has mentioned something that touches on this - web2py (and most > frameworks) use sessions to create an application level context. The > slight problem is if you introduce blocks that are supposed to work/ > load in parallel, it will be a little awkward because of how currently > sessions work in web2py IIRC. At best, the blocks will load > sequentially, at worst you will end up with a deadlock. > > Another problem is that the user can essentially 'fork' your > application by opening a page in a new tab/page, which can cause all > sorts of interesting interactions with self-aware independently > functioning (but state-wise not independent) blocks. > > On Apr 4, 10:41 am, Iceberg <[email protected]> wrote: > > > I want to test this idea, but it seems the events.tar does not contain > > that magic new web2py_ajax.html ? Did I miss something? > > > On Apr4, 2:02pm, mdipierro <[email protected]> wrote: > > > > I re-posted a slightly better version. > > > > The new version work in this way: > > > > say you have an action like: > > > > def myform(): > > > form=SQLFORM(...) > > > if form.accepts(....): > > > # do something > > > redirect(URL(....)); > > > return dict(form=form) > > > > You can turn it into a partial by replacing "redirect" with > > > "jDiv.redirect or "jDiv.flash" > > > > def myform(): > > > form=SQLFORM(...) > > > if form.accepts(....): > > > # do something > > > jDiv.redirect("done!!!"); > > > return dict(form=form) > > > > and create a view that DOES NOT extend the layout and does not have > > > HTML and BODY tags. Something like this will do: > > > > {{=form}} > > > > Then create a parent action and in the view embed this partial > > > > {{=jDiv("click me to ajax the partial",URL(r=request,f="myform"))}} > > > > Mind that a partial can be served by another application (within the > > > same web2py installation), can be a proxy to a different web-site and > > > can contain an IFRAME (not recommended but possible). > > > > > On Apr 3, 4:08 pm, mdipierro <[email protected]> wrote: > > > > > > I have prototype application that does this. > > > > > > http://www.web2py.com/examples/static/web2py.app.events.tar > > > > > > It uses jquery publisher subscriber mechanism. All the code is in a > > > > > new web2py_ajax and a class call jDiv (similar to Rails Partial but > > > > > more powerful in my opinion) which I could include in html.py --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

