[Pharo-users] Re: Backing up data

2024-01-18 Thread sergio ruiz
The idea is, I have been a software engineer for the past three decades.

I REALLY love my profession (even though now, it’s pretty much sitting in 
meetings all day), but I love it.

I have a few projects I always wanted to do, because I just want to do them 
because they are useful to me.

I have architected and coded hundreds of giant projects. At this point, 
building anything with the big web frameworks just seems exhausting.

I have decided to bring each of these pet projects to fruition and then 
document how and why i made each decision.

Every project will be using smalltalk as the data store. If the project is a 
website, I will use seaside as the web framework. Otherwise, I’ll use the 
teapot as an API interface.

The series of articles I will write will be aimed at people in my position. 
People who are familiar with software development, and would like to read about 
it at a higher than tutorial level.

In the end, I’ll end up with:

- an application of some sort that scratches my own itch
- a pile of articles outlining how i designed the tool set for the application.

and in reality, it’s gonna be thinly veiled Smalltalk evangelism.

But i think it might be worthwhile to talk about this stuff in a pubilc 
platform.



> On Jan 18, 2024, at 10:34 AM, Yanni Chiu  wrote:
> 
> Can you sketch out the complexity aspects of your five projects? Is this all 
> for learning, or are they “production” applications? Do you want to gain 
> experience with different ways to persist data, or are you just thinking that 
> you have to use different ways due to project complexity? It might be 


peace,
sergio
photographer, journalist, visionary

Public Key: 
https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
@sergio_101@mastodon.social
https://sergio101.com
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101



[Pharo-users] Re: Backing up data

2024-01-18 Thread Yanni Chiu
Can you sketch out the complexity aspects of your five projects? Is this
all for learning, or are they “production” applications? Do you want to
gain experience with different ways to persist data, or are you just
thinking that you have to use different ways due to project complexity? It
might be that Soil database could handle all your use cases, so you could
avoid working through a bunch of databases, unless you want to.

On Thu, Jan 18, 2024 at 8:56 AM sergio ruiz  wrote:

> I figured Gemstones would be SUPER heavy handed for this application, but
> I have a list of five projects, each increasing in complexity that I want
> to launch and document. So, sooner or later, I will need a more robust
> solution.
>
> Thanks!
>
>
>
> On Jan 18, 2024, at 8:26 AM, Norbert Hartl  wrote:
>
> GemStone is a huge thing to tame. I would not say the above and GemStone
> are alternatives. GemStone is a lot to install and learn but you get
> something that makes it hard to corrupt your data. So you have requirements
> that make it fit into GemStone or you have requirements that make it a fit
> for STON. Between both there is no overlap but rather a huge gap between
> the applicability of each.
>
>
> 
> peace,
> sergio
> photographer, journalist, visionary
>
> Public Key:
> https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> @sergio_101@mastodon.social
> https://sergio101.com
> http://www.codeandmusic.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
>
>


[Pharo-users] Re: Backing up data

2024-01-18 Thread Norbert Hartl


> Am 18.01.2024 um 14:54 schrieb sergio ruiz :
> 
> Using this Will my links remain viable using this method?
> 
> Meaning that an event has a theater. That theater is also in the 
> OrderedCollection of Theaters.
> 
> If the name of he theater changed in the Theaters collection, will that name 
> change occur in the event theater object?
> 
> After bringing these collections back in via STON, will all of these 
> relationships remain intact?

If with relationship you mean that one object event has a reference to a 
theater object then yes. STON serializes the graph as objects and all 
references will be reestablished on materialization.

Norbert
> 
> 
> 
>> On Jan 18, 2024, at 8:26 AM, Norbert Hartl  wrote:
>> 
>> If you have three classes with class side collections you can have a make 
>> e.g. a dictionary and put the collections from the class side into it like 
>> 
>> model := {
>>#theaters -> Theater instances.
>>#movies -> Movie instances.
>>#event -> Event instances.
>> } asDictionary.
>> 
> 
> 
> 
> 
> peace,
> sergio
> photographer, journalist, visionary
> 
> Public Key: 
> https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> @sergio_101@mastodon.social
> https://sergio101.com
> http://www.codeandmusic.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
> 



[Pharo-users] Re: Backing up data

2024-01-18 Thread sergio ruiz
I figured Gemstones would be SUPER heavy handed for this application, but I 
have a list of five projects, each increasing in complexity that I want to 
launch and document. So, sooner or later, I will need a more robust solution.

Thanks!



> On Jan 18, 2024, at 8:26 AM, Norbert Hartl  wrote:
> 
> GemStone is a huge thing to tame. I would not say the above and GemStone are 
> alternatives. GemStone is a lot to install and learn but you get something 
> that makes it hard to corrupt your data. So you have requirements that make 
> it fit into GemStone or you have requirements that make it a fit for STON. 
> Between both there is no overlap but rather a huge gap between the 
> applicability of each.


peace,
sergio
photographer, journalist, visionary

Public Key: 
https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
@sergio_101@mastodon.social
https://sergio101.com
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101



[Pharo-users] Re: Backing up data

2024-01-18 Thread sergio ruiz
Using this Will my links remain viable using this method?

Meaning that an event has a theater. That theater is also in the 
OrderedCollection of Theaters.

If the name of he theater changed in the Theaters collection, will that name 
change occur in the event theater object?

After bringing these collections back in via STON, will all of these 
relationships remain intact?



> On Jan 18, 2024, at 8:26 AM, Norbert Hartl  wrote:
> 
> If you have three classes with class side collections you can have a make 
> e.g. a dictionary and put the collections from the class side into it like 
> 
> model := {
>#theaters -> Theater instances.
>#movies -> Movie instances.
>#event -> Event instances.
> } asDictionary.
> 




peace,
sergio
photographer, journalist, visionary

Public Key: 
https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
@sergio_101@mastodon.social
https://sergio101.com
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101



[Pharo-users] Re: Backing up data

2024-01-18 Thread sergio ruiz
OOH..  I like this idea.

I’ll do a quick test on this and see if it works as expected..

For now, I want to store the data in the image.

The trick is, I like to start with a fresh image every few days. So, I’d like 
to open a new Pharo, pull the source code, then pull the data.

Thanks!


> 
> If you are keeping data in a Pharo image then you could just save the image 
> instead of using STON. Alternatively, you could model your data in an 
> Application class with three instance variables: theaters, movies, and 
> events. Then you could dump the root application object and STON should 
> preserve the relationships (I expect). I prefer this model since it allows me 
> to create a test object that encapsulates all the data in one place (even if 
> it is referenced from a class variable).


peace,
sergio
photographer, journalist, visionary

Public Key: 
https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
@sergio_101@mastodon.social
https://sergio101.com
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101



[Pharo-users] Re: Backing up data

2024-01-18 Thread Norbert Hartl
I think it depends how many objects you have and what your consistency 
requirements are.

> Am 18.01.2024 um 05:48 schrieb sergio ruiz :
> 
> I have been in the relational database world for decades. One of the things 
> that is super simple is backing up and restoring data.
> 
> Sometimes, it makes it makes sense to pull the production data into 
> development. In the case of a catastrophe, it’s super simple to restore data 
> from a backup.
> 
> I am thinking of backup strategies for my data once again, and am wondering 
> if things have changed since I was last using smalltalk.
> 
> I am thinking of the following:
> 
> STON
> I could dump all of my data into STON, but there is one slight twist. In this 
> project, it’s just making a list of movie listings. There are three basic 
> classes: Theater, Movie, Event. Each of these classes stores an 
> OrderedCollection of items of that type on a class variable, as I’ll need to 
> access each on their own.. so, if an event has a theater, I’ll need to access 
> Theaters on their own, and Movies on their own.
> 
> So, I would have to rebuild the list of Theaters from the Theaters in each 
> event. Otherwise, I would lose the link between the Theaters on the Theater 
> class variable and the Theater in the Event instance.

> Am I thinking about this incorrectly?

If you have three classes with class side collections you can have a make e.g. 
a dictionary and put the collections from the class side into it like 

model := {
   #theaters -> Theater instances.
   #movies -> Movie instances.
   #event -> Event instances.
} asDictionary.

The model object you can use with STON or fuel to store it and on reading back 
you store each of the values back on the class side variable. Simple and nice. 
I would use STON for that because it is equivalent to fuel but fuel has 
migration problems. Or better you need to load all your data, update fuel to a 
newer version and write it again with the new fuel version. STON is more 
reliable in that regard. Both have the problem that when objects change during 
serialization you might corrupt the structure of your data,

> 
> Gemstones
> I am totally into the idea of using gemstones. Is there a backup and restore 
> for objects here? do the relationships remain?
> 
GemStone is a huge thing to tame. I would not say the above and GemStone are 
alternatives. GemStone is a lot to install and learn but you get something that 
makes it hard to corrupt your data. So you have requirements that make it fit 
into GemStone or you have requirements that make it a fit for STON. Between 
both there is no overlap but rather a huge gap between the applicability of 
each.

> Voyage
> This seems like a good solution, but I would rather stay in the smalltalk 
> object store.
> 
Absolutely. Voyage is good for some use cases but you have to deal with mongoDB 
(not sure the small libraries work right now)

You could also consider using soil (https://github.com/ApptiveGrid/Soil) 
I might be a bit biased here :) but for most use cases this is the best of all 
the worlds described aboved. Even if there it has no release yet (coming soon) 
it is quite stable.

Hope this helps,

Norbert

> Ideas?
> 
> Thanks!
> 
> 
> peace,
> sergio
> photographer, journalist, visionary
> 
> Public Key: 
> https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> @sergio_101@mastodon.social
> https://sergio101.com
> http://www.codeandmusic.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
> 



[Pharo-users] Re: FUEL version migration

2024-01-18 Thread Davide Varvello via Pharo-users
 Solved!
See the solution for FUEL migration issues here: 
https://github.com/theseion/Fuel/issues/289#issuecomment-1896454432
CheersDavide



On Monday, January 15, 2024 at 07:48:47 PM GMT+1, Davide Varvello via 
Pharo-users  wrote:  
 
 Hi Guys,How can I migrate from Fuel version 3.0.2 to the latest one?
This: https://theseion.github.io/Fuel/format-migration/  seems osbolete
TIA
Davide

  

[Pharo-users] Re: Backing up data

2024-01-18 Thread Davide Varvello via Pharo-users
 +1 for Fuel, see here https://github.com/theseion/Fuel
CheersDavide



On Thursday, January 18, 2024 at 09:37:21 AM GMT+1, Todd Blanchard via 
Pharo-users  wrote:  
 
 You want to look at Fuel, a serialization library.

Sent from my iPhone

On Jan 17, 2024, at 9:49 PM, sergio ruiz  wrote:




I have been in the relational database world for decades. One of the things 
that is super simple is backing up and restoring data.
Sometimes, it makes it makes sense to pull the production data into 
development. In the case of a catastrophe, it’s super simple to restore data 
from a backup.
I am thinking of backup strategies for my data once again, and am wondering if 
things have changed since I was last using smalltalk.
I am thinking of the following:
STONI could dump all of my data into STON, but there is one slight twist. In 
this project, it’s just making a list of movie listings. There are three basic 
classes: Theater, Movie, Event. Each of these classes stores an 
OrderedCollection of items of that type on a class variable, as I’ll need to 
access each on their own.. so, if an event has a theater, I’ll need to access 
Theaters on their own, and Movies on their own.
So, I would have to rebuild the list of Theaters from the Theaters in each 
event. Otherwise, I would lose the link between the Theaters on the Theater 
class variable and the Theater in the Event instance.
Am I thinking about this incorrectly?
GemstonesI am totally into the idea of using gemstones. Is there a backup and 
restore for objects here? do the relationships remain?
VoyageThis seems like a good solution, but I would rather stay in the smalltalk 
object store.
Ideas?
Thanks!

peace,
sergio
photographer, journalist, visionary

Public Key: 
https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
#BitMessage 
BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV@sergio_101@mastodon.socialhttps://sergio101.com
http://www.codeandmusic.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
  

[Pharo-users] Re: Backing up data

2024-01-18 Thread Todd Blanchard via Pharo-users
You want to look at Fuel, a serialization library.

Sent from my iPhone

> On Jan 17, 2024, at 9:49 PM, sergio ruiz  wrote:
> 
> I have been in the relational database world for decades. One of the things 
> that is super simple is backing up and restoring data.
> 
> Sometimes, it makes it makes sense to pull the production data into 
> development. In the case of a catastrophe, it’s super simple to restore data 
> from a backup.
> 
> I am thinking of backup strategies for my data once again, and am wondering 
> if things have changed since I was last using smalltalk.
> 
> I am thinking of the following:
> 
> STON
> I could dump all of my data into STON, but there is one slight twist. In this 
> project, it’s just making a list of movie listings. There are three basic 
> classes: Theater, Movie, Event. Each of these classes stores an 
> OrderedCollection of items of that type on a class variable, as I’ll need to 
> access each on their own.. so, if an event has a theater, I’ll need to access 
> Theaters on their own, and Movies on their own.
> 
> So, I would have to rebuild the list of Theaters from the Theaters in each 
> event. Otherwise, I would lose the link between the Theaters on the Theater 
> class variable and the Theater in the Event instance.
> 
> Am I thinking about this incorrectly?
> 
> Gemstones
> I am totally into the idea of using gemstones. Is there a backup and restore 
> for objects here? do the relationships remain?
> 
> Voyage
> This seems like a good solution, but I would rather stay in the smalltalk 
> object store.
> 
> Ideas?
> 
> Thanks!
> 
> 
> peace,
> sergio
> photographer, journalist, visionary
> 
> Public Key: 
> https://pgp.key-server.io/pks/lookup?op=get&search=0x69B08F58923AB3A2
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> @sergio_101@mastodon.social
> https://sergio101.com
> http://www.codeandmusic.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
>