Sharing Inter-image Data

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Sharing Inter-image Data

Sean P. DeNigris
Administrator
When using any tool that exposes objects outside the image - Seaside, Amber, rST - how does one guard against simultaneous edits? Up until now, I've been perfectly content with single images and read-only web apps, but now that I'm considering some stateful web apps/services, I can't remember ever seeing locking addressed. And I wonder if all the cool new JS technology could make the process more responsive i.e. notify the client if the underlying data has changed...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Sharing Inter-image Data

jtuchel
Sean,

I guess most guarding is based on optimistic locking these days. But
neither Seaside nor Amber imposes any mechanism on the developer. So you
are on your own there. I have been using TOPLink or Glorp and Seaside
for a few years now, and all I've seen or used so far used optimistic
locking provided by the persistency mechanism.

No doubt you can use JS and Ajax or even WebSockets to make the
round-trip feel more responsive. But there still is the risk of the gap
between some JS request being answered (can these objects be updated?)
and the actual attempt to update. So you basically would do a full round
trip anyways (dear server, update these objects if possible!). It
depends on your taste if that is any better than just using a normal
round trip, like in Seaside. An additional problem could be that you
need to handle objects on the client, which you typically don't in
Seaside, which only renders pages down to the client.

HTH

Joachim

Am 04.08.15 um 12:54 schrieb Sean P. DeNigris:

> When using any tool that exposes objects outside the image - Seaside, Amber,
> rST - how does one guard against simultaneous edits? Up until now, I've been
> perfectly content with single images and read-only web apps, but now that
> I'm considering some stateful web apps/services, I can't remember ever
> seeing locking addressed. And I wonder if all the cool new JS technology
> could make the process more responsive i.e. notify the client if the
> underlying data has changed...
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context: http://forum.world.st/Sharing-Inter-image-Data-tp4840912.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


--
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:[hidden email]
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1


Reply | Threaded
Open this post in threaded view
|

Re: Sharing Inter-image Data

Mariano Martinez Peck
In reply to this post by Sean P. DeNigris
Well...there is when you find out that simple persistency solutions may start being a problem for you. Most of the times is as Joachim says, that is, the synchronism of data is managed by the persistency solution. Could be mongo (but I never tried with multiple images), could be Glorp, GemStone, Magma, etc. 

I the last years I've been doing the "develop on Pharo and deploy on GemStone" and I am very very happy with it. GemStone does have quite some tools to reduce even  more the commit conflicts. For example, it provides "Reduced Conflicts" collection classes, that for example allow concurrent adding/removing/iteration things (depending on which class) from multiple VMs... It also provides locks you can manually ask/release, thought this is not common. 

In addition, the GLASS version of GemStone and the port of Seaside comes with a very very simply approach in which at the start of a request, a GemStone session is opened. At the end of the request, it tries to commit. If there was a conflict, it rollbacks and then tries again. 3 times. This solves quite some scenarios of typical "commit conflicts" that could be solved automatically by just waiting a little bit and re-try. 

So... if you are willing to spend some hours to lear about GemStone, I would give that a try.  

Cheers,


On Tue, Aug 4, 2015 at 7:54 AM, Sean P. DeNigris <[hidden email]> wrote:
When using any tool that exposes objects outside the image - Seaside, Amber,
rST - how does one guard against simultaneous edits? Up until now, I've been
perfectly content with single images and read-only web apps, but now that
I'm considering some stateful web apps/services, I can't remember ever
seeing locking addressed. And I wonder if all the cool new JS technology
could make the process more responsive i.e. notify the client if the
underlying data has changed...



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Sharing-Inter-image-Data-tp4840912.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




--