A few years ago when this whole Avian Computing thing got started, I considered basing this project on Sun’s Jini/JavaSpaces technology. Why should I reinvent the proverbial wheel when Sun has already invested a significantly greater number of programming hours than I’ll ever hope to invest by myself, using much better programmers than I’ll ever hope to be?
However, a cursory review of JavaSpaces at that time yielded the gut-level feeling that JavaSpaces was a much bigger solution than the problem that I was trying to solve. Sure, both JavaSpaces and the (soon to be) Avian Computing use Linda constructs but that was about it. So I took the path less traveled and started working on Avian Computing.
Recently I started to question the wisdom of that decision and consequently started to read about JavaSpaces. Turns out my gut-level feeling was right. JavaSpaces is all about distributed computing which coincidentally happens to be asynchronous and parallel while Avian Computing is focused on thinking about parallel applications and how to mentally visualize the objects and threads of a parallel program. The fact that both projects use Linda constructs just proves how useful and universal Linda constructs are.
JavaSpaces provides a technology that allows an application to interact with Entries in (Java)Space and to access services available on other computers or to acquire the codebase (when necessary) to perform the required functions locally. JavaSpaces makes the location where the actual computations are performed invisible and irrelevant. JavaSpaces begins with the client-server architecture and morphs it into a homogeneous universal solution. Parallelism in the system is implicit and not explicitly encoded into the individual clients.
Avian Computing begins with the assumption that multicore CPU’s are the new normal and the biggest obstacle to improved computing is our inability to effectively use the power of these multicore CPU’s. And that the biggest obstacle to using the full power of multicore CPU’s is our inability to conceptualize parallel applications.
Avian Computing, as implemented in ConcX, encourages us to think about the actions of individual birds in the flock and how as a flock they will accomplish their goal. This simplifying metaphor encourages us to explore the inherent parallel possibilities of the application. The perspective provided by Avian Computing and ConcX reveals opportunities for utilizing the full power of multicore CPU’s that are frequently non-obvious to developers comfortable with single-threaded programming.
JavaSpaces is an additional library of code, increasing the complexity of Java applications and reducing the number of programmers who can develop or maintain the code. Avian Computing is a simplifying technology that tries to minimize the amount of new code that must be written or maintained. And the code that is written is typically more standard Java that can be developed and maintained by more programmers.
JavaSpaces overrides the word Public so it has a different meaning in JavaSpaces than in regular Java. Additionally, Entries in JavaSpaces require that all key fields be Public, surrendering private fields, accessor methods, and object encapsulation. Avian Computing doesn’t require learning new meanings for standard java keywords or new rules for objects.
JavaSpaces provides a complicated implementation of the Linda constructs, providing a multitude of ways in which a tuple (Entry in JavaSpace) can be NOT found. For example, the key fields not matching exactly, or the transaction not matching, or the desired tuple not being available at the right time. Avian Computing and ConcX uses a much simpler method to find matching tuples; each bird looks for only 1 or 2 types of food and if it doesn’t find appropriate food, it just waits a little while and automatically tries again. No extra programming required. No additional concepts to learn. No complicated reasons for NOT finding the tuples that actually exist.
Even though I am glad that I followed my gut and didn’t try to leverage JavaSpaces, I expect that the Avian Computing project will incorporate many of the features and strengths of JavaSpaces. But only if they can be added without overly complicating using ConcX and Avian Computing.