Re: CLOS and databases
From: Will Hartung (willh_at_msoft.com)
Date: 03/19/04
- Next message: John Thingstad: "Re: CLOS and databases"
- Previous message: John Thingstad: "Re: Ye Old Time Sharing System"
- In reply to: Erann Gat: "Re: CLOS and databases"
- Next in thread: John Thingstad: "Re: CLOS and databases"
- Reply: John Thingstad: "Re: CLOS and databases"
- Reply: Erann Gat: "Re: CLOS and databases"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 19 Mar 2004 14:10:31 -0800
"Erann Gat" <gNOSPAMat@jpl.nasa.gov> wrote in message
news:gNOSPAMat-1903041218500001@k-137-79-50-101.jpl.nasa.gov...
> In article <ptb8egyy.fsf@ccs.neu.edu>, Joe Marshall <jrm@ccs.neu.edu>
wrote:
> > That would end up requiring a transaction on every store!
>
> TANSTAAFL. But 1) it requires an update, not a transaction and 2) I have
> a scheme whereby multiple updates get queued up and only written to the DB
> when they're actually needed.
If you write to the DB (that is any standard generic modern SQL DB, and
specifically excluding mySQL), you get a transaction for every write no
matter what. The distinction being whether the transaction persists or
commits at the end of the write.
The other way, depending on what you want to do, is to simply flag the
entire object (and, perhaps the slot) for update and then on your Big Commit
you can either flush the entire thing, or if your noting slots, do a smart
update.
Obviously, one is simpler and more basic to do than the other.
It also depends on whether you want to be able to rollback object changes.
(setf object (make-instance 'persistent-user-class))
(setf (userid-key-slot object) "ID1234")
(retrieve object)
(print (first-name object))
"BOB"
(begin-transaction)
(setf (first-name object) "SAM")
(rollback-transaction)
(print (first-name object))
???
These are some of the fun problems persistence framework guys get to fight
with :-), and how "transparent" persistence really is/isn't.
Regards,
Will Hartung
(willh@msoft.com)
- Next message: John Thingstad: "Re: CLOS and databases"
- Previous message: John Thingstad: "Re: Ye Old Time Sharing System"
- In reply to: Erann Gat: "Re: CLOS and databases"
- Next in thread: John Thingstad: "Re: CLOS and databases"
- Reply: John Thingstad: "Re: CLOS and databases"
- Reply: Erann Gat: "Re: CLOS and databases"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|