Pharo and Magma

Ramiro Diaz Trepat ramiro at diaztrepat.name
Tue Oct 6 20:31:30 UTC 2009


Magma is working fine in Pharo for me, in client server mode too.

*Resolving for localhost*
I guess the first problem you mention has to do with NetNameResolver not
resolving correctly for 'localhost'.  This has nothing to do with Magma, if
you are running on the same machine and want to connect to localhost just
try replacing your localhost connections to '127.0.0.1' and it will work.

*Performance*
Magma's performance is also better than what you mention.  I usually
retrieve instances or small collections from the server image in an average
100ms.
I would also suggest not using MagmaCollections at first or unless you are
certain that you will hold large amounts of data in table like format.  If
your object model is well designed this should happen rarely.  If you come
from a relational database world, It is not easy at first to think only
about objects, but if possible you should just navigate the objects of your
model which most times should not be very large.
Indeed, if you are sure that there is no better model than holding large
collection of "records" in the problem you are trying to resolve, then may
be you should think about using a RDBMS with OR mapper like Glorp.
Relational databases are far better than object oriented databases for that
kind of problem.

Hope that helps

r

On Tue, Oct 6, 2009 at 9:02 PM, Andy Kellens <akellens at vub.ac.be> wrote:

> Hello,
>
> To start, I must say that I am new to this mailing list, that I started
> using Magma about a month ago and that I definitely am impressed by it's
> features and easy-of-use.
> For a project that we recently started (a Seaside app), we are thinking of
> using Magma as the database backend.
> While I skimmed through the archives of this list and realize that there
> already was quite some discussion about the relation of Magma and Pharo, I
> am a bit confused about the current status of running Magma on Pharo.
> For instance, the wiki (http://wiki.squeak.org/squeak/2665) mentions that
> Pharo is supported, however I keep running into a number of problems.
>
> 1. One of my first attempts in using Magma involved loading r42final and
> trying out a client/server setup.
> While I had no problems starting the server in one Pharo image, it is
> impossible to connect to the repository using the client.
> I always get an error stating the Socket supposedly timed-out and no
> connection could be made (although it took no where near the 30 second time
> out to give me the error).
> (I verified that my code was correct by also trying it out in a Squeak 3.10
> image, which worked like a charm).
>
> 2. My second attempt involved running the database in a local image.
> I must say that this solution works very well, however I have a feeling
> that the system works incredibly slow.
> To test the system, I created a database containing approximately 30
> objects stored in 1 Dictionary and 4 MagmaCollections (for which I defined
> an Index).
> While I read somewhere that creating a database session can be quite slow
> (this is not a problem for our application), I was a bit surprised to see
> that adding single objects to the database is also very slow (I tried to
> profile my code and addition of objects took between 800 and 1200 ms).
>
> My first thought was that these problems are due to the differences between
> Pharo and Squeak, but reading the archives gave me the impression that there
> are people out there who got Magma to run successfully on Pharo and I was
> hoping that they might share their experiences or confirm that they
> encountered similar problems.
>
> For completeness: I have tried out the latest 4 releases of Pharo together
> with Magma (all the releases from September and the first one of October) on
> the Squeak 4.2.1 and 4.2.2 VM for Mac OS X.
>
>
> Many thanks.
>
> Kind regards,
>
> Andy
>
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/magma/attachments/20091006/ddf5f9ea/attachment.htm


More information about the Magma mailing list