Wednesday, November 30, 2011

Developed Right Here: IGDA NL Chapter Demo Night

The Newfoundland chapter of the International Game Developer Association held a demo night on November 29, 2011, with approximately two dozen attendees packing the Computer Science seminar room at Memorial University, listening to three local video game studios show their latest efforts.
Roddie Kieley, of Binary Dawn, discussed the evolution of his company's games. They've touched on several genres including space shooters, word games, a drinking entertainment game - all on iOS devices. Their next tittle however would be a break away from that platform.

Although early in development, Roddie outlined some of the technology going in to their next game, of particular interest to myself was the use of Apache Maven to build a Flash based application. Unfortunately no playable demo was available to be shown.

Concluding his presentation Roddie answered several questions from the audience spanning his experiences with various tool chains, frameworks, and game platforms.

Colin Walsh, of Celsius Game Studios, took the audience on a tour of his game studios' first two tittles, then provided an early developer build demonstration of his up coming game Drifter.

The procedurally generated galaxy that Celsius is building into Drifter (10,000 star systems) was very impressive to see! I fully expect to hear great things about this game when it hits the market (see demo video below).
Chromodyne Red Nova Drifter

Following Celsius Game Studios was Best Boy Media Inc, represented by Dylan Fries.

Two game demos were presented, one for Mickey's Farm (a preschool child oriented game), and an augmented reality Christmas tree decorating game Yule Tree. Despite their younger target audience these games represented some of the challenges developers encounter when producing games for younger users. Color pallets, user interface design, and the technical issues of being able to provide large lively environments with in the platform resource budgets available all presented unique challenge. As well, designing an Augmented Reality App for a general audience who often have never seen AR before highlighted the importance of iterative testing and user feedback. Mickeys Farm is playable online at and Yule Tree is available for iOS in the iTunes app store now!
Mickey's FarmYule Tree
After all of the presentations the group started discussing the local video game industry in general, touching on topics from where to find classes on animation, graphics engines, and development, to the kind of software packages / tools the presenting companies used to make their games.

I think this was a very successful meeting for the IGDA Newfoundland chapter. It was a treat to see the kind of video game development talent / industry we're growing here.

Tuesday, November 29, 2011

Looking for an itch to scratch? How about contributing to Apache Karaf?

The Apache Karaf 3.0 release candidate is approaching, it's a good time to try to get a patch in before we cut our first RC :)

Reviewing our JIRA entries currently slated for the 3.0.0 release, there are several issues that would make good targets for new contributors to step in and try their hand submitting a patch. I've list below several of these issues in the hope that a new contributor that's been sitting on fence not knowing where to jump in may pick up an issue and start their journey into Apache development :

Console doesn't like it when the console window is too small - no line wrapping for commands:

Better support for Maven Proxies:

Tab completion on path when installing bundles:

Backspace no longer works in Putty after using 'connect' command to connect to other instance, and commands are printed in only 2 columns:

Improve security docs with respect to roles policies:

Thursday, November 24, 2011

Winter has arrived.

Winter has arrived here on the Avalon peninsula of Newfoundland. I thought I'd share a few photos.
Looking down the road. Snow blowers are a live saver. My cat has the right idea.
One of my favorite shots of the day can be seen here: Metro bus catching tow from a passing by snow plow.

Now that I have my driveway cleared I'm back to looking over issues for the Apache Karaf 2.2.5 RC. We'll be bumping out some issues to Karaf 2.2.6, while focusing our efforts on the remaining items. The community appears to be making nice forward progress :)

Departmental Seminar @ Memorial University: A Complexity Perspective on Adapting Reactive Architectures

Another seminar upcoming for the Department of Computer Science at Memorial University of Newfoundland. This one is being present by a good friend of mine Dr Todd Wareham (he's one of the core people behind the local CS Games held several times each semester at Memorial).

Dr.  Todd Wareham
(CS Mun)

Educating Genghis:
A Complexity Perspective on Adapting Reactive Architectures

Department of Computer Science
Thursday, December 1, 2011, 1:00 pm., Room EN-2022


The problem of adapting an existing reactive architecture to meet new task constraints has applications in a wide variety of fields, including cognitive robotics, evolutionary robotics, and cognitive neuroscience. Such adaptation can range from simple reconfiguration of existing layers and the linkages between them to the the recruitment of new layers (either on hand or  custom-designed). Though there are a number of proof-of-concept systems  implementing such adaptation, it is not obvious if any algorithm can perform efficient adaptation in general or, if not, under which conditions (if any) such efficient adaptation might be possible.

In this talk, we present the initial results of a computational complexity analysis of reactive adaptation carried out to answer these two questions. Our main result is that even for a rather simple world and a simple task, adapting a subsumption reactive architecture to perform that task in a given world is NP-hard. Additional parameterized results in turn delimit those conditions under which efficient adaptation is possible, e.g., we show that architectures with limited sensory and perceptual abilities are efficiently adaptable.

(Work done in collaborations with Pim Haselager, Johan Kwisthout, and Iris van Rooij (Radboud University Nijmegen))

Tuesday, November 22, 2011

Preparing for Apache Karaf 2.2.5

The fifth maintenance release of the Apache Karaf 2.2.x branch has entered the planning phase, as such I'm preparing for the release management role.

To prepare I've selected a bottle of Maison Sichel Bordeaux 2009 to decant while listening to some City and Colour albums. As it has been a common thread on my last few 'preparing for Apache Karaf' posts, the 3.0.0 release is still underway in preparation - the community is committed to seeing Karaf 3.0 being feature complete and polished before it is raised to production status.

Current high lights of this patch include multiple JAAS support improvements, and better support for Linux systems with certain versions of libc. This kit will also include new features such as SCP support, and a demo for extending Karaf's console commands.

The wine will of course only be sampled after being gave proper time to breath in its container, after the first release candidate has be up loaded for voting (see our release guide for more details on our process).

Unfortunately I can't share the wine with you, but I can share a few links to some City and Colour videos.

I'm looking forward to starting the 2.2.5 release process. I'll be posting updates to our Twitter stream (#karaf) and on our IRC channel ( #karaf).

Saturday, November 19, 2011

Departmental Seminar @ Memorial University: Towards Engineering Processes for Web Service Repositories.

Thought I'd post below the announcement for the upcoming Departmental Seminar at Memorial University entitled "Towards Engineering Processes for Web Service Repositories". Sounds like an interesting talk for anyone working with SOA technologies.

Towards Engineering Processes for Web Service Repositories

Dr.  Adrian Fiech

Department of Computer Science
Thursday, December 8th, 2011, 1:00 pm., Room EN-2022


Service-oriented Software Engineering embraces the construction of software systems from available modules that can be acquired from service providers and assembled into a complete system. Web services are particularly suitable to this approach.

The process of crafting successful web service repositories is complex and needs to be addressed with a rigor reminiscent of software engineering processes. We are working on creation of a comprehensive process framework that provides a set of practices and tools for web service repository design, configuration, testing, implementation and management.

We begin with practical case studies, which investigate and highlight promising problem domains that are suitable for (primarily commercial) repository development. Next, we design and implement prototype web service repositories for the most encouraging cases. The prototype repositories shall afford simple configuration, powerful query answering system and the support for diverse business models. Subsequently we summarize, discuss and evaluate the processes we used in our prototype repository design/implementations as well as approaches used by others.

Thursday, November 17, 2011

Micro-Hackathons. This is what happens when two or more committers are in the same space.

From time to time I like to post photos of what we're having for lunch when Jon and I have a little Micro-Hackathon. Today's menu consisted of Curried Pork, Lentils, Chickpeas, Basmati Rice, and Pappadums.
Finishing our lunch Jon suggested a round of cards... needless to say poker is now ruined :P
FuseSource EIP playing cards.

Tuesday, November 15, 2011

Winter is coming, time to plan a code project.

As the Starks of Winterfell say, "the winter is coming". I don't know about you but I usually consider the run up to winter as the time to plan a code project to fill up those long cold days that we're going to be stuck indoors. Generally my side projects tend to be scratching an itch I have with one apache project or another, what I'd like to know is what will your winter side project be?
Please leave comments below pertaining the project you're planning to contribute code towards or describing the little side project your building for personal enjoyment. We may have to spend the winter isolated with our dev work stations, but we can at least share the fun of our code projects :)

Thursday, November 10, 2011

IGDA NL Chapter meeting on November 29th, 2011!

As I've been asked to relay any information on the next local Video Game Developer meeting, I happily pass along the below note:

"The next meeting of the Newfoundland Chapter of the International Game Developer Association will be on November 29th, 2011 at the Computer Science seminar room (EN-2022) at 7pm.
There will be presentations and Q&A from local game developers talking about their experiences developing games, followed by some friendly beverages at Bitters. Hope to see you there!" -- IGDA NL

Saturday, November 5, 2011

Memorial University CS Games Singles Fall 2011 Results

The Fall 2011 CS Singles programming competition took place last Friday night at Memorial University. Eighteen students took part, trying their skills against the algorithmic conundrums the programming competition committee prepare as their set of three problems.

After 150 minutes the competition time expired and the judges prepared the results.
Awaiting the results.
Competition Judges (Left to Right): Dr Craig, Dr Kolokolova, and Dr Wareham. 
The volume of submissions for this competition was impressively high, at the end though three students emerged with top results; in third place was Nathanel Woodfine, in second place was Adam Murphy, and finally in first was Robert Hamilton.
3rd: Nathanel Woodfine 2nd: Adam Murphy 1st: Robert Hamilton

I'd like to thank all the students, volunteers, and the games committee again for making these CS games possible. I hope to see everyone again in the new year when we have the next singles competition.

Thursday, November 3, 2011

Creating your own Apache Karaf console command.

Have you ever wanted to create your own Apache Karaf console command but didn't know where to start? In this post I aim to show you how the critical code snippets required to create your own Apache Karaf console commands, complete with completer. Please note that the process for creating your own console command is well documented in the Apache Karaf documentation, however its nice to have a concrete example on hand.

The creation of a custom command can be boiled down to drafting a boiler plate pom file, extending OsgiCommandSupport, writing a command completer, and finally wiring it all together via blueprint. Don't worry about directory structure, or other boiler plate bits of code for now, a full source code demo will be included in Karaf starting on version 2.2.5.

The Pom File:

The critical bits you'll encounter in the pom file for making your own command will be the initial setup declarations:


Adding in the dependency on the Karaf shell:


And finally configuring the maven bundle plugin to package the command:


Extending OsgiCommandSupport:

The actual custom command logic is implemented in a class you write that extends OsgiCommandSupport. The annotations for 'command' and 'argument' is where you'll immediately need to pay attention. In the command annotation you setup your command scope and name (each scope can have several names associated via separate commands). In the argument annotation you describe the arguments that the command will expect. The doExecute() method is where you'll perform the action for the command, add any custom code you want to have performed here.

@Command(scope = "yourcommand", name = "hello", description="Says hello")
public class YourCommand extends OsgiCommandSupport {

    @Argument(index = 0, name = "arg", 
              description = "The command argument", 
              required = false, multiValued = false)
    String arg = null;

    protected Object doExecute() throws Exception {
        System.out.println("Executing your Command Demo");
        return null;

Command Completer:

Although not strictly required, the command completer is generally a good idea to include. The completers' job is to allow the user to tab complete the command, possibly showing input possibilities.

public class YourCompleter implements Completer {
* @param buffer it's the beginning string typed by the user
* @param cursor it's the position of the cursor
* @param candidates the list of completions proposed to the user
 public int complete(String buffer, int cursor, List candidates) {
  StringsCompleter delegate = new StringsCompleter();
  return delegate.complete(buffer, cursor, candidates);

Wiring it together with Blueprint:

Now to bring all these components together we use Blueprint. Blueprint is a dependency injection framework that we like to use with OSGi in Karaf. In short the below xml handles the instantiation of objects and wiring them together.

<blueprint xmlns="">
    <command-bundle xmlns="">
        <command name="yourcommand/hello">
            <action class="org.apache.karaf.demos.command.YourCommand"/>
                <ref component-id="yourCompleter"/>
    <bean id="yourCompleter" class=""/>

Build and Deploy Time!

Now that we have composed the components of a custom command, lets build the code and test it out.

To build the command just invoke:

mvn install

This will build the command bundle and make it available in your local m2 repo.

To deploy the command bundle issue the following command in a running instance of Karaf:

karaf@root> osgi:install -s \ mvn:org.apache.karaf.demos/org.apache.karaf.demos.command/2.2.5-SNAPSHOT

After installing the bundle it will become available on the console command line. Your custom command will now act like the other commands already deployed inside of Karaf.

karaf@root> yourcommand:hello 
Executing your Command Demo

This demo will start appearing in Apache Karaf 2.2.5, so don't worry about piecing together the boiler plate code. I hope you found this short tutorial useful.

Tuesday, November 1, 2011

Apache Karaf Child Instances, what are they and why should I use them?

An often under used feature of Apache Karaf is its support for child instances. In this post I'll cover just what Karaf child instances are, and discuss some ways that you may use them.

Two child instances, Alpha and Beta,
created from base Karaf installation.
A Karaf child instance is a copy of Karaf that you can launch separately (its own system process) and deploy applications into. An instance does not contain the full copy of Karaf, but only a copy of the configuration files and data folder which contains all the runtime information, logs and temporary files. This concept is pretty neat in that you can deploy a Karaf distribution to your server, adjust your basic configuration, then spin up copies of this initial deployment for use - the ports used by these child instances are managed such that you don't have to manually set them as part of the setup process (much easier than trying to setup multiple separate installations on one machine). Each of the Karaf child instances will "live" in your KARAF_HOME/instances folder.

If the above description doesn't have you excited then don't worry, here are a couple of deployment scenarios that may help illustrate why using Karaf child instances can improve your Karaf experience.

Operating System level process isolation:

We've all encountered this - Suppose you have an application that is known to have less than desirable runtime characteristics (cores the system, or regularly encounters Out of Memory exceptions for example), it may be nice to have that application deployed in its own Karaf environment. If the process becomes unwieldily then the entire instance can be stopped, restarted, or else wise manipulated without affecting other applications deployed  in other Karaf child instances.

Failover protection:

Simple Master/Slave Failover.
I have to admit I like to use this setup when I need to have an extra level of assurance that my deployed application will be available. In this scenario two or more instances of Karaf are created on one server, with each instance making use of Karafs' JDBC lock mechanism to connect to local or remote DB. In this Master/Slave deployment if the instance acting as the Master was to become unavailable then an awaiting slave instance can spool up to take over (for faster switches I keep the slave instances hot loaded via container level locking).

Organizational Separation:

Keeping your user groups happy.
It's not uncommon for multiple departments or projects to reside upon the same server resource, it may be advantageous for the administrator to separate their Karaf deployments along these lines so that the operation of one group does not impact others. In example one may have an instance for supporting an application used by accounting, and another by marketing.


A more advanced concept is to create Karaf instances to join into a Cellar Cluster - Cellar being Apache Karaf's Hazelcast powered clustering solution. Creating Karaf child instances to join as cluster nodes allows for another degree of flexibility when allocating resources for Karaf deployments. Given a powerful server, an administrator may create child instances as required to add to the cluster. These additional cluster resources may be deallocated as required at a later time.

I hope that the above exploration of Karaf child instances helped clear up any general confusion about their purpose and perhaps provided some insight into how to improve your own Karaf deployments. For more information on Karaf child instances please visit the Karaf user guide Child Instance entry.