Building and running Shindig (the OpenSocial container)

Shindig is an open source project that provides the base implementation for an Open Social container.  I'm exploring a potential Open Social opportunity that will require me to host my own Shindig server, so today was my day to get my hands dirty with a Shindig server.

First Attempt:  PHP Solution

I first tried the PHP solution, thinking it would be a good opportunity to get more familiar with Apache and PHP.  I installed and got WAMPServer running on my Vista box, and began importing the Shindig files.  I ran into a few hitches, like needing to configure additional modules and extensions, and the fact that some of the source code uses <? and not <?php, etc.  Also, the directory structure is not precise, it does not match the descriptions, and I was finding myself having to do a lot of early source code investigation to get the PHP version to work.

Well, after doing some more research, I found others documenting difficult experiences with the PHP solution and indicating that it is a ways behind the Java implementation (http://trac.hyves-api.nl/hyves-api/wiki/ShindigStarted), and it appears that Hi5 is scaling nicely with the Java-based version, so I decided to ditch the PHP attempt and try the Java solution.

Seond Attempt: Java Solution

I've mostly been a Microsoft-stack developer, so I didn't have all the java tools installed either.  So I went to install the JDK 1.6 (minimum requirements are for 1.5, so the odd thing you do is go and install version 6.0 of the JSE -- no where does anyone bother to mention that the 6.0 has nothing to do with the 1.6 designation -- go figure).  The Sun downloader product didn't work at all, so I used the other installer.

Okay, so 40 minutes later, I have the JDK installed.  The installation of Maven was smooth, the SVN retrieval of the Shindig source was also simple.  Next, comes the build step, which gave me a couple of hitches.  Here were the two things I had to set up:

  • Add the JDK bin directory to your path.  Example:  C:\Program Files\Java\jdk1.6.0_06\bin   (and don't forget maven, of course)
  • Set JAVA_HOME to the "correct" directory.  An example of that is:  JAVA_HOME=c:\Program Files\Java\jre1.6.0_06

Next, run MVN Package.  I saw in the logs that some checksums failed, and the Jetty server package was not able to download.  Well the solution to that was to go have a beer and come back and try again laster.  Then the build succeeded.  The execution succeeded (remember to CD to the "Server" directory), and the sample page worked.  I now have a Shindig server up and running.

All and all pretty straightforward, just a couple of jigs.  And I can't wait to understand why the build process was so long and slow when I had already downloaded an 80Meg Java package and as far as I understand, the functionality of the OpenSocial container server (gadgets and data support) should be pretty simple.  Lots of learning to do!