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
El mar, 06-10-2009 a las 22:02 +0200, Andy Kellens escribió:
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.
- 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).
- 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.
Absolutely works, and without a problem.
http://lists.gforge.inria.fr/pipermail/pharo-project/2009-October/014345.htm...
Many thanks.
Kind regards,
Andy
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
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@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.
- 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).
- 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@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Hi Andy, Sadly, *adding* objects to a MagmaCollection is quite slow, period.
But you should start by running the MagmaBenchmarker in Pharo, which will report your real performance benchmarks for this and other various operations. See the swiki for details about how to do this. You might be interested in comparing the benchmarks report with a 3.10 run to corroborate your claim..
Interpreting the Benchmark report ================
It is importatant to note, these benchmarks report the fastest a single client can go (NOT the fastest a single server can handle requests). On my 3-year old laptop, the time in which one-thousand simple objects can be read and materialized from the server is about one-tenth of one second.
Given this performance measurement, if 1000 objects is enough to populate most reasonable UI "screens", then up to 10 users of a single-server Magma system could expect sub-second response time all the time (one second if they all happened to request 1000 objects simultaneously).
However, the key to maintaining that rate, particularly as the scale increases (both in number of clients and size and depth of the repository) is to employ the performance tools provided by Magma to ensure that, indeed, only the 1000 *useful* objects that are needed are actually read. ReadStrategy's are a fine scalpel that allow the application to maintain the performance reported by the benchmarker.
Beyond that, read scale is increased by adding more servers, courtesy of the HA function.
Magma is written in 100% Smalltalk. Like a tank, it is not the fastest db, but with care it can massively scale while mostly maintaining its plodding pace.
- Chris
On Tue, Oct 6, 2009 at 3:02 PM, Andy Kellens akellens@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.
- 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).
- 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@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
magma@lists.squeakfoundation.org