Here at Lab49 we develop right on technology’s bleeding edge. Innovation requires investigation, and so in its wisdom the Lab encourages a culture of research. Our own Matt Davey championed an internal venture, now involving a small team of 49ers, to demonstrate a new risk management architecture. While the project at its core focuses on back-end technologies such as data stores, for this article I will discuss mostly middleware.
Early on (and prior to my involvement) the team planned to create a straightforward Microsoft Silverlight front-end that connected to Nirvana middleware. We have since added a twist: the team will build two front-ends in parallel, one in Silverlight and one in Adobe Flex. Given the political intesity surrounding RIA technologies, I have no doubt this will be an interesting experiment. With luck it will also be informative beyond the usual Flex versus Silverlight religiosity, as we will be able to judge how easily each platform integrates with a proven middleware product in Nirvana. Of course, to begin I must install Nirvana Enterprise on my trusty MacBook Pro.
The shop behind Nirvana, my-Channels, provides a free developer edition. Generally I work on a Mac, so I grabbed the Mac OS X package. They also provide official installation instructions, but unfortunately the curtains do not match the carpet, as it were. There are instructions for Win32, Linux/Solaris and Generic Unix, but there is not a word about OS X. A reasonable man might assume Generic Unix is the appropriate replacement, but he would be wrong. The good news is that when I download and unzip nirvana_osx_novm.zip
, out pops a proper OS X application install.app
. I launch the installer and go with the defaults most of the way. I do choose a custom data directory, ~/Documents/nirvana_data
. Installation proceeds without trouble, using the default /Applications/Nirvana_5.1.6710
, henceforth called {NIRVANA_HOME}
, for the Nirvana application folder.
Moving on, I download the TradeSpace demo package tradespace_demos.zip
, which is free on the my-Channels downloads page. The demo instructions recommend unzipping to the Nirvana application folder, but instead I choose ~/Sites/nirvana/demo
. Following the Environment Configuration section of the demo instructions, I update ~/Sites/nirvana/demo/cfg/demo.xml
.
- Update value of property
BasePath
to ~/Sites/nirvana/demo/www
.
- Update value of property
port
to 8887
. This number is somewhat arbitrary, though I recommend avoiding the default 80.
Now I am able to launch the Nirvana server. In the Finder, I navigate to {NIRVANA_HOME}/server/nirvana
and double-click the Start Nirvana Realm Server
alias. A Terminal window opens and launches the Nirvana server, which in turn prints some server and environment details to the console. The server lives. The next section of the instructions, Interface, Plugin and Channel Setup, suggests I open an item from my Windows Start menu and then execute a pair of .BAT scripts. This is clearly impossible on OS X, and the instructions offer no alternative. I am on my own.
I open the first script, setup.bat
, in a text editor and see a single command, nimportrealm ..\cfg\demo.xml -all
. This implies the next step is to import the demo realm, and fortunately I can do this by GUI. I navigate to {NIRVANA_HOME}/Administration/nirvana/
and double-click the Nirvana Enterprise Manager. I find my default realm nirvana
under the Realms
node and right-click to bring up the context menu, selecting Import Realm from XML
. I find the demo.xml
file from earlier and click Import All
. After I click OK, a directory showcase
with four channels appears beneath my realm nirvana
. To confirm the server is operational, I head to http://localhost:8887/
in a browser, and sure enough, a welcome page congratulates me.
For my encore, I will take care of the second .BAT script, startall.bat
, and at last connect a Flex client to Nirvana.
[Update 13-April-2010] Continue with the follow up article, Achieving Nirvana with Flex.