Monday, June 29, 2009

notes: svnserver on os x

I suddenly had an unplanned gap in my summer dad duties so I turned to my long list of neglected nerding.

I have been able to cajole my random-number-of-charges to help with installing Ubuntu on a stack of old machines prior to donation (5 so far!), taught some of them how to solder, and exterminated a horde of vermin from the call center, but no real traction. That will wait for summer camps to start!

After the last Stanford project I promised myself I would jump ahead from the 2.4 era of Sakai Stanford has been using. I took a peek at the K2 stuff - The white paper was sensible, Zach's notes useful... so I finally picked up Maven 2 and git. Too bad today was the same day the Sakai confluence was down for a brain trainsfer. I commenced to downloading the current binaries.

Onward!

One goal floating around is to upgrade the kitchen Mac Mini to an Intel based Mini. The current Mini becomes a server in the call center. I wanted to run a CZWXLLC svn server outside of the graces of Stanford, and so went through the steps to get a svn server on the G4 mini. I did the simplest possible thing I could do. That is to get the server deployed running via the svn:// protocol and constantly accessible from within the imperial home network.

It wasn't that bad. Here is a rough outline:
  1. install the SVN package somewhere sensible. I used /usr/local/bin. that may not be sensible to you, but it was sensible to me.
  2. figure out which user is the 'login' user, if you have one. The Kitchen computer happens to have one - we want Skype up when Mitchell is on the road, so it's always ready to go.
  3. use svnadmin to create a repo directory somewhere where the login user has rights. I just used the user's home directory.
  4. update the user configuration files with your various users and assign passwords
  5. start svnserve
Now, this last bit is a bit trickier. You probably know about svnserve -d -r /path to repo and all that stuff. Firing up your svn server that way, as the login user, gets everything hopping along. Until restart.

To get your svn server to start up after a restart is the real goal. To do that you're going to have to use the Mac OS launchctl tool.

launchctl is used to configure the launchd daemon. The idea is that you want the box to boot, scoot through a set of 'scripts' and fire up basic services. init.d stuff like stuff.

The 'scripts' are XML configuration files. They are stored in /Library/LaunchDaemons, and by convention are '.plist' files. These contain a namespace registration mechanism and a way of passing in command line arguments. Take a look at the files on your own machine - it's pretty straight forward, yet as with most of these abstractions rather opaque - what the heck are the options? the options for svnserve itself are fine, but what about the OS?

For svnserver I used one found here. Be sure to change the path to the repo, the user and the user's group as necessary for your machine.

More sophisticated schemes would have non-login users, separate groups, etc., etc., but I didn't think that was necessary for getting off the ground.

As this repo is behind the CZWX firewall this is as far as I've gotten. If I put it into the DMZ when I drop it into the call center I'll have to upgrade the connections to SSL and all that jazz.

Onward! Next steps are to get the most recent Sakai checked out as well as the K2 stuff and see about getting some edgeless administration stuff going on these phones.

Saturday, June 13, 2009

Just a note:

I've succeeded, after a Firefox upgrade, in slipping a Google Wave into the Blogger template.

http://caseydexperiment.blogspot.com/2009_06_01_archive.html

the Wave embedding example worked fine.

Should work anywhere ;)

Thursday, June 11, 2009

Desktop integration with Sakai

There has been a good stream of articles describing Sakai's web services lately. If you're doing work with Sakai you can quickly come up to speed with this very useful functionality.

I'ld like to give an example.

Over the past Stanford academic year I built a desktop Java application designed to provide high-stakes language skills testing. The desktop application is tightly integrated with the Stanford University deployment of Sakai, Coursework.

The test is called the "Simulated Oral Proficiency Interview" (SOPI) and is administered by the Stanford Language Center. This rSmart newsletter has background information on SOPI.

I'll cut to the chase.

The SOPI test is administered under highly controlled conditions. The student only gets once chance, ever, to take the assessment. The assessment materials are so tightly controlled access is denied to the instructional staff. There is all sorts of complex authorization requirements for this project.

Sorta tricky to have a Sakai site where the instructor can't get at the materials, eh?

The assessment takes the form of a series of Quicktime movies. Each movie presents a question to the user. The user's response is recorded in a Quicktime movie, which is stored away for review by the instructional staff. The sequencing of the assessment is structured through an awkward XML file. To hit the schedule for the 2009 SOPI assessment we decided to leave the XML format as it was - there is lots of room for improvement.

The SOPI Application is written in Java, using the Swing Application Framework (JSR-296), Axis, and Apple's Quicktime for Java. A desktop app was written to avoid all the Java / Quicktime / Sandbox / multi-Browser issues, and to push security up several notches. It does all the things you expect - pretty boxes with movies, live audio waveforms, etc. I've a writeup in the works over at www.czwxllc.com, my companies site, and I'll put up one of the screen play movies used during development so you can see it.

To support the (baroque) security requirements the SOPI assessment resources are not stored in the Language Classes' Sakai site. Rather a 'sister' site is created. We called these Sopi Resource sites officially, but most often just 'sister-sites.' This is a custom Sakai site type with a new role, the standard Resources tool, and a real-time monitoring tool created by Zach Thomas of Aeroplane Software. Sakai site properties are created which provide references to class site sections - a single SOPI Resource site can provide content to rosters from various class-site sections.

The test is given in a controlled lab. 20 to 40 students may be starting the test simultaneously.

Stanford is running a modified Sakai 2.4.x

The SOPI Application uses Sakai webservices to
  • support 2 user sessions, a super-empowered 'agent' and the end user
  • determine which SOPI assessments are currently enabled
  • to get user site membership information
  • to get user Stanford affiliation information, which changes the desktop app's UI
  • to store user progress, including resume state
The SOPI App uses Sakai REST tools to support
  • pulling of XML and Quicktime movie content from the Resouces tool
  • pushing Quicktime movie content into the Resources tool
The App pulls down the XML, validates, and then pulls down all the Quicktime movies. At that point a second validation is performed to see if the movies are in a valid QT format.

As the user proceeds through the assessment the responses are queued up and asynchronously uploaded to Sakai as the assessment plows along. The load-balanced pool of Sakai servers does pretty darn well in accepting 30 odd movies all at once.

The major changes to Sakai to support the SOPI assessment were
  • modifying the Resources 'webservlet' tool to not swallow all sorts of sensible exceptions, such as quota violations. These are now reported back as HTTP RFC responses to which the App responds.
  • using a locally developed version of Sakai login which has far less overhead. We wrote this code during our first rollout of Sakai at Stanford long ago.
which aren't really all that major, are they ;)

I found this model of Sakai development, that of using REST and Axis, to be really fun and efficient. The more recent versions of Sakai would of made this even easier. I look forward to catching my dev environments up to the most recent Sakai and seeing what drops out of the SOPI codebase - less code, less to break.

My next experiment is to create a language assessment app which uses a cell phone. How could this not be cool?

Onward!

Saturday, June 6, 2009

Wave II.5

I find it funny that the google email with my wave ID was stuffed into my gmail spam folder.

I'm caseyd@wavesandbox.com

There is a sandbox upgrade today, so I'll not be hanging around in the wave client too long.

later: commencing to tinker. note to self: tinker on a fast machine.

Friday, June 5, 2009

7 years of Mozilla!

Today is the 7th anniversary of Mozilla.

Getting Mozilla rolling was a very iffy proposition.

And it's taken a lot of work - I doubt people realize how much has gone into simply surviving let alone prospering.

Just look at the mad stuff emerging from the Labs.

Not to mention the standard "We'll make you incredibly rich, just sign here..." opportunities walked away from.

Congratulations Mozilla!

Thursday, June 4, 2009

LincVolt - Neil Young's Java Land Yacht



This beheamouth is Java controlled.

JavaOne day Two

Moscone is getting a funky air. That of thousands and thousands of java programmers shuffling around in the morelockian tunnels. The suits are up in the hotel suits cutting deals. we hope.

onward!

  • Extream GWT by David Geary. You know, he wrote the book.
    His website, coolandusefulgwt.com, has tons of examples.
    He dashed through a set of examples with a wry style. One of his examples is of a drag and drop framework in about 350 lines of code. Another example was rather bread-and-butter; jdbc and rpc stuff, but for some reason the example db was populated with the very small towns surrounding the absence-of-town where I grew up. That was just odd. I mean, Castile NY?
    This presentation was quite professional. It had the desired effect of lowering the percieved barrier and inspiring to action.

  • JavaFX in Action by Mike the Canoo guy. yes I did change my schedule around.
    This entertaining chat was peppered with usage insights and mild grumbles about the rapid changes JavaFX went through just before JavaOne.
    (His complaint was echoed in just about all the other JavaFX talks I've seen - Sun broke the demo code of their presenters just a day or two before JavaOne. "Fail Fast!")
    JavaFX started off in Sun Labs as a language called 3F - Form Follows Function. Apparently after a few internal demos it recieved Uplift to JavaFX.
    Mike gave an hands on live demo of the Photoshop to JavaFX asset export. As he did so he gave out some practical hints, such as "Do NOT rename any layers after this first round trip - the IDs are a contract between your designers and your developers." He had plenty of time to comment as he clearly was not a Photoshop user... pleasant self-deprecating jokes through out.
    This export and prototype in JavaFX model has legs. I guess the Adobe Flex world has this kind of flow just built in, hmm?
    Mike mentions that JavaFX has damn few widgets, and only a few 'multimedia' widgets. That there will be a lot of hand noodling to extend these.
    On the other hand there is data binding - this alone is a big lure for his team.
    He gave a good explanation of remote calls and the impact on the event dispatch thread (EDT), leading to a talk on the JavaFX equiv of invokeLater.
    A good talk. The Canoo team seems like a fun group.


  • Groovy 1.6 by Mister Groovy Himself
    I dragged Xinlei to this - I think she would find Groovy to her liking and that it can have a place in the Stanford Digital Repositories back end pipeline (s).
    Mister Groovy gave a great intro by deconstructing a Java beans app down to a groovy script, element by element. Xinlei's ribs were sore by the end as I kept poking her with my elbow - 'see... see...' poor woman.

  • JFugue and Log4JFugue
    A bit of fun.
    These guys wrapped the java MIDI implementation with an easier to use layer. This allows statements such as player.play("C A C") to play those notes. If you've ever done any MIDI programming outside of Max or PD - say in a line based language, you know it's a giant mess to set up.
    JFugue melts that away. And it is a bit idiosyncratic.
    MIDI gets a bad rap by casual users. If you want to see what MIDI can really do you have to start by upgrading your OS's MIDI services with better samples or whatnot. This talk presented a sensible series upgrades.
    Now Log4JFugue. ha. How about feeding your log files into something which makes music based on the log content? Your ears ( sadly not mine so much any more ) are great at distinguishing fine details in complexity. you can background your log reviews!
    The Log4Jfugue people gave a fun demo where application-level service requests and releases were mapped to bass drum and snare, and service interruptions to cymbal crashes. They did some basic time mapping and let it rip. "Service Normal" running is heard as a steady-ish beat with some swing. However once the service starts backing up it's immediately clear that something is up.
    Then they used Log4J's port sending ability to stream the log data to another computer for audio presentation in real time.
    Nice.
    Julian at Stanford could stream this to his iPhone and just listen in the background for Sakai problems...

  • JavaFX + Groovy == Beauty
    Excellent live demos of polyglot programming by another member of the Canoo team. I apologize for being impressed and tired during this talk. My notes are rather scattery: "Cool" "How is he going to tie that into swing?" etc. sigh.
    When the presentation is available online I'll cast in a link.


ach, I am running late - more expansion later!

Tuesday, June 2, 2009

JavaOne day One

I'm on a roll - Google I/O, 3 days of Maker Faire, and now JavaOne. throb throb, that's my swelling itching brain you hear.

JavaOne. Thanks to Lois Brooks @ Stanford I'm attending and slurping it up.

Some slurps:
  • Java Scripting Language Bowl 2009.

    Here we had Jython, Groovy, Scala, Clojure and jRuby 'duking' it out, har har, in a two round grudge match where each contestant updated the crowd on new features and then pressed on to extoll their respective communities.

    I wrote and deployed Jython and Groovy apps in production at Stanford; I'm happy with both languages and lean to Groovy. Soley because of the indentation thing in Jython/Python.

    The Scala presentation left me a bit adrift. The clojure presentation reminded me of all those pesty Lisp hounds with their fancy Lisp machines from Symbolics and TI who now are off doing nothing because the world left them behind. And I've had a thing about Ruby since the early Ruby days when their advocates were slinging personal attacts at Guido.

    BUT from this session I heard about some cool apps: Field, a Processing front end. SwingPad, an interactive Swing UI scratchpad.

    This session was a meh.

  • JavaFX intro

    I enrolled in this session as a flyer. I was totally surprised. JavaFX Scripting Language reminded me of a set of languages I enjoyed years ago - the IntelliCorp ProKappa / ProKee / Kappa-C / ProTalk set. Ok, not so much ProTalk as there was no backtracking or chaining involved :P.

    But here, in a strongly typed Java language, we have mixins! we have automatic value binding! we have triggers ( only post triggers, but still! ) The triggers are not first class objects but we can't have everything we had in 1992 can we. I liked the additions of new access types, such as public-init.

    The language / toolage seems to fit into a groovyish space. I fired up my computer in the miserable wifi cloud at Moscone center and started re-scheduling my time.

  • MTGame

    Not your mothers JMonkey Engine. These guys were working on WonderLand and using the JMonkey Engine but found that their models were getting very twisted. They decided to move forward and implement a component based model.

  • Securing Web and Service Oriented Architectures with Apache Axis, WSS4J, Spring and OpenLDAP.

    This was a great session. Mike Scheuter and Shawn McKinney of Fidelity brought a few other fellow-travelers to stage and hammered through the most concise architectural overview I've seen in a few years.

    new acrynoms for me: RBAC ARBAC02.

    and a new site: webaccessmanager.com/wiki, altho when Sun publishes the slides in this talk it will be worth your read

    Here, from the description:
    It provide attendees an outline they can use in designing future SOA security systems that will be capable of running on various application server platforms, both commercial and open-source.


  • The Floor

    On the floor the best thing in the Lincoln Volt. god, it's 20 feet long, has fins, a touch screen UI, and is a cool cream white. I was asking one of the booth grogs, whos is actually more of a film person, why it didn't generate timecode for his part of the deal and he sent me off to check out the blu-ray Neil Young release.

    This too was a totaly surprise. I'm not much of a TV consumer - I'ld rather make stuff - but the blu-ray Neil Young retrospective lead me to talk to a group of java developers who are creating an IDE for making blu-ray... hmm. things.

    I didn't know until getting the NY demo that blu-ray players have Java inside, and a hard disk, and an internet connection, and that the UI can be built not from video fragments and a lot of tedious Photoshop / Motion / Final Cut / work but rather from AWT and Java ME. That there is a different version of ME for players, and that they can pull down stuff over the web to augument the DVD. Oh and run local code. I'm sure there are parts of the 'educational community' who are all over this stuff...

    After having spent the last month ( post-SOPI, more later ) doing a multi camera video gig of trapeze artists and solo-assembling it into a multi DVD package my sneering at the DVD interactivity paradigm is now blown away by the capabilities of the blu-ray stuff. you mean, I don't have to worry about stinking registers and bit shifting for tracking menu selection logic? I'm YOURS. I got hit by the clue train.

    The Blackberry folks were very nice. forced a T shirt on me. Signed me up for stuff. I think they were sniffing the Android phone I got last week.

    the Java desktop folks were very nice. jWebPane is a WebKit Swing wrapper / component / something which does a lot of what I see the Mozilla folks doing with swirling live renderings of live browser 'surfaces.' I guess it's all the thing.





  • JavaFX Tooling for being happiness with your designers man

    I attended a session where some members of the JavaFX team showed off a series of plugins for Adobie Photoshop / Illustrator foo which took the layering and layout information from the diagrams and allowed them to be packaged as resources for JavaFX Application development.

    In such a way that allowed round-trip development. Ok perhaps not round-trip but FAST. How many times have you waited for a new set of smurfberry graphic doo-dads to come back from wendy or billy over in the graphic art pen just to see what the heck kind of layout slicing the math-impared artists have come up with now?

    This was pretty slick. I am starting to smell the JavaFX cotton candy.


  • Birds of a Feather -

    Java and Lego Mindstorms. These folks are making mad progress in the little bricks. Exciting. I think they should get together with SRL and make some killer bots.

    Alice 3.0. Great! So imagine you use a drag and drop 'syntax-less' IDE such as Scratch or StarLogoTNG or greenfoot or some of the MIT derived Lego Mindstorm environments, right? you know, like iconic software legos for do loops, message sending, assignments... And you mix in a donation of myriad 3d SIMs models from Electronic Arts. And expose behaviors from the 3d mesh and skeletons as, well, drag and drop behaviors. Add cameras and timelines. Run. You have avatars running around interacting in a 3D world.

    Then from a pull down have the picto-program onion skin back down to raw Java in a series of gradations. Sorta like BlueJ rite?

    Then export it all to NetBeans or Eclipse. Continue.

    I think I'm going to give the movie contest a shot.

    ONWARD!

Wave II

More thoughts, as I go out the door to JavaOne:
- Wave servers will be tricky to run at scale. That may be a higher ed barrier right there.
- not sure what the persistence mechanism is yet. must dig.
- fine grained ACLs will come from site specific Wave robots. perhaps even task specific.
- the ( cool, large ) demo app has the look of a development sandbox. I expect much smaller client side apps.