Programmatically save image, and also do it periodically

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

Re: Programmatically save image, and also do it periodically

Boris Popov, DeepCove Labs (SNN)
Re: Programmatically save image, and also do it periodically

I'm not a Squeak user, but in VisualWorks if you work in chunks and publish your work in progress few times a day you can easily recover anything in between from a change set in a minute or two at most depending on complexity of changes. Doesn't Squeak have the same capability? Image auto save just smells wrong to me.

Cheers!

-Boris (via BlackBerry)

----- Original Message -----
From: [hidden email] <[hidden email]>
To: [hidden email] <[hidden email]>
Sent: Wed Jan 09 20:44:20 2008
Subject: Re: Programmatically save image, and also do it periodically


"tim Rowledge" <[hidden email]> wrote

>> Auto-save, here I come ... :-)
> Beware of the dangers herein. If you make some dangerous change and it
> auto-saves ... you've now got a live image with the dangerous state  and a
> saved image with the dangerous state.

Ah, thank you for the warning! Perhaps I will use Save as New Version, (and
set the timer a bit longer :-)

Sophie







Reply | Threaded
Open this post in threaded view
|

Re: Programmatically save image, and also do it periodically

Zulq Alam-2
In reply to this post by Sophie424
Are you losing time recovering the image or the new code you have
written? Perhaps a periodic Monticello save would be more suitable.

Zulq.

itsme213 wrote:

> "tim Rowledge" <[hidden email]> wrote
>
>>> Auto-save, here I come ... :-)
>> Beware of the dangers herein. If you make some dangerous change and it
>> auto-saves ... you've now got a live image with the dangerous state  and a
>> saved image with the dangerous state.
>
> Ah, thank you for the warning! Perhaps I will use Save as New Version, (and
> set the timer a bit longer :-)
>
> Sophie
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Programmatically save image, and also do it periodically

Sophie424
"Zulq Alam" <[hidden email]> wrote in message news:[hidden email]...
> Are you losing time recovering the image or the new code you have written?
> Perhaps a periodic Monticello save would be more suitable.

Thank you. I should separate my use cases:

- Auto-Save of development source-code: should use a MC save, not image
save. I will peer into this and try to figure how I might do it.

- Save (non-development) state of image to serve as low-tech database for my
application objects: image save.

Am I on the right, and safe, track now?

Sophie




Reply | Threaded
Open this post in threaded view
|

Re: Programmatically save image, and also do it periodically

Jason Johnson-5
In reply to this post by John Thornborrow
Is an object database like Magma too slow for this? If so, perhaps
there is a journaling package somewhere (i.e. what ext3, reiserfs and
any modern filesystem does to ensure no data loss if power is lost) or
one could be written?

On Jan 9, 2008 11:32 AM, John Thornborrow <[hidden email]> wrote:

> We have a squeaksource image running, and if the image crashes we lose
> any new projects and/or users registered since the last save. Thus a
> periodic, automatic/programmatic save would be ideal.
>
> Regards,
> John
>
> www.pinesoft.co.uk
>
>
> Tom Phoenix wrote:
> > On Jan 8, 2008 10:18 AM, itsme213 <[hidden email]> wrote:
> >
> >> I need to urgently do both these saves:
> >>   - do these on command (via Seaside app interface)
> >>   - automatically on a timer
> >
> > Why is it urgent to save "automatically on a timer"? Is it because
> > you're using the image to hold key data that should really be kept in
> > a database?
> >
> > Cheers!
> >
> > --Tom Phoenix
> >
> >
> >
> >
> >
>
>
> Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA
>
>
>
> This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Programmatically save image, and also do it periodically

Jason Johnson-5
In reply to this post by Boris Popov, DeepCove Labs (SNN)
Yea, code is journaled for sure.  I have recovered code from a crash
before.  My impression was that they want this image save due to
losing application data which isn't journaled.

On Jan 10, 2008 5:48 AM, Boris Popov <[hidden email]> wrote:

>
>
>
> I'm not a Squeak user, but in VisualWorks if you work in chunks and publish
> your work in progress few times a day you can easily recover anything in
> between from a change set in a minute or two at most depending on complexity
> of changes. Doesn't Squeak have the same capability? Image auto save just
> smells wrong to me.
>
>  Cheers!
>
>  -Boris (via BlackBerry)
>
>
>
>  ----- Original Message -----
>  From: [hidden email]
> <[hidden email]>
>  To: [hidden email]
> <[hidden email]>
>  Sent: Wed Jan 09 20:44:20 2008
>  Subject: Re: Programmatically save image, and also do it periodically
>
>
>  "tim Rowledge" <[hidden email]> wrote
>
>  >> Auto-save, here I come ... :-)
>  > Beware of the dangers herein. If you make some dangerous change and it
>  > auto-saves ... you've now got a live image with the dangerous state  and
> a
>  > saved image with the dangerous state.
>
>  Ah, thank you for the warning! Perhaps I will use Save as New Version, (and
>  set the timer a bit longer :-)
>
>  Sophie
>
>
>
>
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Programmatically save image, and also do it periodically

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Sophie424
Re: Programmatically save image, and also do it periodically

Well that's called database ;)

Cheers!

-Boris (via BlackBerry)

----- Original Message -----
From: [hidden email] <[hidden email]>
To: The general-purpose Squeak developers list <[hidden email]>
Sent: Sun Jan 13 04:25:23 2008
Subject: Re: Programmatically save image, and also do it periodically

Yea, code is journaled for sure.  I have recovered code from a crash
before.  My impression was that they want this image save due to
losing application data which isn't journaled.

On Jan 10, 2008 5:48 AM, Boris Popov <[hidden email]> wrote:
>
>
>
> I'm not a Squeak user, but in VisualWorks if you work in chunks and publish
> your work in progress few times a day you can easily recover anything in
> between from a change set in a minute or two at most depending on complexity
> of changes. Doesn't Squeak have the same capability? Image auto save just
> smells wrong to me.
>
>  Cheers!
>
>  -Boris (via BlackBerry)
>
>
>
>  ----- Original Message -----
>  From: [hidden email]
> <[hidden email]>
>  To: [hidden email]
> <[hidden email]>
>  Sent: Wed Jan 09 20:44:20 2008
>  Subject: Re: Programmatically save image, and also do it periodically
>
>
>  "tim Rowledge" <[hidden email]> wrote
>
>  >> Auto-save, here I come ... :-)
>  > Beware of the dangers herein. If you make some dangerous change and it
>  > auto-saves ... you've now got a live image with the dangerous state  and
> a
>  > saved image with the dangerous state.
>
>  Ah, thank you for the warning! Perhaps I will use Save as New Version, (and
>  set the timer a bit longer :-)
>
>  Sophie
>
>
>
>
>
>
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Programmatically save image, and also do it periodically

Zulq Alam-2
In reply to this post by Sophie424
I think you could use image segments to save your domain objects. I
haven't used them but as I understand it you can persist a sub-graph of
objects to a file and load these into any image.

http://wiki.squeak.org/squeak/2316
http://wiki.squeak.org/squeak/1672

Regards,
Zulq.

itsme213 wrote:

> "Zulq Alam" <[hidden email]> wrote in message news:[hidden email]...
>> Are you losing time recovering the image or the new code you have written?
>> Perhaps a periodic Monticello save would be more suitable.
>
> Thank you. I should separate my use cases:
>
> - Auto-Save of development source-code: should use a MC save, not image
> save. I will peer into this and try to figure how I might do it.
>
> - Save (non-development) state of image to serve as low-tech database for my
> application objects: image save.
>
> Am I on the right, and safe, track now?
>
> Sophie
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Programmatically save image, and also do it periodically

Sophie424

"Zulq Alam" <[hidden email]> wrote
>I think you could use image segments to save your domain objects. I haven't
>used them but as I understand it you can persist a sub-graph of objects to
>a file and load these into any image.

Thanks, Zulq. I also received a similar helpful tip from Ramon, and was
surprised how easy it was to use several of those object-graph-aware
streams, like ReferenceStream, SixxWriteStream, SixxReadStream. So that is
what I will do for now.

Very sobering to think how many wrong direction I could chase without all
the help from this group ...

Sophie




Reply | Threaded
Open this post in threaded view
|

Re: Programmatically save image, and also do it periodically

NorbertHartl
In reply to this post by Jason Johnson-5

On Sun, 2008-01-13 at 13:23 +0100, Jason Johnson wrote:
> Is an object database like Magma too slow for this? If so, perhaps
> there is a journaling package somewhere (i.e. what ext3, reiserfs and
> any modern filesystem does to ensure no data loss if power is lost) or
> one could be written?
>
It is a modern myth that journaling filesystems protect you from data
loss. That is not true. It can be achieved to certain degree but
generally speaking it isn't very practical.
A journaling filesystem caches filesystem structure not data. It saves
you from filesystem corruption. You may loose the data which was
written at the time of the failure. But it prevents that you loose
all of the data only because a very prominent filesystem node got
corrupted. Caching all data and writing it to jounal than to the
filesystem would degrade the performance.


Norbert

> On Jan 9, 2008 11:32 AM, John Thornborrow <[hidden email]> wrote:
> > We have a squeaksource image running, and if the image crashes we lose
> > any new projects and/or users registered since the last save. Thus a
> > periodic, automatic/programmatic save would be ideal.
> >
> > Regards,
> > John
> >
> > www.pinesoft.co.uk
> >
> >
> > Tom Phoenix wrote:
> > > On Jan 8, 2008 10:18 AM, itsme213 <[hidden email]> wrote:
> > >
> > >> I need to urgently do both these saves:
> > >>   - do these on command (via Seaside app interface)
> > >>   - automatically on a timer
> > >
> > > Why is it urgent to save "automatically on a timer"? Is it because
> > > you're using the image to hold key data that should really be kept in
> > > a database?
> > >
> > > Cheers!
> > >
> > > --Tom Phoenix
> > >
> > >
> > >
> > >
> > >
> >
> >
> > Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA
> >
> >
> >
> > This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
> >
> >
> >
>


Reply | Threaded
Open this post in threaded view
|

Re: Programmatically save image, and also do it periodically

Herbert König
In reply to this post by Zulq Alam-2
Hello Zulq,

ZA> I think you could use image segments to save your domain objects. I
ZA> haven't used them but as I understand it you can persist a sub-graph of
ZA> objects to a file and load these into any image.

I use them in some apps but depending on what you do they are not
really fast. So one might want to have a way of differential save.

And if I recall correctly I read here that they don't work if your
objects contain blocks.


Cheers

Herbert                            mailto:[hidden email]


12