This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Strong Pointers
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Basic Smalltalk garbage collection goes something like this: There are a known set of ungarbage objects at any time. Anything they point at, and anything their pointee's point at, ad infinitum isn't garbage. Anything that can't be found in this stroll through the far reaching interests of the sacred ungarbage, is garbage. In the rough and ready life of the intrepid object, it's not "who you know," but rather "who knows you."
How might we use that perspective to keep the OpenRepository from turning into a mound of flotsam and jetsam? First of all, we need some sacred entities. I nominate us, the user community. As long as we strongly point to any package it should be kept. When our connection to any package becomes too weak, we get rid of it.
Actually, we shouldn't get rid of anything. Determining at weak and strong references from us as programmers to our plethora of packages is kind of a fuzzy prospect. Let's just create a big heap of "garbage" in a separate repository. That way if someone really decides they need some old garbage, they can go find it.
But how to determine whether the community's interest in a package is strong or weak? Some have played with using "publish activiy" as a threshold for weak/strong interest. This doesn't work very well though. What is really needed is a heuristic based on both upload AND download activity. A package may exist that has been happily static for years and has no changes to it. But if it's still being downloaded into new images then it's still a strong interest of the community.
So the basic idea is this, last publish OR load times are kept for all packages/bundles. Any package that ceases to be published or loaded for a set period of time (say 6 months) is automatically replicated to the "old space" and removed from the current Open Repository. If a package is published or loaded from the "old space" it is replicated/moved back to the "current" repository.