X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.22.2a (ClamAV engine v0.102.2) X-Junk-Score: 0 [] X-KAS-Score: 0 [] From: "OCsite" Received: from smtp-beta-1.zoner.com ([217.198.120.66] verified) by post.selbstdenker.com (CommuniGate Pro SMTP 6.3.3) with ESMTPS id 26037340 for webobjects-dev@wocommunity.org; Thu, 17 Jun 2021 17:00:38 +0200 Received-SPF: none receiver=post.selbstdenker.com; client-ip=217.198.120.66; envelope-from=ocs@ocs.cz Received: from smtp.zoner.com (smtp.zoner.com [217.198.120.6]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp-beta-1.zoner.com (Postfix) with ESMTPS id 6C3BB1800BFE for ; Thu, 17 Jun 2021 17:00:17 +0200 (CEST) Received: from smtpclient.apple (smtp2stechovice.cli-eurosignal.cz [77.240.99.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ocs@ocs.cz) by smtp.zoner.com (Postfix) with ESMTPSA id 01C34300007D for ; Thu, 17 Jun 2021 17:00:16 +0200 (CEST) Content-Type: multipart/alternative; boundary="Apple-Mail=_7FF43EFF-7EB4-43B5-AFB0-42FE7D4A35C9" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: [WO-DEV] ... too many snapshots? Date: Thu, 17 Jun 2021 17:00:16 +0200 References: To: WebObjects & WOnder Development In-Reply-To: Message-Id: <90517DF2-1B0C-403D-A279-5EDD41C23C24@ocs.cz> X-Mailer: Apple Mail (2.3654.100.0.2.22) --Apple-Mail=_7FF43EFF-7EB4-43B5-AFB0-42FE7D4A35C9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Trying to find all the snapshot info I could, I've bumped in the mail = archives into two claims which most probably are both valid (given the = author), but whatever I do, I can't reconcile them. Anybody here = understands this and can explain? > On 28. 2. 2015, at 19:54, Chuck Hill wrote: > ec.committedSnapshotForObject() [which] causes the EC to record the = committed snapshot for the object at that point in time. Normally this = is done only at the point the EO first changes > On 19. 4. 2016, at 23:24, Chuck Hill wrote: > IMO each EC should have its own set of snapshots, at least it should = grab them at the first point it modifies an EO. But, alas, it does not. Thanks a lot, OC > On 17. 6. 2021, at 14:43, OCsite = wrote: >=20 > Ramsey, >=20 >> On 17 Jun 2021, at 0:41, Ramsey Gurley = > = wrote: >> = https://wiki.wocommunity.org/display/documentation/EOF-Using+EOF-Caching+a= nd+Freshness = >> In particular, check out Mark Ritchie's Freshness Explorer = application which lets you see how the different layers of the stack = propagate changes. >=20 > Thanks, but it does not really help. Especially as of >=20 >>> I admit I am sort of lost in the things. >>>=20 >>> So far I lived in impression that (if we ignore undo) there's only = one kind of snapshots: OSC-level shared snapshots of = what-was-just-saved-into-DB. >>>=20 >>> I've tried to research the thing a bit and there seem to be at the = very least the following snapshots: >>>=20 >>> (i) EC.committedSnapshotForObject >>> (ii) EC.currentEventSnapshotForObject >>> (iii) EODatabaseContext.snapshotForGlobalID >>> (iv) EODatabaseContext.localSnapshotForGlobalID >>>=20 >>> I regret to say the standard documentation does not help much. I did = some testing and it looks like >>>=20 >>> - (iii) is the one snapshot I knew: whenever save finishes, it = always contains the newly saved values >>> - (i) and (ii) =E2=80=94 which for me always contain same data, = that's weird! =E2=80=94 seem to contain an EC-level snapshot stored at = its (first) willChange. Also it looks like those =E2=80=9Clocally = uncommitted changes=E2=80=9D are based on (one of) these. So far though = I haven't found a case when (i) would differ from (ii)... although, = based on the name, I would actually presume (i) should be the same as = (iii). It very definitely is not. >>> - (iv) I don't understand at all :( >>>=20 >>> Are those things somewhere documented in detail? >=20 > it never touches those suspicious EC.xxxSnapshotForObject things; and = the particular code it uses, namely, >=20 > =3D=3D=3D > EODatabaseContext databaseContext =3D (EODatabaseContext) = osc.objectStoreForGlobalID(gid); > EODatabase database =3D databaseContext.database(); > snapshot =3D database.snapshotForGlobalID(gid); > =3D=3D=3D >=20 > just brings a suspicion whether this things differs from (iii)/(iv) = above, and if so, how :( >=20 > If anybody knows of a good documentation of all those snapshots, how = they differ, when they are created and how they are used, I'd be really = grateful. >=20 > Thanks and all the best, > OC >=20 --Apple-Mail=_7FF43EFF-7EB4-43B5-AFB0-42FE7D4A35C9 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Trying to find all the snapshot info I could, I've bumped in = the mail archives into two claims which most probably are both valid = (given the author), but whatever I do, I can't reconcile them. Anybody = here understands this and can explain?

On 28. 2. 2015, at 19:54, Chuck Hill <chill@gevityinc.com>= wrote:
ec.committedSnapshotForObject() [which] causes the = EC to record the committed snapshot for the object at that point in = time.  Normally this is done only at the point the EO first = changes

On 19. 4. 2016, at 23:24, Chuck = Hill <chill@gevityinc.com> wrote:
IMO each EC = should have its own set of snapshots, at least it should grab them at = the first point it modifies an EO.  But, alas, it does = not.

Thanks a lot,
OC

On 17. 6. 2021, at 14:43, OCsite <webobjects-dev@wocommunity.org> wrote:

Ramsey,

On 17 Jun 2021, at 0:41, Ramsey Gurley <webobjects-dev@wocommunity.org> wrote:
https://wiki.wocommunity.org/display/documentation/EOF-Using+EO= F-Caching+and+Freshness
In particular, check out Mark Ritchie's Freshness = Explorer application which lets you see how the different layers of the = stack propagate changes.

Thanks, but it does not really = help. Especially as of

I = admit I am sort of lost in the things.

So far I lived in impression that (if we ignore = undo) there's only one kind of snapshots: OSC-level shared snapshots of = what-was-just-saved-into-DB.

I've tried to research the thing a bit and there = seem to be at the very least the following snapshots:

(i) EC.committedSnapshotForObject
(ii) = EC.currentEventSnapshotForObject
(iii) EODatabaseContext.snapshotForGlobalID
=
(iv) EODatabaseContext.localSnapshotForGlobalID

I = regret to say the standard documentation does not help much. I did some = testing and it looks like

- (iii) is the one snapshot I knew: whenever save = finishes, it always contains the newly saved values
- (i) and (ii) =E2=80=94 which for me = always contain same data, that's weird! =E2=80=94 seem to contain an = EC-level snapshot stored at its (first) willChange. Also it looks like = those =E2=80=9Clocally uncommitted changes=E2=80=9D are based on (one = of) these. So far though I haven't found a case when (i) would differ = from (ii)... although, based on the name, I would actually presume (i) = should be the same as (iii). It very definitely is not.
- (iv) I don't = understand at all :(

Are those things somewhere documented in = detail?

it never touches those = suspicious EC.xxxSnapshotForObject things; and the particular code it = uses, namely,

=3D=3D=3D
EODatabaseContext = databaseContext =3D (EODatabaseContext) = osc.objectStoreForGlobalID(gid);
EODatabase = database =3D databaseContext.database();
snapshot =3D = database.snapshotForGlobalID(gid);
=3D=3D=3D

just brings a = suspicion whether this things differs from (iii)/(iv) above, and if so, = how :(

If = anybody knows of a good documentation of all those snapshots, how they = differ, when they are created and how they are used, I'd be really = grateful.

Thanks= and all the best,
OC


= --Apple-Mail=_7FF43EFF-7EB4-43B5-AFB0-42FE7D4A35C9--