thinking out loud
Monday, Dec 12. 2005 – Category: Musings, OpenSolaris
i’m off to sunny st. paul, MN in a few hours for the TOSTA conference. looking forward to it…
got into work early this morning to crank out some code before i go. i’m working on an interesting problem, mirrouring ON externally via a read-only Subversion gateway.
internally, we use TeamWare/SCCS for SCM (source code management). the long-term plan is to adopt a new SCM solution that will enable us to move the gate outside of Sun so that everyone can have equal access to it. this requires a long, complicated evaluation process to whittle down the candidates that probably involves pagan rituals, games of Twister, and undoubtedly much drinking.
in the meantime, i’m trying to setup a read-only Subversion gateway that will at least enable people to checkout code without having to download an 80 megabyte tarball each time.
enter sccs2svn, a handy open-source script written by Robert Zeh to faciliate SCCS->SVN conversion. very cool. very time-saving. it borked on ON due to the sheer size of some of our changesets, but a quick hack to break up large changesets into multiple smaller ones seems to have fixed that.
the wrinkle to our specific problem is “squelch”-ing. this is my script which goes through the history of ON and removes any comments/code-deltas pre-2000/06/14, and any code-deltas in between 2000/06/14->2005/06/14 (but leaving comments for that time-frame). this keeps the lawyers happy.
so there are two problems i’m facing:
- doing incremental squelching
- incremental SCCS->SVN conversion
while a full squelch-ing run is not long (takes about 40-45 minutes for ON), it’s still tedious and a waste of time/resources. unfortunately, once a file has been squelched – it is no longer “bringover-able”, meaning you can’t update it simply within the realm of SCCS updates. so i’ve been working on a Perl script triggered by a procmail recipe which monitors the onnv-gate-notification mails, and will parse the list of files updated/renamed/removed/created by a putback, copy over the new files, and re-squelch them incrementally. but then there is the matter of serialising these actions. i.e., let’s say the order happens in:
- person FOO puts back files A,B,C
- person BAR puts back files D,E,F
- person QWERTY does a putback removing file B
actions 1 & 2 can happen in parallel since they are independent of each other. but action 3 shouldn’t happen until action 1 occurs. but if all 3 happen quickly (within a minute of each other, let’s say), then procmail spins off 3 instances of Perl, one handling each event. while event 1 is happening, let’s say it’s processing/re-squelching file A, then event 3 also occurs removing file B from ON. event 1 then goes on to update and re-squelch file B, so file B is now back in ON.
bad. very bad. we need to serialise this shit.
so now i’ve got something mocked up which uses a client/server model & sockets. a Perl daemon stays running the whole time, and everytime procmail spawns the handler for the recipe, it calls a client which connects to the server and sends the request. the server can then evaluate whether the action can be allowed to happen in parallel, or if it must wait for a previous action to complete first.
does this seem reasonable? or is this overkill?
i can’t decide. i’m sure something cool can be done using simpler file locking primitives… but i was in the mood to cook me up some sockets. plus there’s something nice about the alliteration of using ‘sockets to solve the problem of serialising this shit’.
the incremental SCCS->SVN update step is the next one to tackle once i iron out the details of this serialisation problem. i haven’t thought much about it, but on the surface it seems easy right?
No Trackbacks to “thinking out loud”
5 Comments to “thinking out loud”
-
Aaron Says:
December 12th, 2005 at 10:58Hey, I would glance at git for SCM. It’s probably a hard sell, but it’s very fast and supports distributed development well.
-
Cyril Plisko Says:
December 14th, 2005 at 04:07Stephen, svn.genunix.org would love to provide necessary infrastructure for keeping the public repository. What do you think ?
-
Darren Moffat Says:
December 14th, 2005 at 12:22I don’t think keying off the mail messages is a great idea here because of the out of order (or worse never) delivery problems with SMTP base mail.
I suspect the best way to do this is to directly access the Teamware history file and respect its locking. That way you won’t have any synchronisation issues and you can deal with things like undo etc as well.
-
Stephen Lau Says:
December 15th, 2005 at 10:59sorry, should have made this more clear… yeah, keying off the gate notification message is just temporary. i wanted to concentrate on the harder problem of doing the actual code sync/SCM-conversion.
i talked to danek about this briefly, and he agreed that we can probably setup something that will trigger all my scripts upon putback (including undo).
-
Stephen Lau Says:
December 15th, 2005 at 11:04cyril – thanks for the offer.
i think we can convince our management to use Sun’s bandwidth to host it off of opensolaris.org, that way we can keep genunix’s bandwidth for better things.where is svn.genunix.org hosted? it might be interesting to setup another geographically-independent clone to distribute the load so people from non-US locales could pull from something closer.
hrmm… things to think about. maybe we should discuss this in opensolaris-discuss or website-discuss?
Leave a Reply
Recent posts
- Gesture Lock
(Saturday, Nov 13. 2010 – 12 Comments) - ConnectIn 1.1.1 & HTC Sense UI
(Tuesday, Sep 28. 2010 – 38 Comments) - ConnectIn
(Saturday, Sep 25. 2010 – 62 Comments) - Proguard, Android, Ant, and 3rd party external JARs
(Wednesday, Sep 22. 2010 – 18 Comments)
Categories
- Android
- Cars
- ChinaBlog
- Code
- Computers
- Development
- Food
- Football
- Grommit
- Linkage
- Movies&TV
- Music
- Musings
- OpenSolaris
- OpenSource
- Outdoors
- Pets
- Photos
- Quotage
- Rdio
- Songbird
- Sun
- Travel
Grommit
Mozilla
OpenSolaris
- alan burlison
- bonnie corwin
- eric boutilier
- glynn foster
- jim grisanzio
- mark nelson
- mike kupfer
- planet opensolaris
- stephen hahn
Songbird
Archives
- November 2010
- September 2010
- August 2010
- June 2010
- May 2010
- February 2010
- January 2010
- December 2009
- October 2009
- September 2009
- August 2009
- June 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003
- August 2003
- July 2003
- June 2003
- May 2003
- April 2003
- March 2003
- February 2003
- January 2003
- December 2002
- November 2002
- October 2002
- September 2002
- August 2002
- July 2002
- June 2002
- May 2002
- April 2002
- March 2002
