Re: Hosting website with MagmaDB on Seasidehosting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Hosting website with MagmaDB on Seasidehosting

Damion Mitchell
I am a newbie to Magma, and I am working on a project and I was wondering if there is an easy way to configure my system to have Magma work on seasidehosting. Now it is presently working on my local machine
connect
session := (MagmaSession openLocal: 'PackageDB') newSession; connectAs: 'admin'.

I would appreciate if some assistance could be given in this regard.

Now I have implemented somewhat of a Singleton pattern, where I am allowing one DBase Connection per user session. Now I am having two issues. 
1. How can I explicitly save the changes made to actual MagmaDB. As I can store data, to the object while in memory, but if I close the image all those changes are lost. So how can I ensure that it is also stored in the localfile.

2. I have an #unregistered method, however sometimes it works fine and another time is complains that is doesNotUnderstand disconnect. Any hint or solution as to why this might be happening
initialize 
super initialize.
self database: PTDatabase new. 

unregistered
  self database session disconnect.
  super unregistered.

Thanks in advance.

--
Damion Mitchell


_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: Hosting website with MagmaDB on Seasidehosting

Chris Muller-3
Hi,

On Wed, May 5, 2010 at 7:25 PM, Damion Mitchell <[hidden email]> wrote:
> I am a newbie to Magma, and I am working on a project and I was wondering if
> there is an easy way to configure my system to have Magma work on
> seasidehosting. Now it is presently working on my local machine
> connect
> session := (MagmaSession openLocal: 'PackageDB') newSession; connectAs:
> 'admin'.

You can connect to a Magma using a "local" connection as you have
already, or via a server listening on a port.  See the wiki
documentation for an explaination of this.

> I would appreciate if some assistance could be given in this regard.
> Now I have implemented somewhat of a Singleton pattern, where I am allowing
> one DBase Connection per user session.

I presume, by this, you mean, one MagmaSession for each Seaside
session.  Really, it is much easier to help if you will employ
language consistent with Magma.  "one DBase Connection per user
session" requires quite a bit of effort for me to try to "guess" what
you mean, since there is no "DBase" anywhere, and "user session" is
ambiguous..

> Now I am having two issues.
> 1. How can I explicitly save the changes made to actual MagmaDB. As I can
> store data, to the object while in memory, but if I close the image all
> those changes are lost. So how can I ensure that it is also stored in the
> localfile.

By "close the image" I presume you mean, exiting the image without
saving?  The image is the object memory, so if you save and exit the
image, all object state are saved in the image file.

If you want to commit the object state to the Magma repository, send
#commit to your MagmaSession.

> 2. I have an #unregistered method, however sometimes it works fine and
> another time is complains that is doesNotUnderstand disconnect. Any hint or
> solution as to why this might be happening
> initialize
> super initialize.
> self database: PTDatabase new.
> unregistered
>   self database session disconnect.
>   super unregistered.

No idea.  It sounds like probably your "database" doesn't have a
#session, and therefore your applicatoin is trying to send #disconnect
to the nil (an UndefinedObject).

 - Chris
_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: Hosting website with MagmaDB on Seasidehosting

Mariano Martinez Peck
Hi. The problem with Seasidehosting is that (I think) you have a limit of 250 MB of the HD.

Maybe a little trick is to register an account where you upload the image of a magma server. There you will have 250 MB free for that. Then you register another APP with seaside and the magma client.

I have no idea if 250 MB for Magma is ok or not neither your needs or your app's needs.

Netstyle offers solutions with much more space, but of course, you will have to pay.

Cheers

Mariano

On Thu, May 6, 2010 at 4:56 AM, Chris Muller <[hidden email]> wrote:
Hi,

On Wed, May 5, 2010 at 7:25 PM, Damion Mitchell <[hidden email]> wrote:
> I am a newbie to Magma, and I am working on a project and I was wondering if
> there is an easy way to configure my system to have Magma work on
> seasidehosting. Now it is presently working on my local machine
> connect
> session := (MagmaSession openLocal: 'PackageDB') newSession; connectAs:
> 'admin'.

You can connect to a Magma using a "local" connection as you have
already, or via a server listening on a port.  See the wiki
documentation for an explaination of this.

> I would appreciate if some assistance could be given in this regard.
> Now I have implemented somewhat of a Singleton pattern, where I am allowing
> one DBase Connection per user session.

I presume, by this, you mean, one MagmaSession for each Seaside
session.  Really, it is much easier to help if you will employ
language consistent with Magma.  "one DBase Connection per user
session" requires quite a bit of effort for me to try to "guess" what
you mean, since there is no "DBase" anywhere, and "user session" is
ambiguous..

> Now I am having two issues.
> 1. How can I explicitly save the changes made to actual MagmaDB. As I can
> store data, to the object while in memory, but if I close the image all
> those changes are lost. So how can I ensure that it is also stored in the
> localfile.

By "close the image" I presume you mean, exiting the image without
saving?  The image is the object memory, so if you save and exit the
image, all object state are saved in the image file.

If you want to commit the object state to the Magma repository, send
#commit to your MagmaSession.

> 2. I have an #unregistered method, however sometimes it works fine and
> another time is complains that is doesNotUnderstand disconnect. Any hint or
> solution as to why this might be happening
> initialize
> super initialize.
> self database: PTDatabase new.
> unregistered
>   self database session disconnect.
>   super unregistered.

No idea.  It sounds like probably your "database" doesn't have a
#session, and therefore your applicatoin is trying to send #disconnect
to the nil (an UndefinedObject).

 - Chris
_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma


_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma