New Stone

27 views
Skip to first unread message

Steven R. Baker

unread,
Jan 9, 2013, 2:39:49 PM1/9/13
to maglev-d...@googlegroups.com
Hello,

We're in the process of moving a production app from Sinatra on REE to MagLev. I have some thoughts about how to set things up, and I'd like someone to tell me I'm completely crazy (or not). Please feel free to either answer, or link me to the appropriate documentation, or both.

I notice that things are running (see output below). One is type Stone and one type cache. I'm assuming those are internal implementation details, but I'm curious if I should care about that. I also notice that the Stone is running under name "maglev". I think I want to have my application storing it's data to a Stone under the name of the application. Perhaps <name>-<env> so that I can reasonably run my integration tests without frigging up my local environment.

Is this a good idea? Is it a bad idea? Why, or why not? How do I go about creating the new stones, setting them up, and wiping them when I'm finished?

Thanks!

-Steven

Stevens-MacBook-Air:sinatra-test-harness srbaker$ maglev status
MAGLEV_HOME = /Users/srbaker/Development/maglev
Status Version Owner Pid Port Started Type Name
------- --------- --------- ----- ----- ------------ ------ ----
OK 3.1.0.2 srbaker 1632 55096 Jan 04 10:06 Stone maglev
OK 3.1.0.2 srbaker 1633 55088 Jan 04 10:06 cache maglev~2e7f939efc5cfbd9

Tim Felgentreff

unread,
Jan 9, 2013, 3:10:07 PM1/9/13
to Steven R. Baker, maglev-d...@googlegroups.com
To have different stones is a good idea. I have stuff in my dotfiles to
quickly switch between stones with bash completion, I can send you the
functions. I'm running different stones all the time for demo apps and
development.

Here at HPI, students are working on a persistence abstraction and data
migrations for maglev at the moment, they will be interested to hear
how you fare, what problems you encounter etc. They're on this list, so
if you can report things, please feel free to do so, we're very
interested :) they are also looking into development tools and 1.9
support, and I'd be interested if you feel like you're missing
something (class browser? Database explorer?)

Best,
-Tim
From: Steven R. Baker
Sent: 09/01/2013 20:39
To: maglev-d...@googlegroups.com
Subject: [maglev-discussion] New Stone
--
You received this message because you are subscribed to the Google
Groups "MagLev Discussion" group.
To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to
maglev-discuss...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/maglev-discussion?hl=en.

Steven R. Baker

unread,
Jan 9, 2013, 3:17:05 PM1/9/13
to Tim Felgentreff, maglev-d...@googlegroups.com
> To have different stones is a good idea. I have stuff in my dotfiles to
> quickly switch between stones with bash completion, I can send you the
> functions. I'm running different stones all the time for demo apps and
> development.

Okay, how do I create new stones? And how do I tell (from ruby) which stone to use? I know how to do it via command line, but I want my Ruby app to choose at runtime.

> Here at HPI, students are working on a persistence abstraction and data
> migrations for maglev at the moment, they will be interested to hear
> how you fare, what problems you encounter etc. They're on this list, so
> if you can report things, please feel free to do so, we're very
> interested :) they are also looking into development tools and 1.9
> support, and I'd be interested if you feel like you're missing
> something (class browser? Database explorer?)

This is fantastic. I would love a Database explorer, I have been planning on writing one myself. I was also thinking about writing Ruby tools in Pharo, but it'll be a little while before I get that far along.

Thanks!

-Steven

Charles Monteiro

unread,
Jan 9, 2013, 3:39:38 PM1/9/13
to maglev-d...@googlegroups.com, Steven R. Baker

Easy way to migrate entire project to Maglev in one shot.
DO web tools work ?  If so example please , I was not able to readily get things going from what I found.
Does the Debugger work ? Example please.
I would like to run unit tests from within Maglev but with breakpoint support.
1.9 is a must
MagLev as a PaaS would be enabling. I'm sort of trying to get my head around using Mongo and how it NOT is an OODMBS but they are available via MongoLabs thru Heroku which basically allows me to pilot a project out in the wild for almost free which is not the case if I go the straight Amazon route.

Jesse Cooke

unread,
Jan 9, 2013, 3:49:15 PM1/9/13
to maglev-d...@googlegroups.com
On Wed, Jan 9, 2013 at 12:17 PM, Steven R. Baker <ste...@stevenrbaker.com> wrote:
> To have different stones is a good idea. I have stuff in my dotfiles to
> quickly switch between stones with bash completion, I can send you the
> functions. I'm running different stones all the time for demo apps and
> development.

Okay, how do I create new stones? And how do I tell (from ruby) which stone to use? I know how to do it via command line, but I want my Ruby app to choose at runtime.
I stumbled across something that might help a while back
All those rake tasks outlined by #s are stone specific, it just happens that the stone is named maglev.
So if you had a stone called "foobar" then rake will recognize tasks for that stone.
MagLev can't switch stones at runtime (maybe I'm wrong) as it would have to start the gem connected to the correct stone.

> Here at HPI, students are working on a persistence abstraction and data
> migrations for maglev at the moment, they will be interested to hear
> how you fare, what problems you encounter etc. They're on this list, so
> if you can report things, please feel free to do so, we're very
> interested :) they are also looking into development tools and 1.9
> support, and I'd be interested if you feel like you're missing
> something (class browser? Database explorer?)

This is fantastic. I would love a Database explorer, I have been planning on writing one myself. I was also thinking about writing Ruby tools in Pharo, but it'll be a little while before I get that far along.

Thanks!

-Steven

Steven R. Baker

unread,
Jan 9, 2013, 3:53:44 PM1/9/13
to maglev-d...@googlegroups.com
Ah. How do I create the new stone? And do I have to prep it with anything?

Also, this "manage MagLev with rake tasks" is not a sustainable situation. I noticed the "maglev" bin is deprecated: this is not going to be okay for managing deployments. I'll solve that problem when I get to it, though.

-Steven

Jesse Cooke

unread,
Jan 9, 2013, 3:59:59 PM1/9/13
to maglev-d...@googlegroups.com
On Wed, Jan 9, 2013 at 12:53 PM, Steven R. Baker <ste...@stevenrbaker.com> wrote:
Ah. How do I create the new stone? And do I have to prep it with anything?
rake stone:create[foobar]

Also, this "manage MagLev with rake tasks" is not a sustainable situation. I noticed the "maglev" bin is deprecated: this is not going to be okay for managing deployments. I'll solve that problem when I get to it, though.
Monty once told me the rationale for using rake tasks but I forgot. 

-Steven

On 2013-01-09, at 4:49 PM, Jesse Cooke <je...@jc00ke.com> wrote:

On Wed, Jan 9, 2013 at 12:17 PM, Steven R. Baker <ste...@stevenrbaker.com> wrote:
> To have different stones is a good idea. I have stuff in my dotfiles to
> quickly switch between stones with bash completion, I can send you the
> functions. I'm running different stones all the time for demo apps and
> development.

Okay, how do I create new stones? And how do I tell (from ruby) which stone to use? I know how to do it via command line, but I want my Ruby app to choose at runtime.
I stumbled across something that might help a while back



--------------------------------------------
Jesse Cooke :: N-tier Engineer
jc00ke.com / @jc00ke



--------------------------------------------
Jesse Cooke :: N-tier Engineer

Steven R. Baker

unread,
Jan 9, 2013, 4:02:15 PM1/9/13
to maglev-d...@googlegroups.com
On 2013-01-09, at 4:59 PM, Jesse Cooke <je...@jc00ke.com> wrote:

On Wed, Jan 9, 2013 at 12:53 PM, Steven R. Baker <ste...@stevenrbaker.com> wrote:
Ah. How do I create the new stone? And do I have to prep it with anything?
rake stone:create[foobar]

Yay! Thanks!


Also, this "manage MagLev with rake tasks" is not a sustainable situation. I noticed the "maglev" bin is deprecated: this is not going to be okay for managing deployments. I'll solve that problem when I get to it, though.
Monty once told me the rationale for using rake tasks but I forgot. 

I would like to hear it. It's really hard to manage from a systems administration perspective.

Dale Henrichs

unread,
Jan 9, 2013, 5:52:34 PM1/9/13
to maglev-d...@googlegroups.com, Tim Felgentreff
Steven,

I happen to be building a set of tools[1] in Pharo as a replacement for GemTools ... in theory this new set of tools should be fairly easy to extend with ruby specific features and/or different kinds of inspectors ... There are code browsers, debuggers, inspectors and an "object shell" .... Also the tool is being built for much better performance over the WAN ...

I gave a talk at Smalltalks 2012 where I showed off an early demo of topez[2]. I've take the "object shell" in some slightly different directions, but the demo should give you a flavor of what I'm looking at ...

Since the November talk I have embarked on a complete rewrite and right now i have implemented the debugger, inspector, "object shell" and gotten acceptable WAN performance ... I still need to re-implement the browsers and add some monticello/metacello tools before the tools are ready for other folks to play with ...

I've been doing initial development against 3.1.0.1 so the tools can be run against MagLev...

Dale

[1] https://github.com/dalehenrich/topez
[2] http://www.youtube.com/watch?v=pIp_Y46iB_I&list=PLCGAAdUizzH31VumrhrK2HHepHu3DBpY0&index=14

----- Original Message -----
| From: "Steven R. Baker" <ste...@stevenrbaker.com>
| To: "Tim Felgentreff" <timfelg...@gmail.com>
| Cc: maglev-d...@googlegroups.com
| Sent: Wednesday, January 9, 2013 12:17:05 PM
| Subject: Re: [maglev-discussion] New Stone
|
|
.....

charles....@gmail.com

unread,
Jan 9, 2013, 9:01:09 PM1/9/13
to maglev-d...@googlegroups.com, Tim Felgentreff
So what can your new tools do for ruby code in maglev  now ?

Are they  available for eval?

Sent from my Virgin Mobile Android-Powered Device

Tim Felgentreff

unread,
Jan 10, 2013, 9:08:59 AM1/10/13
to maglev-d...@googlegroups.com
Steven,
 
I'm using the bin/maglev script exclusively for bringing up stones. To create stones I use the rake task, but that happens comparatively less often. I use the --stone option to tell maglev-ruby which stone to run on, and set STONENAME so the maglev script and topaz work on the right thing.
 
From: Steven R. Baker
Sent: 09 January 2013 21:53
To: maglev-d...@googlegroups.com
Subject: Re: [maglev-discussion] New Stone
 
Ah. How do I create the new stone? And do I have to prep it with anything?

Also, this "manage MagLev with rake tasks" is not a sustainable situation. I noticed the "maglev" bin is deprecated: this is not going to be okay for managing deployments. I'll solve that problem when I get to it, though.

-Steven

On 2013-01-09, at 4:49 PM, Jesse Cooke <je...@jc00ke.com> wrote:

On Wed, Jan 9, 2013 at 12:17 PM, Steven R. Baker <ste...@stevenrbaker.com> wrote:
> To have different stones is a good idea. I have stuff in my dotfiles to
> quickly switch between stones with bash completion, I can send you the
> functions. I'm running different stones all the time for demo apps and
> development.

Okay, how do I create new stones? And how do I tell (from ruby) which stone to use? I know how to do it via command line, but I want my Ruby app to choose at runtime.
I stumbled across something that might help a while back
All those rake tasks outlined by #s are stone specific, it just happens that the stone is named maglev.
So if you had a stone called "foobar" then rake will recognize tasks for that stone.
MagLev can't switch stones at runtime (maybe I'm wrong) as it would have to start the gem connected to the correct stone.

> Here at HPI, students are working on a persistence abstraction and data
> migrations for maglev at the moment, they will be interested to hear
> how you fare, what problems you encounter etc. They're on this list, so
> if you can report things, please feel free to do so, we're very
> interested :) they are also looking into development tools and 1.9
> support, and I'd be interested if you feel like you're missing
> something (class browser? Database explorer?)

This is fantastic. I would love a Database explorer, I have been planning on writing one myself. I was also thinking about writing Ruby tools in Pharo, but it'll be a little while before I get that far along.

Thanks!

-Steven

--
You received this message because you are subscribed to the Google Groups "MagLev Discussion" group.
To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to maglev-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maglev-discussion?hl=en.


--
You received this message because you are subscribed to the Google Groups "MagLev Discussion" group.
To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to maglev-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maglev-discussion?hl=en.

Tim Felgentreff

unread,
Jan 10, 2013, 9:12:14 AM1/10/13
to maglev-d...@googlegroups.com
Charles,
 
I'll talk to the bachelor project students to write up a step-by-step converting a Rails project I se their MagLev persistence library as soon as they consider that ready for general testing.
 
I will create a screencast to upload besides the old one installing and using the current webtools.
 
Unit tests with breaking into topaz on assertion failures should already work if you pass -d to maglev (set MAGLEV_OPTS=-d).
 
 
From: Charles Monteiro <charles....@gmail.com>
Sent: 09 January 2013 21:39
To: maglev-d...@googlegroups.com
CC: Steven R. Baker
Subject: RE: [maglev-discussion] New Stone
 

Easy way to migrate entire project to Maglev in one shot.
DO web tools work ?  If so example please , I was not able to readily get things going from what I found.
Does the Debugger work ? Example please.
I would like to run unit tests from within Maglev but with breakpoint support.
1.9 is a must
MagLev as a PaaS would be enabling. I'm sort of trying to get my head around using Mongo and how it NOT is an OODMBS but they are available via MongoLabs thru Heroku which basically allows me to pilot a project out in the wild for almost free which is not the case if I go the straight Amazon route.

On Jan 9, 2013 3:10 PM, "Tim Felgentreff" <timfelg...@gmail.com> wrote:
To have different stones is a good idea. I have stuff in my dotfiles to
quickly switch between stones with bash completion, I can send you the
functions. I'm running different stones all the time for demo apps and
development.

Here at HPI, students are working on a persistence abstraction and data
migrations for maglev at the moment, they will be interested to hear
how you fare, what problems you encounter etc. They're on this list, so
if you can report things, please feel free to do so, we're very
interested :) they are also looking into development tools and 1.9
support, and I'd be interested if you feel like you're missing
something (class browser? Database explorer?)

Best,
-Tim
From: Steven R. Baker
--
You received this message because you are subscribed to the Google
Groups "MagLev Discussion" group.
To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to
maglev-discuss...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/maglev-discussion?hl=en.

--
You received this message because you are subscribed to the Google Groups "MagLev Discussion" group.
To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to maglev-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maglev-discussion?hl=en.

Charles Monteiro

unread,
Jan 10, 2013, 2:56:21 PM1/10/13
to maglev-d...@googlegroups.com
thanks, I personally don't need a Rails conversion though I can see how that would be good promo. A lightweight Sinatra app would do quite fine.

Not sure if this is the right thread but I think that if you all made a lot of Maglev accessible via a REST interface I can see how others would try to extend it from their favorite language i.e. as far as tool support. Provide the same access that the Pharo tools are provided but via  REST. For example of late I have been doing work with Adobe/Apache Flex which can generate some very nice looking and functional UIs and I would be tempted to play with something to that extent.

Secondly as it has become popular and dare I say almost expected many of the NoSql dbs out there provide a REST interface which allow CRUD ops on the db. If you all provided this at the very least some lightweight level i.e. dynamic defining of schema i.e. class structure , a query api, setting up of collection i.e. System roots etc essentially Mongo-ish but infinitely better because after all its Gemstone :)  I honestly think this would explode the usage of Maglev. Server side (stored procs :) ) behavior would be done the more traditional way i.e. by just extending what ever was there whether whether dynamically defined or not by persisting of behavior as is currently done in Maglev.

As I mentioned before the other hurdle to mass embracing of MagLev would be its lack of canned support as a PaaS by somebody such as MongoLabs does for MongoDB on Heroku. Again, I can prototype and even support a decent prod apps (100s) of users for very cheap. This allows entrepreneurs to grow something that they can later sell to VC or into some revenue making model.

-Charles
Charles A. Monteiro
www.monteirosfusion.com
sent from the road

Jesse Cooke

unread,
Jan 10, 2013, 11:06:51 PM1/10/13
to maglev-d...@googlegroups.com
On Wed, Jan 9, 2013 at 12:10 PM, Tim Felgentreff <timfelg...@gmail.com> wrote:
To have different stones is a good idea. I have stuff in my dotfiles to
quickly switch between stones with bash completion, I can send you the
functions. I'm running different stones all the time for demo apps and
development.

Here at HPI, students are working on a persistence abstraction and data
migrations for maglev at the moment,
Is this out on the Githubs? 

Nicco Kunzmann

unread,
Jan 11, 2013, 4:30:51 AM1/11/13
to maglev-d...@googlegroups.com
On 01/11/2013 05:06 AM, Jesse Cooke wrote:
On Wed, Jan 9, 2013 at 12:10 PM, Tim Felgentreff <timfelg...@gmail.com> wrote:
To have different stones is a good idea. I have stuff in my dotfiles to
quickly switch between stones with bash completion, I can send you the
functions. I'm running different stones all the time for demo apps and
development.

Here at HPI, students are working on a persistence abstraction and data
migrations for maglev at the moment,
Is this out on the Githubs?

Monty Williams

unread,
Jan 12, 2013, 4:54:35 PM1/12/13
to maglev-d...@googlegroups.com
> I noticed the "maglev" bin is deprecated

Not really. The docs say "may be deprecated in the future", but that's not going to happen. Using rake has a catch-22 problem in doing admin stuff. You can't use $MAGLEV_HOME/bin/rake unless MagLev is running, so you have to use rake from some other ruby to start MagLev or do a few other admin tasks. This frequently trips up RVM users.

I did a POC that demonstrated it's possible to do all the rake tasks in the $MAGLEV_HOME/bin/maglev shell script instead - http://github.com/MagLev/maglev/commits/monty/remove_rake_from_admin_commands
@mpapis ran some similar experiments. I had thought about getting completely rid of the 'admin'  rake scripts, but thought better of it when I realized replacing them and fully testing the replaced functionality was a huge task - and the workaround is just ensuring some other 'rake' is in your path before $MAGLEV_HOME/bin. Or always use "maglev start" instead of "rake maglev:start" in the simple case, and controlling which stone is used with environment variables in more complex setups.

The reason the rake scripts came to be used was the need to manage multiple stones, which is especially handy during development. Otto Behrens already had rake scripts he used to create and manage multiple GemStone Smalltalk databases in production he was willing to contribute. See rakelib/contrib/ottobehrens/
They even have tests (some of which I believe now have false-positive failures :-( 

-- Monty

Dale Henrichs

unread,
Jan 14, 2013, 1:15:00 PM1/14/13
to maglev-d...@googlegroups.com
Charles,

The work I am doing with topez/tode[1] is in support of externally callable tool apis ... I've "deconstructed" the classic smalltalk tools getting rid of the monolithic system browser and debugger with an aim towards making it easier for developers (not tools guys) to mold the tools to fit their needs ... It's easy to get at the component parts of the tools ... The tools are being built from the ground up to support remote development over a WAN, so the roundtrips are being kept to an absolute minimum ... STON (Smalltalk Object Notation[2] modeled on JSON) is being used to serialize objects over the wire (for GCI calls), but should be easy to adapted for HTTP ... I've also created an "object shell" that is object-based instead of file-based ... every node is an object, but you use the standard shell "file path" to access the object nodes ... the standard complement of shell commands is provided but instead of stdin and stdout there is objIn and objout:0

Dale

[1] https://github.com/dalehenrich/topez
[2] https://github.com/svenvc/ston

----- Original Message -----
| From: "Charles Monteiro" <charles....@gmail.com>
| To: maglev-d...@googlegroups.com
| Sent: Thursday, January 10, 2013 11:56:21 AM
| Subject: Re: [maglev-discussion] New Stone
|
| --
| Charles A. Monteiro
| www.monteirosfusion.com
| sent from the road
|
Reply all
Reply to author
Forward
0 new messages