studs terkel

November 1st, 2008

I went to listen to Exploring Music last night, and it wasn’t there. In it’s place was a continuous stream of amazing programming from the last century of Studs Terkel. Studs pasted away at the age of 96 in his Chicago home yesterday and there is an ongoing tribute on WFMT with recasts of old shows, interviews, and great stuff all weekend. A real fantastic mix of programming, everything from Studs interviewing folks on the Freedom Train to speaking with Italian opera singers.

Godspeed Studs.

bill mcglaughlin is on!!

October 9th, 2008

It’s only now that I looked at a schedule and realized Bill McGlaughlin is on every day!! Bill McGlaughlin is unstoppable! He’s so excited about classical music in a really nerdy and intense, yet contained way. I discovered Saint Paul Sunday when I was living in Minnesota during summers in college, but didn’t realize he had a regular show too.

WFMT Feeds:
http://www.wfmt.com/main.taf?p=4

Exploring Music with Bill McGlaughlin:
http://www.wfmt.com/main.taf?p=1,1,41,7

maximum orchestration

May 19th, 2008

There was a gathering of The Kuali here last week in the suburb of Itasca. I didn’t go to the conference itself, but dropped by and hung out on Thursday and Friday at the technical sessions. I’ve been working on some various integrations with Apache Service Mix and Sakai, and since Team Kuali has been doing the same it seemed like a good place to hang out. And I’ve always been curious to unwrap the mysterious shroud and figure out what Kuali actually is. I was able to spend a good amount of time chatting with random developers and sit in on some of their meetings. They are super organized and very keen on teams. ( This is the first thing you will be asked when you meet someone at a Kuali event is, “What team are you on?” )

Kuali Overview

At the top of the world there are like 3 or so major products with the Kuali brand. The Kuali Financial is apparently a vast complex financial system with the same goals and feature sets as something like PeopleSoft. The KRA stuff is for tracking grants for research groups and things like that. It is not for doing actual research and tracking results from like autosamplers and lab experiments.

Kuali Student, the focus of the folks at the meetings I went to, is I believe basically for course registration and the sort of administrative activities that go hand in hand with that kind of activity.

These are all implemented using some part of the Rice tooling, which is their set of core libraries. Some of these include:

kcb - kuali communication broker
ken - kuali enterprise notification
kew - kuali enterprise workflow
kim - kuali identity management
kns - kuali nervous system
kom - kuali organization management
ksb - kuali service bus

From talking to various coders, it looks like Kuali Student uses the kew, kim, kns, and kom modules, plus or minus one. During thursday afternoon, we had a hacking session where everyone checked out the code, built, and installed it. There are a few other shared modules that don’t follow the 3 letter starting with k acronym idiom (like core), but they are basically all Maven 2 modules.

The entire thing does show up as a war though, and apparently you can mix and match them on App Servers. So one server might run kyx, and another kmn, and they would not share a database, but communicate via web services and messaging. So then you could have an Apache Service Mix sitting on another server that would orchestrate all of them and do cool stuff.

(This is all completely derived from hallway and hacking conversations with folks, so it’s probably only like 72.4% accurate)

Edit After some phone conversations, it seems like I still don’t really know what Kuali Financial/Student/RA encompass…. but I do know how to check it out, build it, and deploy it! :)

test update

May 17th, 2008

I’m fixing the planet updating 5.

pycon 2008

March 15th, 2008

It’s been an intense couple weeks. In addition to finally getting our Eval pilot out the door I got pretty sick and was barely able to code for like a week. It’s easy to forget how much effort is actually involved with sitting on your butt in front of a screen. Before I got sick I had a chance to spend an evening coding with The Josh Ryan who was in town for a little while, and got pretty excited again about parse specs.

URL Engineering

Every sane web programming framework has some sort of way of re-engineering your URL structures without destroying the rest of your application.

For example in Django, you set up all your URL’s in a central place like this (example from the Django Book):

from django.conf.urls.defaults import *
from mysite.views import current_datetime, hours_ahead

urlpatterns = patterns('',
    (r'^time/$', current_datetime),
    (r'^time/plus/(d{1,2})/$', hours_ahead),
)

Every time a request comes in, it runs through all the regular expression tuples you define, and if one matches it stops and sends it to the function you specify in the 2nd tuple index. Extra parameters are handled with pretty standard regular expression syntax. So in the second tuple there, the hours_ahead function also gets the stored result from the parenthesis in the regex. Of course there’s more too it, like if you want to get parameters or POST stuff, but that’s a pretty good example of creating dead sexy URL’s using old fasioned regex’s.

Another interesting example is the RESTlet framework, which uses something that adheres pretty closely to the drafted URI Template. So in this case, you set up this thing called a router, and then you attach URI Template Handlers to it: (from the RESTlet Tutorial

Router router = new Router(context);
...
// Attach the handlers to the root router
router.attach("/users/{user}", account);
router.attach("/users/{user}/orders", orders);
router.attach("/users/{user}/orders/{order}", order);

In the case of Django, the second basic argument was a function reference, in this case it’s an instance of RESTlet specific handler class. So if your URL was “/users/sgithens” the account handler would get the request with a ‘user’ parameter containing value ’sgithens’.

In the case of RSF we have the ViewParameter system, which incorporates parse specs you can modify. A good example is actually EVALSYS-452 that I had to fix last week. Basically I had the default view params with not modifications.

public class DownloadReportViewParams extends SimpleViewParameters {
   public Long templateId;
   public Long evalId;
   public String[] groupIds;

   public DownloadReportViewParams() {}

   public DownloadReportViewParams(String viewID, Long templateId, Long evalId, String[] groupIds) {
      this.viewID = viewID;
      this.templateId = templateId;
      this.evalId = evalId;
      this.groupIds = groupIds;
   }
}

This was producing just really crap URL’s like: http://server.org/site/tool/downloadedExcelFile. Of course you end up saving a file called “downloadedExcelFile” to your hardrive and then Excel can’t figure out what it is.

The solution is pretty easy by adding a filename parameter and customizing the parse spec to place it in the URL structure.

public class DownloadReportViewParams extends SimpleViewParameters {

   public Long templateId;
   public Long evalId;
   public String filename;
   public String[] groupIds;

   public DownloadReportViewParams() {}

   public DownloadReportViewParams(String viewID, Long templateId, Long evalId, String[] groupIds, String filename) {
      this.viewID = viewID;
      this.templateId = templateId;
      this.evalId = evalId;
      this.groupIds = groupIds;
      this.filename = filename;
   }

   public String getParseSpec() {
      return super.getParseSpec() + ",templateId,evalId,groupIds, @1:filename";
   }
}

This now results in URLs like: http://server.org/site/tool/downloadedExcelFile/filenameValue.xls and Excel is super happy. The other parameters in the list still show up as URL parameters. And the @ preceded things show up in your URL path. By defuault your view id (downloadedExcelFile in this case) is @0.

CoC’s vs Under Cover Dealings

One thing we’ve been sort of pondering is whether RSF needs a Chain of Crap Pattern implementation of this. (Chains of Crap are like the way you string stuff together in JQuery, or generally just declare huge lists of things (Chains of Crap are *not* always bad, but it’s important to be careful)). For instance, in the Django CoC it basically runs through all the regex’s in order. In the case of RESTlet, I’m pretty sure it’s more of an under cover thing. You initially attach the routers, but I don’t think the order matters as it uses some sort of scoring system to pick the best template for the incoming URL.

RSF is sort of a hybrid. While you define all your ViewParameters and Views in a very decentralized way, under the covers it’s a CoC that takes the first View ID that matches. I think we need one of two things:

  • A CoC somewhere that uses either Regex’s, URI Templates, or a type of ParseSpec to match incoming URL’s
  • An addition to the parse spec that allows URL’s to be matched that don’t contain the view id. Really the only handicap right now is that URL’s have to have the ViewID in them. Once we get rid of that requirement it’s pretty much home free for hot URL’s

Paris Papers

In the same vein as the above issues, Ryan Lowe and I are submitting a paper for the next conference in Paris about some of the stuff we’ve been working on with new style Sakai Helpers and URL’s in the Assignment, Gradebook, and other places. Well, I mean we call them Helpers still because there is a legacy in Sakai to call them that, but really we’re talking well documented HTTP interfaces.

When you think about, from a standardization standpoint, presentation wise we’re kind of screwed. This year alone I’m sure we’ll have tools written in JSP, Velocity, JSF, Struts, RSF, RESTlet, Wicket, sdata, Ambrosia, Pylons/Django on Jython, Rails on JRuby, and whatever framework someone decides to write on top of the servlet spec on a random Tuesday afternoon. The interesting thing about this problem is that it makes Sakai a microcosm of the rest of the internet. Lots of people are already solving these very real problems on the wider internet and interconnecting systems built on everything from PHP apps to Google Spreadsheets.

On the server side we have the JVM class specification to exchange things, whether via the Sakai Component Manager, RMI, or whatever, but when it comes to tools working together, we believe this is the essential way to fix a lot of our problems, regardless of whether you’re sending entire pages or asyncronous fragments, and whether your payload is XML, JSON, SOAP, or some random DSL. Well documented HTTP interfaces, because we are never going to port everything to a single view technology.

That’s a small slice of what we hope to talk about.

PYCON!!!



Guido 3K

Guido going over Python 3000 issues

PyCon 2008 is underway here in Chicago! We had an amazing 1100 some people register, up from last years 600. Unfortunately because I’m just getting done being sick I’m going home and sleeping at night, but am still getting a chance to sprint a bit on some Jython stuff, an explicity some Jython stuff that Sash depends on. I got to meet and talk to most of the lead Jython developers which was pretty exciting. Cool stuff is happening. I’m pretty confident that it’ll be up to Python 2.5 functionality in the next month or 2. The talks have been pretty fun, and it’s amazing how many awesome Python libraries there are that I haven’t seen before.



Guido 3K

Jim and Tobias talking about the new Jython compiler that was developed during the last Google Summer of Code. They are working on upcoming research options like developing an AST for it with multiple front and back end targets.



Guido 3K

Features of the new Jython Compiler. Combined with the new ANTLR based parser that Frank as finished recently supporting 2.5 syntax most of the pieces are available for bringing Jython up to speed again with CPython.



Guido 3K

The new compiler running Python coroutines (not supported in the current Jython release).

back home

February 6th, 2008

The first time I saw Barack talk was at a union rally on Navy Pier a few years ago, and it was pretty great. He was very good at keeping it real. While the process of going to listen to him speak is more like going to a rock concert now, it’s still pretty awesome, and I was lucky enough to get into the primary party in downtown Chicago last night.



Barack Obama on Feb 5, 2008

Good Evening Barack!



Barack and Michelle Obama on Feb 5, 2008

Barack and Michelle



Barack Obama on Feb 5, 2008

A foggy, wet, but remarkably enjoyable night downtown.

weekend

January 7th, 2008

I went and checked out the special Maps exhibit at the Field Museum this weekend. It’s pretty awesome.

I got some code from Nafai on #jython to allow loading Python sources from the classpath PEP-302 Style, so I was finally able to remove the goofy hardcoded path to the Python Standard Library. It looks like it should actually be getting into a Jython branch sometime this week. I’d like to make one now for JSR-170, and maybe our legacy ContentHostingService. I’ve managed to get a pretty long way writing stand alone scripts and programs in our content repository, but it would be much nicer to be able to import modules in relative folders in the content repository. Luckily PEP-320 is a pretty simple duck typed API, only 2 methods really. 3 methods if you write it in Java as part of org.python.core, because you have to implement find_module with an overloaded method to support the optional parameter.

PEP-302 Signatures in Native Python:
importer.find_module(fullname, path=None)
loader.load_module(fullname)

PEP-302 Signatures implemented as Jython extensions in Java:
public PyObject find_module(String name);
public PyObject find_module(String name, PyObject path);
public PyObject load_module(String moduleName);

oss 2008

January 2nd, 2008

I took a continuous 10 days off from working on Sakai and the related email lists over the holidays, which was pretty nice. Mostly running around rural Michigan and Indiana visiting relatives.

I did spend some time doing Scheme and Python stuff, making for a refreshing vacation.
I even got some fun presents. My family got me the amazing triumvirate, The Little Schemer, The Seasoned Schemer, and the The Reasoned Schemer.( CS Textbook equivalents of Lego’s ). I guess the The Reasoned Schemer is actually pretty new (published in 2005?), and extends Scheme with Prologue like constructs. Looks pretty cool.



Little Schemer Books

The CS classics, The Little Schemer and The Seasoned Schemer, along with the more recent The Reasoned Schemer

One of my Uncles runs a wood shop down at Ball State University, and we spent an evening there engraving things with their really awesome lasers. I engraved the GNU Savannah Water Buffalo on my Linux Macbook.



Engraving Laser

Lasers!!



GNU Water Buffalo Laser Engraved on a Macbook

GNU Water Buffalo. The coloration is mostly from the laser burn. It could be cleaned out and colored in with something else.

I hope the trunk is building today… :)

the dichotomy shifts its focus

December 12th, 2007

Java 5 and RSF

After the next RSF release we’re going to finally start allowing the use of Java 1.5ism’s, which will allow us to start down the path of less verbosity. The worst thing about RSF right now is the amount of typing. It’s pretty possible to most anything now, it’s just a lot of typing. On days where I get to do mostly front end work, my hands are pretty damn tired after 8 hours of HTML and Java Producers.

One thing we can do is get rid of the need to use an OLI for telling the world what kinds of information your view accept.

So, at the moment if you want a parameter called “UserID” from you URL you can specify that in your special view parameters.

public UserParams extends SimpleViewParamters {
  public String UserID;

  // Additionally, you can override getParseSpec if you would like
  // the UserID to show up in the URL, "/server/user/UserID" instead
  // of as a parameter, "/server/users?UserID=swg27
}


In order to have these ViewParameters given to you, you have to implement ViewParamsReporter.

public class UserProfilePage implements ViewComponentProducer, ViewParamsReporter {
  public getViewId() {}  // from ViewComponentProducer
  public fillComponents(...) {}  // ViewComponentProducer

  public ViewParameters getViewParameters() {
    return new UserParams();
  }
}

Whats really happening is that when your app starts up, it scans through all the ViewComponentProducers you have defined, and checks them all, via the Reflection, whether they implement ViewParamsReporter. If they do, it calls the method of it, and stores that type as THE data model you want this view to receive.

This is how most of the Reporter APIs work. They are scanned for at startup and registered. That’s about the best we could do with Java 1.4.

In the new world you will be able to just go:

public class UserProfilePage implements ViewProducer {

  public fillComponents(UIComponent tofill, UserParams params) {
  }

}

So, at that point you just use generics to make it clear what sort of data model you would like to receive. Also, at this point you can just use the class name to decide the template/view name. So the above ViewProducer would automatically match up with a template named UserProfilePage.html. If you don’t like that you can optionally implement the OLI ViewIDReporter, which will give you the old method back to specifically say which template you are using.

I think at this point we are really finally starting to head towards some nice conventions. There is a lot of flexibility in RSF because of the amount of Spring that is used to power it, and now we can start to really refine the conventions that will make it useable.

Adding in a dynamic language such as Jython, Groovy, and Kawa which will eliminate the need to even declare the ViewProducers in XML, I think we’ll be pretty close to a nice fast easy development environment. I’m trying to think of programming in RSF has using PHP with a template library like Smarty, but with some fairly advanced programming techniques available in your bucket of tools. We still have to much configuration required, but we’ll continue to slice through that as each of these conventions are refined.

cali
I have a lot more to blog about. I’ve been splitting my time between Cambridge and Chicago about 50/50 the last 4 months. Just spent 2 weeks in California. The first hacking with Dave M, and the second at the the Sakai Conf in Newport Beach. It was a really fun conference.

Back in Chicago now. We got a little bit of snow while I was gone, but it’s mostly raining now. Tomorrow it’s off to Cambridge for a week. We’re going to a meeting to work on Sakai/Moodle interoperability. In that vein I’m trying to finish getting my initial support for MNET in Sakai working tonight, as it’s my favorite bit of integration.

Essentially, the Moodle guys have come up with a few XML-RPC signatures that allow installations to talk together and let folks cross enroll and have roving themes and stuff. At a certain level it’s not really even system specific, but it’s designed to be super scalable, ie. no heartbeats or anything, which makes sense when you’re about to connect and million moodle installations. (and hopefully Sakai and others). I have hopes that it could be a handy grassroot interop protocol. There are really only 4 base signatures you have to support, and they basically allow the servers to query each other and see what operations they support.

things are looking up…

November 20th, 2007

My strategy of always keeping a toothbrush/toothpaste with me, and brushing my teeth obsessively several times during the work day is really paid off. My dental cleaning today went absolutely swimmingly, and required no further bookings. Hopefully I can keep my cap level at 4 for a while.

Smashing to the Max!