Magma notes
Avi Bryant
avi at beta4.com
Fri Jul 9 19:23:21 UTC 2004
Chris,
You asked for feedback, and as you know it's been a while since I've
tried Magma. Below is part 1 of my notes from installing and using
the most recent version of Magma this morning. They are literally just
a log of what I am doing and what successes and failures I come across,
so they will probably be boring for the casual reader, but I hope they
provide you with some useful info.
Started by installing the Magma server package into a fresh 3.7b-5969
image, and then saving two copies: magmaserver.image and
magmaclient.image. Both are running on Squeak 3.7.1beta2 Carbon VMs on
Mac OS X 10.3.
Following the instructions at http://minnow.cc.gatech.edu/squeak/2689,
I executed the following code in a workspace:
MagmaRepositoryController
create: 'magma/myrepos.magma'
root: Dictionary new
No errors.
I then tried this:
MagmaServerConsole new
open: 'magma/myrepos.magma'
processOn: 51969
And got the error "magma/myrepos.magma" not found.
Ok, so creating the repository didn't work. Maybe I need to create the
'magma' directory myself first? If so, I would have expected the error
to occur when trying to create the repository, not while trying to
open it, but let's try that.
Saba:~ avi$ cd Documents/Squeak
Saba:~/Documents/Squeak avi$ mkdir magma
Now trying this code snippet again:
MagmaRepositoryController
create: 'magma/myrepos.magma'
root: Dictionary new
And I get the following error:
MessageNotUnderstood: UndefinedObject>>binary
This is inside MaObjectFiler>>createDataFile.
Ok, maybe I screwed things up the first time. Looking around for a way
to reset the state, I find MagmaRepositoryController class>>initialize,
and try it. Nope, doesn't fix it. Ok, I'll trash this image and start
again.
From a fresh image, the same problem. Maybe if I create the file first?
Saba:~/Documents/Squeak avi$ touch magma/myrepos.magma
No dice.
Just as a sanity check, I try "FileStream fileNamed:
'magma/myrepos.magma'" and get back a working filestream. Poke around
in the code...
<several minutes later>
The issue seems to be a strange interaction between MaFilename and the
Carbon VM. Although FileStream knows how to expand
'magma/myrepos.magma' into a suitable absolute path for Carbon,
MaFilename doesn't (it tries to expand it into a unix filename
instead). If I use FileStream to give me back the absolute path, and
then feed that to Magma, things work. Ok, we now have a server up and
running. Good.
I'll send this before I continue, and just make the point (I hope,
constructively) that this is part of what I mean by "too much code":
Magma uses its own Filename class instead of FileStream. Now,
FileStream has its issues, and I can perfectly understand the
temptation to do that. However, FileStream is known to work, on all
platforms, on all VMs - because if it didn't, people would complain
very quickly. Because Magma rolls its own filename handling, it
doesn't get to benefit from this, and in fact, MaFilename is broken on
the platform I happen to be on. Incidentally, this is one of the
problems I ran into when trying out an early version of Magma (that
time, on Linux, I believe), and it's interesting to see that it's still
there.
At any rate. The server is up, on to the more interesting stuff...
More information about the Squeak-dev
mailing list
|