Archive for January 2010
Multiple Repositories in MagLev
MagLev stores all of its state, including application classes and code, in a repository. By default, MagLev has one repository named “maglev”. But there are times you may want to have multiple repositories. If you have multiple applications, you may want to store each in its own repository. Or, you may want one repository per developer, or different repositories for development, test, staging and deployment. MagLev provides some management tools that allow you to create, destroy, start, stop and perform other tasks on repositories.
Persistence by Reachability
MagLev stores ruby objects in a persistent repository using “persistence by reachability”: given a well known, persistent object, the “root object”, all objects that are reachable from the root will also be persistent (saved in the repository). The most common form of reachability is for one object to refer to another in an instance variable. ObjectA is reachable from ObjectB if ObjectB has ObjectA as the value of one of its instance variables. There are a some other cases as well. An object’s class is reachable from the object (as are any mixed in modules). Constants of a persistent class or module are also reachable from that class or module.
GemStone internals videos
I’m working on a few new posts, but in the meantime, you may be interested in some videos James Foster (one of the GemStone Smalltalk engineers) has posted on the GemStone VM. MagLev is based on the same VM, so much of what James has to say is applicable to MagLev.
Here are the videos so far:
- What is GemStone?
- Object Representation
- Special Objects and Object Headers
- Large Objects
- Repository, Extents, Pages and the Object Table
- GemStone/S Components
- Shared Page Cache
- New Object
- Reading Existing Objects
- Modifying and Dereferencing an Object (new)
- Commit Records (new)
- Avoiding a Commit Record Backlog (new)
- Commit Processing (new)
- Concurrency (new)
- Lock Granularity (new)
- Reduced Conflict Classes (new)
- The Stone Process (new)
- Live and Dead Objects (new)
- Nine Steps in Repository-Wide Garbage Collection (new)
- And more to come…