[Cuis-dev] ODB options

H. Hirzel hannes.hirzel at gmail.com
Sat Dec 14 06:58:17 PST 2024


Hi Hilaire

I am also thinking about a persistence solution for Cuis. In 2025 I am 
planning to gradually move to Cuis and I need one.

At the moment I use

- external CSV files. This is good as a lot of information comes in 
tables. CSV is the de-facto standard for data. Input comes in this 
format. Noteworthy Excel/LibreOffice Calc and text processor tables. The 
LibreOffice database component can deal with them.

- I use the ReferenceStream to send a fat object (a tree of objects, top 
level is a dictionary) from Squeak to Cuis, see my mail 'Importing 
String objects from Squeak' at the beginning of this month. I am working 
on getting it to work also in the other direction.

- I also have large PNG image files (30MB * 200 .. 600) and a lot of 
smaller picture files (2MB each) to manage. I keep them out of the Cuis 
image in folders and have a small representation of them in the Cuis 
image. These smaller files are also in an external folder.

- You may have a look at the Squeak wiki page 'Databases and 
Persistence' https://wiki.squeak.org/squeak/512 for some ideas.

- Noteworthy there is the remark about image persistence[1]. Very doable 
if the content is not too large. I guess this is a solution good enough 
for the upcoming 3 .. 10 months of your Dynabook development but 
probably not for longer.

- You earlier expressed your interest in SQLite on this list. The most 
frequent deployed  database in the world. Also a de-facto standard. The 
two Cuis SQLite implementations are unfortunately currently broken. Not 
sure how much effort it takes to fix that. I would like to have this 
done but at the moment my time does not allow this. Maybe some time next 
February / March. Not all needs to go into one SQLite db file. For 
example one could be used for each document your dynabook user is 
annotating and the school, teacher and student information could go into 
another one.

- And one should not forget that the Cuis idea is not to do something 
others have done well (e.g git as version control system). A home grown 
persistence solution will absorb quite some energy and put a delay on 
working on what others can not do. Support of a ODB solution is an issue.

Could you please elaborate about your mixed experience with 
ReferenceStream? To know that would be helpful.

Regards

Hannes


[1]

*Squeak Image*
Squeak (as all Smalltalk implementations worthy of that name) implements 
persistency in a way which is (almost) unseen in any other computational 
environment. It does not need databases, XML or any similar superfluous 
stuff to be persistent. Just try:

Smalltalk snapshot: true andQuit: false.


You can also create a process which saves the image periodically instead 
of you.

[[true] whileTrue:
         [(Delay forSeconds: 1000) wait.
          Smalltalk snapshot: true andQuit: false ]]
                 forkAt: 49.


But keep in mind that this type of persistence is not ACID 
<http://en.wikipedia.org/wiki/ACID>. You may lose data. In cases where 
it is not acceptable to lose data, some of us think databases are not 
superfluous at all (Gerald Zincke 
<https://wiki.squeak.org/squeak/2578>). It also involves shutting down 
and restarting all those objects that involve external resources; see 
the various implementors of #shutDown etc.


On 14/12/2024 3:40 pm, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi !
>
> What are our options for ODB?
>
> Experimented with ReferenceStream, but I have a mixed experience so 
> far, hard to control what is and is not persisted.
>
> Thanks
>
> -- 
> http://mamot.fr/@drgeo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241214/3de1464c/attachment.htm>


More information about the Cuis-dev mailing list