<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
   <title>Tensegrity</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/" />
   <link rel="self" type="application/atom+xml" href="http://www.tensegrity.hellblazer.com/atom.xml" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4</id>
   <updated>2008-07-14T01:00:50Z</updated>
   <subtitle>The tech blog of Hal Hildebrand</subtitle>
   <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.34</generator>

<entry>
   <title>Distributed OSGi - On The Scent Of Red Herrings</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/06/distributed_osgi_on_the_scent.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4361</id>
   
   <published>2008-06-17T00:13:10Z</published>
   <updated>2008-07-14T01:00:50Z</updated>
   
   <summary>So, this morning my alarm clock was inexplicably set to the central time zone and consequently I arose 2 hours before my regularly scheduled time. Unable or unwilling to go back to bed after my morning &quot;get ready for work&quot;...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
         <category term="Distributed Systems" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="OSGi" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p><img alt="red-herring_color.jpg" src="http://www.tensegrity.hellblazer.com/media/red-herring_color.jpg" width="200" height="179" align="right" />So, this morning my alarm clock was inexplicably set to the central time zone and consequently I arose 2 hours before my regularly scheduled time.  Unable or unwilling to go back to bed after my morning "get ready for work" rituals, I settled down to read a few articles from my RSS feeds.  The first one I read was a rather odd post on <a href="http://java.dzone.com/articles/distributed-osgi-—-tilting-win">Distributed OSGi - Tilting at Windmills</a> by Roger Voss.  Laughing a bit as I read the opening paragraph, I didn't think much more about the post as it really had nothing to do with what the OSGi RFP 119 "Distributed OSGi" really is about.  Fortunately or unfortunately, several people started peppering me with tweets, IMs and emails asking if I had read the post in question and what were my thoughts about it.  So, here they are.</p>

<p>Basically, I'm not really going to defend the OSGi EEG RFC 119, "Distributed OSGi" as my own interest in the matter rested largely with the acquisition of the so called "registry hooks" which allow infrastructure developers such as myself to hook into the queries of the OSGi service registry and do cool things like manifest services on demand.  Once this capability was present and decoupled from the 119 RFC, I felt I had all the tools I needed to do any damn thing I wanted to, regardless of what the 119 RFC was doing.  <em>(for background as to how I fell in love with the idea of the registry hooks, see my posts on remote OSGi, which predated the RFC 119 <a href="http://www.tensegrity.hellblazer.com/2007/03/distrubuting_osgi.html">here</a> and <a href="http://www.tensegrity.hellblazer.com/2007/03/distributing_osgi_differences_1.html">here</a> and a post during the formulation of the RFP which led to RFC 119 <a href="http://www.tensegrity.hellblazer.com/2007/08/super_complex_pan_dimensional.html">here</a>)</em><br />
</p>]]>
      <![CDATA[<p>Oddly, I happen to agree with the basics of what Roger Voss has to say in his post which really doesn't have much to do with Distributed OSGi qua RFC 119.  I mean, I was doing orthogonal persistence and distribution before Microsoft even invented the term Object and when the OMG was a toddler.  <a href="http://en.wikipedia.org/wiki/Fallacies_of_Distributed_Computing">All the issues that have since become well known</a> regarding distributed computing, RPC and "transparence" are well known to me and something that I internalized quite a long while ago.</p>

<p>There's something that I've tried to get across in the various forums I've been a part of - SCA and now the OSGi EEG - but the point doesn't seem to get across too well and that is this:<blockquote><em>Fine.  You don't like transparent, RMI style distribution.  You think there's a huge difference between 'remote' communication and 'local' communication that you believe should be ensconced in the very bowels of a 'distributed' interface.  Fine.  But what you seem to be completely missing is that the API presented by the 'service' is a Java object.  It has Java semantics.  If you want an exception thrown to indicate remote communication issues, then you had damn well put it in the interface specification.  If you want to expose the wonderful rawness of the asynchronous communication patterns underlying all distributed communications, then by all means encode it into the interface of your Java object.</em></blockquote>The point being simply that you have a Java object there.  You don't like "transparency".  Then you can pretty much define any interface you damn well like.  My only request is that you don't "force" it on the rest of us.</p>

<p>Look.  OSGi services aren't anything magical at all.  One thing that I think people who haven't used OSGi at all are extremely confused about is that OSGi services are simply Java objects.  They are <em>not</em> proxied - meaning that you have access to the actual, honest to "Bob" Java object that is the service.  They do not have to implement an interface - meaning that there is literally no restrictions on what you can publish as a service.</p>

<p>And so all this whining and moaning about how we don't need yet another failed "transparent", "RPC-based" distributed object model is really just whining and moaning without understanding what is going on.  RFC 119 (so far!) doesn't say jack about what the actual <em>model</em> for the distributed object model actually is.  Yes, there's a lot of people working on the spec who honest to "Bob" believe that they really, really do have the uber distributed computing model sewn up and that's what all the really cool (and productive) programmers will be using next year.  But RFC 119 doesn't promulgate any such model.</p>

<p>And that's the way I hope it stays.  There's always a lot of loose talk about defining an "asynchronous" model or another god forsaken web services model, but these are and should remain orthogonal to the oddly named RFC 119, "Distributed OSGi" specification.  My personal opinion is that the days of communist inspired, five year centrally planned API specifications by standards organizations are long, long gone and will be quite infrequent in the future.  POJOs rule and there's really absolutely no reason to specify much beyond what is already specified in RFC 119 (there's already, imho, too much specified in RFC 119, but that is purely my personal opinion and in any event, it's done in such a way as I don't have to pay attention to it if I don't want to).</p>

<p>However, what is important is the way services are used in OSGi and the way the service registry hooks allow some highly sophisticated and quite magical (if I may be so bold as to use that term) capabilities in OSGi that really are quite handy.  Regardless of whether you have Ajax communication, JMS messaging, god's own event oriented communications APIs or (shudder) straight up RMI "transparent" communication, the facilities that RFC 119 relies on (and, of course RFC 119 itself) will make not only the development, but the actual interaction with your services from the end programmer's perspective a fantastic experience.</p>

<p>Focussing on the API of some mythical dream of transparent, RPC style (or even event oriented) distributed communication is completely missing the point of what is happening with OSGi and distributed communications - and RFC 119, "Distributed OSGi", in particular.</p>

<p><br />
</p>]]>
   </content>
</entry>
<entry>
   <title>My Dinner With Andre</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/06/my_dinner_with_andre_1.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4359</id>
   
   <published>2008-06-04T14:42:19Z</published>
   <updated>2008-07-14T00:59:40Z</updated>
   
   <summary>Well, after my last blog entry regarding Sun and JSR 277, I received a visit from the enforcers of that fine establishment. Wearing heavy overcoats on a nice sunny day, the elevator door opened and they came rushing out. Like...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p><img alt="Our Glorious Leader" src="http://www.tensegrity.hellblazer.com/media/mao_tse_tung.jpg" width="374" height="372" align="right"/>Well, after my last blog entry regarding Sun and JSR 277, I received a visit from the enforcers of that fine establishment.  Wearing heavy overcoats on a nice sunny day, the elevator door opened and they came rushing out.  Like a scene from the <em>Matrix</em>, it seemingly took them forever to pull out their impossibly huge automatic weapons they had hidden under the black leather trench coats.  In only several hundred milliseconds, Sun's professional enforcers unloaded 20 or 30 pounds of lead in the form of hundreds upon hundreds of rounds of high powered ammunition into what used to be my body, splattering my physical essence across the interior of the reception area of building 200 on the Geidi Prime campus.</p>

<p>Or not.  Rather, what did happen was Alex and Stanley showed up at my office escorted by a fellow member of House Harkonnen and after a slightly awkward moment with Stanley (I had, after all, just blasted across the internet - with the awesome power of my blog - stating that he was an idiot), Stanley and my compatriot excused themselves to work on JSR 277 related specification business leaving Alex Buckley and I in my office, as I watched him finger a menacing looking lead pipe that he pulled from his brief case.</p>

<p>Or not.  Rather, we sat down and talked comfortably for quite some time about about everything but the issues surrounding JSR 277 and the reason why Alex even knew of my existence.  Eventually, however, we directed the conversation towards the actual issues we really needed to discuss and left the safe domain of my Dr. Who toy collection and the pleasantries of traveling through Heathrow in the U.K.<br />
</p>]]>
      <![CDATA[<p>Now, Alex Buckley is obviously one of the top <em>Spice<sup>tm</sup></em> enhanced brains working at Sun.  Very easy to talk to and generally a no nonsense individual who clearly wants things to work out for the best of both for Sun and the OSGi community.  I won't actually go into any of the discussions about technical particulars that we discussed about such subjects as versioning formats, meta data information locations and such.  These things are important, but there's a point that is, I think, far more important than any of the technical details which will have to be worked out and that is how this process is actually working out.</p>

<p>We as technical people invariably have this rather blinkered view of reality in that we see the "real" problems as being the "hard" issues of the technology in question.  As I mentioned, the issues of how many indexes and what format the version strings will have in the module metadata;  whether we should reuse the META-DATA/MANIFEST.MF entries like OSGi does, and whether that is even sufficient for the super complex, pan dimensional needs that the <em>Spice<sup>tm</sup></em> enhanced brains from Sun foresee as requirements due to their ability to look far beyond the present and into the bright future where we'll all need shades just to keep our eyes from being seared because it's such a hot technology.  No, these issues are all things that I do believe that having the Third Stage Guild navigators from Sun locked in a room with the mere mortals of the rest of the industry could figure out in a reasonable amount of time.  </p>

<p>The problem is, of course, that there really isn't any functioning expert group, nor is there any serious interaction between Sun, the JSR 277 expert group and the OSGi organization.</p>

<p>Now, while it's somewhat flattering to have Alex show up in my office and dedicate a non trivial amount of his time discussing the technical issues with me, the problem is that I'm not the OSGi organization.  True, I'm a member of the Core Platform Expert Group and the Enterprise Expert Group.  But in reality, it's just me and this wasn't even a working session where we were expected to produce anything other than a polite blog entry such as this explaining how wonderful things really are when you look past all the politics with JSR 277.</p>

<p>Indeed, the problem - from my humble and obviously biased POV - is that Alex is having a substantial number of bilateral talks with various interested parties of this rather serious issue.  That is, he's talking directly with Peter Kriens, Rod Johnson,  Richard Hall, Glyn Normington, Bryan Atsatt and god only knows who from Google and the zillion other people from companies who represent various parts of this grand collective we affectionately know as the <em>Spice Industry<sup>tm</sup></em>.</p>

<p>And there in lies the nub of the problem.  As has been said by many before me, <em>"He who controls the Spice<sup>tm</sup>, controls the universe"</em>.  And what is quite clear from the conversation with Alex is that Sun believes it controls the <em>Spice<sup>tm</sup></em>.  And it's quite hard to argue with this fact.  One can look at the dead bodies strewn along the path of any number of previous JSRs and see how Sun dealt with technologies that predated the JSR in question, inspired the JSR in question and were gutted and left to die in the hot sun by the JSR in question.  Clearly, one can look at the writing on the wall and see much the same in the near future of OSGi.  Once something is in the JRE, any technology competing with it is toast.  End of story.</p>

<p>Consequently, Sun does not want to even give the impression that they are "negotiating" with OSGi, nor working with them in any form other than talking with the various members of this organization.  Whatever one may want to do as a spec lead, it's really the higher ups in the hierarchy of Sun that ultimately define the boundaries of interactions and it's rather clear that those boundaries do not include actual interaction with OSGi qua OSGi.  Thus, we're left with piece meal, bilateral negotiations between individuals which may work to improve things around the edges, but won't even come close to dealing with the weighty issues that are at the heart of the matter.</p>

<p>And so, while I think one has reason to be optimistic about things from a technical perspective, I think that optimism has to be seen in the perspective of the political realities.  The political realities of the situation are such that Sun will not give one iota and cross the line to deal with OSGi.  They simply can't do this politically.  Rather, we will continue to hear whining about how OSGi will not cross the line in the form of Peter Kriens and BJ Hargrave and fully work with the 277 expert group - an expert group which, from what anyone can tell isn't really a functioning expert group any more, given how it's gone completely dark and all the actual work is happening in the Java Modules project without much input from anyone else.</p>

<p>Consequently, however little light there may be between the technical solutions that may possibly be out there, I think the simple fact that Sun will continue to dig in their heels and hold onto control over the <em>Spice<sup>tm</sup></em>, which will essentially doom the entire project.  No, I'm not talking about dooming JSR 277.  It's quite obvious that Sun, controlling the JRE as they do, will be able to push through whatever they want despite any grumbling from the peanut gallery and the awesome push back all three readers of this blog will be able to generate.  Rather, what will be doomed is OSGi as we know it because Sun will basically add OSGi to the long list of dead bodies of other projects that JSRs have killed in the past.  It won't be done purposefully and won't be done because of the ego of individuals as has been suggested was the case previously.  Rather it will be done because of the egos of <em>organizations</em> who are unwilling or unable to come to the table and hammer these admittedly highly tractable technical issues out as a team - as peers.</p>

<p>Granted, I hope I'm wrong and lord knows I'm quite the pessimist on such matters.  But one doesn't have to put too pessimistic of an interpretation of the past wrt JSRs and the fate of external technologies that inspired them to see the progression into the future.  Whatever technical issues there may be are indeed solvable and perhaps trivially so.</p>

<p>But the politics - ah, the politics.  The politics will provide the mechanism to compensate for what individual egos perhaps accomplished in the past to screw things over.  The very fact that the JSR 277 expert group is essentially non functioning should be a warning sign that shouldn't be ignored.  The very fact that Alex is involved in complicated, tedious and no doubt highly time consuming multiplicity of bilateral negotiations should also be a warning sign that shouldn't be ignored.</p>

<p>Often, even with only the good intentions of everyone involved, things still go very badly.   Often, despite everyone wanting things to work out, the group interactions prevent these good intentions from being realized.  Perhaps JSR 277 will be the exception to the rule and we'll all get not only all the <em>Ponies<sup>tm</sup></em> we want but we'll each be given our own private Leprechaun with a personalized pot of gold to boot.</p>

<p>But count me extremely skeptical.</p>

<p>I'm sure that OSGi will be able to adapt and deal with whatever falls out.  And perhaps we'll all be better off after we pass through the fires to come.  Who knows.  Stranger things have actually happened.  But it's not looking like it's going to be a fun couple of years which is the way it should - in anyone's approximation of a realistic world - have worked out.</p>

<p><em>the sleeper must awaken</em></p>]]>
   </content>
</entry>
<entry>
   <title>Stanley Ho is Insane</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/05/stanley_ho_is_insane_1.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4357</id>
   
   <published>2008-05-30T15:43:04Z</published>
   <updated>2008-05-30T16:29:29Z</updated>
   
   <summary> Stanley Ho shows up for another meeting of the JSR 277 Java Modules Specification with a brand new versioning scheme Dear god, why are we subjected to such hubris? Stanley Ho, working on the Java Module System (formerly known...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<table class="image" align="right">
<caption align="bottom">Stanley Ho shows up for another meeting of the JSR 277 Java Modules Specification with a brand new versioning scheme</caption>
<tr><td><img alt="Stanley Ho shows up for another meeting of the JSR 277 Java Modules Specification" title="Stanley Ho shows up for another meeting of the JSR 277 Java Modules Specification" src="http://www.tensegrity.hellblazer.com/media/third-stage-guild-navigator.jpg" width="200" height="179" /></td></tr>
</table>Dear god, <a href="http://weblogs.java.net/blog/stanleyh/archive/2008/05/versioning_in_t_1.html">why are we subjected to such hubris?</a>  

<p>Stanley Ho, working on the Java Module System (formerly known as JSR 277) has decided that Sun is so smart that <em>they need to invent yet another versioning system</em>.  Now, maybe Stanley Ho really is a super smart dude who makes me look like I was a fifth rate, multiple generation inbred dufus from the white trash mountains of Virginny (many, many people have actually pointed that <em>I actually am</em> a fifth rate, multiple generation inbred dufus from the white trash mountains of Virginny, but I digress), but it seems to me that it is <em>self evident</em> that versioning is what we in the business know as a <em>HARD PROBLEM<sup>tm</sup></em>.  And to think that someone even as super intelligent as those people at Sun are known to be will come up with a scheme that doesn't have any unintended consequences that were not foreseen by even their <em>Spice<sup>tm</sup></em> enhanced brains is simply something that I think you'll find many in this industry simply can't conceive.</p>

<p>There <em>will</em> be bugs in what Stanley has designed.  There <em>will</em> be unintended consequences.  It will only be after years of serious use and abuse by many hundreds of thousands of developers in <em>real world</em> situations that even the <em>Spice<sup>tm</sup></em> enhanced mind of Stanley Ho hasn't dreamed of will the full extent of his hubris become clear.</p>

<p>One might ask the question: "Why, Stanley, didn't you use the OSGi versioning scheme?".  </p>

<p>&lt;crickets chirping&gt;</p>

<p>This shit is hard.  This path is fraught with peril.  In the 21st century, we simply don't go around inventing shit for the hell of it simply because we can.  We <em>reuse</em> existing things even though they might not be the correct shade of purple we were dying to have.  Simply because the corners are a bit worn.</p>

<p>The absolute last thing we need from Sun in the Java Modules is Yet Another Brilliant Sun Shiny Invention that we'll have to suffer though for years until all the bullshit is extracted from the hubris that went into creating.</p>

<p>Geebus.  Please.  Dear God.  Please. </p>

<p>Stop the madness.  Someone please hold an intervention with these people.  The industry simply cannot stand to have this crap thrown at them, especially in something as fundamental and as far reaching as the <em>frickin' base Java module system.</em></p>

<p>See <a href="http://www.osgi.org/blog/2008/05/is-9903520300447984150353281023-too.html">Peter Krien's rant on the hubris that is Stanley Ho</a>.</p>

<p><em>Sometimes a turd is just a turd</em></p>]]>
      
   </content>
</entry>
<entry>
   <title>Event Driven Cage Match: Predator/Prey</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/05/event_driven_cage_match_predat_1.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4356</id>
   
   <published>2008-05-26T20:19:03Z</published>
   <updated>2008-05-28T21:01:33Z</updated>
   
   <summary>So I finally have what I consider to be the minimum - bare minimum, mind you - bar of the 3rd Space gaming framework finally passed. What I have working is a Predator/Prey simulation using the Boid rules for modeling...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
         <category term="3rd Space" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Event Driven Simulation" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p>So I finally have what I consider to be the minimum - bare minimum, mind you - bar of the 3rd Space gaming framework finally passed.  What I have working is a Predator/Prey simulation using the <a href="http://www.red3d.com/cwr/boids/">Boid rules for modeling flocking behavior</a>.  Boids were invented by Craig Reynolds to model the flocking behavior we see in birds, fish and other herd animals.  The rules in Boid are actually butt simple and all local - i.e. simulating the flocking behavior only relies on the emergent behavior of the individual's action, not some "higher authority" guiding the individuals, keeping them in formation.</p>

<p>In any event, what you find if you look for any Java code which implements Boids, the seeming universal implementation is to actually keep a global list of the boid positions - i.e. an implicit "global" which really shouldn't be present.  The reason why this is so is, of course, because <em>Area Of Interest</em> management (AOI, for short) is a tough thing to do, even if you are simply running the simulation in a single process.</p>

<center><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/vExZb0TkP9k&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/vExZb0TkP9k&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>></center>
<center><em>Predator/Prey Boids, using Voronoi based AOI management in an event driven simulation</em></center>

<p>I really needed a non trivial simulation to use as the driver test case for the 3rd Space gaming framework I've been working on.  Flocking behavior is, as one expects, quite common in games and is something that the human players do quite frequently as well - they don't call humans sheep for nothing.  As it turns out, managing the area of interest for simulated entities and human's avatars is rather difficult precisely because of this tendency to flock.  Moving, flocking simulated entities is therefore the de facto test case that one should be using as a model when developing the basics of a large scale, distributed simulation and gaming infrastructure - i.e. if you can't handle this, then you have no hope of handling anything more complicated.</p>

<center><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/sPs0aV21pf8"></param><embed src="http://www.youtube.com/v/sPs0aV21pf8" type="application/x-shockwave-flash" width="425" height="350"></embed></object></center>
<center><em>Same as above, revealing the voronoi overlay used to maintain AOI.</em></center>

<p>So, it's kind of cool.  I now have a non trivial simulation which runs under both the event driven framework and makes use of the voronoi based AOI management.  Next step is to now distribute the simulation using Coherence so I can see how well my theories of how to massively scale this framework will work.</p>]]>
      
   </content>
</entry>
<entry>
   <title>Event Driven Autonomic Management - The First Cut Is the Deepest</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/05/event_driven_autonomic_managem_2.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4353</id>
   
   <published>2008-05-15T05:09:12Z</published>
   <updated>2008-05-15T15:11:58Z</updated>
   
   <summary><![CDATA[(Part I - Preliminaries, Part II - The Long Kiss Goodnight) &lt;sigh&gt; Sorry. I tend to talk more about the surrounding atmosphere than the thing itself. In this post I hope to remain focussed and actually discuss the actual meat...]]></summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
         <category term="Distributed Systems" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Event driven autonomic management" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Management" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p><em>(<a href="http://www.tensegrity.hellblazer.com/2008/04/event_driven_autonomic_managme_1.html">Part I - Preliminaries</a>, <a href="http://www.tensegrity.hellblazer.com/2008/04/event_driven_autonomic_managem.html">Part II - The Long Kiss Goodnight</a>)</em></p>

<p><img alt="first-cut.jpeg" src="http://www.tensegrity.hellblazer.com/media/first-cut.jpeg" width="128" height="130" align="right"/>&lt;sigh&gt;  Sorry.  I tend to talk more about the surrounding atmosphere than the thing itself.  In this post I hope to remain focussed and actually discuss the actual meat of the architecture and the skeleton upon which it is based.  Apologies for not providing the color and fluff of life that actually surrounded the process ;)</p>

<p><strong>Point 1</strong> <em>Humans are good at making declarative statements and woefully incompetent at micromanagement.</em></p>

<p>This is one of those points that one shouldn't have to make, but the simple fact that bears repeating is that Humans are really good at figuring out what <em>should</em> be done, but really shitty at actually - you know - <u>doing</u> what they think should be done.  In keeping with the spirit of the theme of this post, I leave it to the reader to reflect upon the profound reality that it is far easier to see the goal than the path to it.  The profound insight I have (not singular, as I'm sure you're aware) is that a management system which caters to the micro-manger who actually is competent at orchestrating a complex series of transformations under chaotic conditions are few and far between - so rare as to be non-existent to several orders of approximation (or so expensive, which amounts to the same thing).</p>

<p>The take away is simply that any system which depends on a human to do the actual work is simply not going to work - by definition.  Seeing as how this is one of my premises, it's not something I can really argue.  It's a premise derived by years of observations of not just other humans but also myself.  Again, I'm not making the claim that there are not humans who are absolutely brilliant at micro-managing large scale distributed systems - let's be <em>crystal</em> clear on that point.  No.  My point is simply that these people are incredibly rare and you - the actual person paying the price - will have to pay through the nose if you find such a person.  And, quite frankly, the chances of you actually finding such a person is so miniscule as to be almost unmeasurable.  Most likely, what you'll do is find someone who claims to be such a person or someone whom someone you trust claims to be such a person.  And the odds are overwhelmingly that you are just a complete maroon and have been hoodwinked into paying a lot of money for a cheap imitation of such a being.  Get used to it.  It's just a simple fact of reality.</p>]]>
      <![CDATA[<p><strong>Point 2</strong> <em>Centralized systems simply suck</em></p>

<p>Again, this is simply one of things that shouldn't have to be mentioned, but we live in the age when the Uber Web2.0 crowd can't seem to scale their fantastic money making ideas and blame the language for their failings as architects.  So it's a fact worth repeating: <em>anything centralized is limited in its ability to scale</em>.  Given the realities that most things don't need to scale (i.e. no one is going to use your stupid Web2.0 application <em>anyway</em>), it's simply no surprise that this seemingly basic fact of reality remains the province of high priests and those who walk in the light (fun fact: <em>"He who walks in the light"</em> is the <u>literal</u> translation of my name).</p>

<p>From this assertion, we can derive that any architecture which relies upon centralized control is an architecture which simply won't scale - QED.  Again, seeing as how many things don't actually <em>need</em> to scale, this really isn't a problem that comes up in the bulk of most people's experience.  However, when it actually does come up - i.e. when you have an actual <em>scalability</em> problem - it bites you so hard in the ass that it's almost like a near Death experience.</p>

<p>And look around you.  Find a single management architecture which <em>does not</em> reduce to a centralized, "spider in the middle of the web" architecture.  Go ahead.  I'll wait.  Shit, I'll give you a year to come up with 3 of them.   I doubt you can name 2.  Personally, I know of at least four, but that's just me.  Two of these are academic, one is actually released into the wild as open source and then there's mine.  But hey.  I live a sheltered life. Perhaps decentralized configuration management and provisioning architectures are common as fleas in the De La Pulgas land grant here in the SF Bay area...</p>

<p><strong>Point 3</strong> <em>Management systems should be pattern driven via events rather than command driven</em></p>

<p>This really follows trivially from the first two points.  A management system which is managing a large scale distributed system (or, I would claim, even a <em>small scale</em> distributed system) really is a goal driven system which reacts to events rather than smugly issues commands which are largely irrelevant at the time they were issued.  The mistake I believe a lot - hell, <em>all</em> - management systems make is that they have the hubris in believing that that the commands they issue are a) relevant and b) will be followed.</p>

<p>Distributed systems are exceedingly complex environments in which the main goal is simply to adapt to the current <em>environment</em>.  Not to be redundant, but this hearkens back to my very first point in that you should <em>declare</em> what you <em>want</em> to come about, not <em>decree</em> by fiat what commands will be followed.  Think about it.  The moment that the command has passed your conscious thought process and has been (successfully!) entered into the management system, the massively distributed system you're trying to tell what to do has changed - almost always dramatically - under your feet and is <em>no longer the same system</em> that you were dealing with when you issued your command.  Sorry, but you're going to have to let that sink in a bit because it's a really important point: <bold>the system that is reacting to your commands is not the system you gave the command to.</bold>  It's just a simple fact of physics - something that Einstein figured out almost 100 years ago working as a patent clerk in some 2nd rate country.</p>

<p>So these three points are the three driving points in what I call <bold>Event Driven Autonomic Management</bold>.  Maybe it's old hat to such wizened sages as those who read my blog, but it's hard won knowledge spanning several decades for me.  In my next post on the subject I'll take these three principles and lay out a rather simple architecture which satisfies these principles and provides an autonomic, goal seeking system which reacts to high level commands by asymptotically approaching the high level goals on wildly dynamic and unruly systems which - I claim - is the reality of modern distributed management and provisioning systems we currently face. </p>]]>
   </content>
</entry>
<entry>
   <title>Integration of Thoth and Prime Mover</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/05/integration_of_thoth_and_prime.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4351</id>
   
   <published>2008-05-13T17:50:47Z</published>
   <updated>2008-05-15T06:47:52Z</updated>
   
   <summary>Over the weekend, I worked on getting the Thoth voronoi based area of interest management integrated into the Prime Mover event driven simulation framework. This integration required me to actually come up with how the Thoth perceptrons (i.e. the entity...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p>Over the weekend, I worked on getting the Thoth voronoi based area of interest management integrated into the Prime Mover event driven simulation framework.  This integration required me to actually come up with how the Thoth perceptrons (i.e. the entity responsible for the AOI management) interacted with the simulation entity the perceptron was working for.  Not really a big deal by any measure, but it was on my to do list.  The actual integration into Prime Mover was simply the adding of the @Entity annotation which indicates that instances of the class are simulation entities and viola, it's a simulation.  I had purposefully designed the Node interface protocol to conform to the event constraints, so no changes were required.  However, the simulation did require that there be a disconnect between the nodes, themselves, and the representation of the neighboring nodes that each node has.</p>

<p><br />
<center><object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/i6pwFjG7qdk"> </param> <embed src="http://www.youtube.com/v/i6pwFjG7qdk" type="application/x-shockwave-flash" width="425" height="350"> </embed> </object></center><br />
<center><em>Not sure why this is so choppy, as the video seems to move in 1 second increments.  My first time with YouTube, so who knows...  Rest assured, the actual animation is smooth as silk...</em></center></p>

<p>In the original VAST model, this was done by the P2P network emulation which essentially serialized the nodes and reconstituted them when the P2P messages were received.  I really, really hated the whole P2P emulation framework that was there and completely eliminated it in the integration.   The message processing was problematic and caused me unnecessary pain and suffering in the actual simulation of the protocol anyway.  Seeing as how I'm going to be using Coherence under the covers to make this puppy work, that means I'm going to have a different mechanism for communication anyway - the network model in VAST was way off base for what I had in mind.</p>]]>
      <![CDATA[<p></p>

<p>Further, one of the practical drivers for getting the Thoth/Prime Mover integration was simply so that I could actually <em>simulate</em> the AOI maintenance protocol so I could see what the heck was going on under the covers and verify/debug the actual behavior under more realistic scenarios that I was interested in.  If you watch the <a href="http://www.tensegrity.hellblazer.com/2008/05/scalable_interest_management_a_1.html">previous Thoth Applet</a>, or even the original VAST demo applet, you'll see flaws in the system where there are red dots without a blue circle around them.  This flaw indicates that the selected node thinks the neighbor is at position X when the node in question is at position Y.  Trying to debug this was a nightmare and I wasn't sure if these flaws were simply the way things were in the protocol or if they were simply an artifact of the way the messages were processed in the demo code - if you take a look under the hood, you'll see it's kind of cheesy.  Basically, each node processes all its messages until done and then on to the next node to do the same.  Hardly what actually happens in a real system.</p>

<p>So, enter event driven simulation.  All the messages between the perceptrons are - you guessed it - events.  I built a small wrapper class which provides the same kind of indirection between the nodes that a network provides.  This Node class simply posts events to the actual perceptron it wraps.  Very simple and very elegant.  Now, in the wrapper class, I just add a random number generator which provides network jitter by "sleeping" a random time before posting the event, and viola.  A complete simulation of the system.  Now I just moved the previous simulation behavior into a simple simulation entity and attached the sims to the perceptrons and now I have a self driven simulation.  I can perform far more complex simulations using think time, etc and because I'm using event driven simulations, I can - naturally - perform the simulation in a fraction of the "real time" it would take to run the same thing computationally.  Sweet.</p>

<p>In the process, I added a pretty nice JUnit testing framework for the Prime Mover simulation framework.  Given that Prime Mover has to actually perform byte code surgery on the classes making up the simulation, it was extremely awkward to have to use reflection to deal with the class loader barrier.  So, I borrowed the same technique we use in the Spring-DM framework to run JUnit tests inside the OSGi framework - basically a clever bouncing and reloading of the JUnit test case between class loaders.  It was far simpler in the Prime Mover case as I have common classes between the class loaders in question.  The result is pure bliss, though, as I can now deal directly with the simulation entities, classes, etc without having to interact with them through reflection.  Quite cool and something that will obviously come in quite handy as I do more work with Prime Mover.</p>

<p>Also, I wanted to change the demo applet to actually use this now simulation driven AOI system.  This involved significantly less surgery than I expected and the result is very nice.  I simply added a new stepping simulation controller which allows me to advance the simulation until all the current events are consumed.  This works out quite nicely as even the drawing operations are actually triggered by events in the simulated entities - a milestone I thought I'd have to wait for.</p>

<p>In any event, the next step in the process is a lot easier now.  I have a very nice predator/prey simulation based on the Boid flocking model - complete with graphics - and I'm going to take the Thoth AOI framework and recast the predator/prey simulation under Prime Mover using Thoth AOI for the simulated predators and simulated prey as their mechanism for interacting/discovering the neighbors they need to interact with.  Accomplishing this will be a major milestone in the long and winding path to the full vision of 3rd Space as this system will show all the major components working in harmony.  After this is accomplished I can next move on to getting the system to run on top of Coherence where I can then work on the actual scalability experiments, running the whole system on Amazon's EC2.</p>

<p>Stay tuned.  It should be fun.</p>]]>
   </content>
</entry>
<entry>
   <title>Scalable Interest Management and Load Balancing for MMOG</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/05/scalable_interest_management_a_1.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4349</id>
   
   <published>2008-05-04T21:15:05Z</published>
   <updated>2008-05-07T18:10:57Z</updated>
   
   <summary> When you&apos;re trying to build a massively multiplayer online gaming platform (MMOG), probably the most important part of the system is scalability. After all, if it doesn&apos;t scale, it&apos;s simply a multiplayer online gaming platform - without the &quot;massive&quot;....</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
         <category term="3rd Space" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Distributed Systems" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Event Driven Simulation" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<img alt="voronoi-network.gif" src="http://www.tensegrity.hellblazer.com/voronoi-network.gif" width="285" height="291" align="right"/><p>
When you're trying to build a massively multiplayer online gaming platform (MMOG), probably the most important part of the system is scalability.  After all, if it doesn't scale, it's simply a multiplayer online gaming platform - without the "massive".  While it almost seems embarrassing to point this out, it's extremely interesting to note that there have recently been a lot of discussion about scalability of online systems - in particular, the Web 2.0 applications.  I won't point to these discussions, but suffice it to say that I find it terribly amusing to hear the various forms of the argument that you can worry about scalability later - i.e. it's not something that has to be designed in from the start.  <em>(Arguments of the form "don't worry about scalability because no one is going to use your application anyway" are perfectly fine, however)</em>.  As the history of MMOG has shown, the application's architecture has a <em>huge</em> impact on the ability to scale.  As many gaming platforms have discovered, scalability isn't something you can simply "add on" after you "get things right".  Anyone who thinks that this doesn't apply to other network application architectures amuse me to no end, given as if they actually produce something of value, it will fall over when it hits the natural scalability limit of their crappy architecture.</p>
<p>
In any event, there's a couple of basic problems with MMOG that limit scalability.  The first has to do with what is known as <em>"Area Of Interest"</em>.  The idea here is familiar enough to anyone who has done any distributed communication in that the gaming platform doesn't want to find itself in an N<sup>2</sup> connection topology.  In MMOG, the entities (gamer avatars, NPC, etc) have to communicate with other entities in the game.  If you can't find a way to limit the communication to the entities in the area of interest - i.e. the other entities that the entity in question is limited to communicating with - then you have a huge scalability issue due to sending messages to entities that simply don't care about the communication because it can't possibly affect them.  This not only wastes bandwidth and precious OS network resources but causes a host of other issues having to do with the time ordering of distributed events and filtering our events that aren't relevant.  It's a mess.</p>
]]>
      <![CDATA[<p>
Area of interest management is complicated by the fact that the entities in the game don't stand "still".  They move around the virtual world.  This means that you can't simply statically calculate what the relevant entity neighborhood should be.  Even worse, due to flocking behavior, there's the really nasty issue of crowding in virtual worlds - where you have large populations of entities within small areas (moving, I might add). </p>
<p>
As you might expect, there's been a lot of active research in this area.  I've spent a non trivial amount of time over the last six months or so pouring through the research and seeing if I could find anything that wasn't lame that worked the way I thought it would.  I won't review the literature here, as the papers I'm going to site already do a good job of reviewing the various ways of trying to deal with interest management in MMOG.</p>
<p>
The second problem that I mentioned - that of load balancing - is closely related to the problem of interest management.  The idea here is that you need to split up your processing load across your population - dynamically - so that you aren't trying to host 100,000 entities on one CPU and distributed the rest of the 50,000 entities across 100 CPUs due to flocking.  It's a dynamic problem due to the movement of the entities which changes the interaction patterns as time progresses.</p>
<p>
In any event, what I've been playing with over the past week or so is a rather elegant and butt simple mechanism for solving both issues - i.e. interest management and load balancing.  The idea is very simple, being based on the use of Voronoi division of the virtual world to create a P2P overlay network between the various entities.  You can find all <a href="http://vast.sourceforge.net/publication.php">the papers here at their site</a>, a good intro paper is <a href="http://vast.sourceforge.net/docs/pub/2006-hu-VON.pdf"><em>VON:AScalablePeer-to-PeerNetworkforVirtualEnvironments</em></a>.</p>
<p>
While I still have a ways to go on the project, what I have done is taken their 2006 Java demo code and refactored the hell out of it.  I mean, geebus.  C++ programmers seriously don't know much about OO programming.  I mean, it's not just a "programming in another language" issue - I've seen their C++ code as well.  Basically I just think that C++ doesn't encourage OO and consequently not many of the people who learn OO via C++ actually end up learning OO.  Having said that, I do note that they do understand the interest management problem and have come up with a very excellent solution.</p>
<p>
A key aspect of the code is the calculation of the Voronoi domains and this is done with a Java translation of the <em>de facto</em> algorithm: Steve Fortune's algorithm in C++.  This is pretty much the <em>only</em> Java translation of this algorithm I've been able to find, so that fact alone allows me to completely forget and forgive the absolutely crappy OO design of the system.  I've cleaned up that code as well, but haven't gone into a big refactoring frenzy on its ass because it works and quite frankly I'll hire someone to do this if it ever becomes a problem - there were just certain things I had to do to the Java implemenation and there were other certain things that I couldn't - quite frankly - allow to exist in source that I actually make use of... :)</p>
<p>
In any event, being an LGPL'd source code, I've also made my results public domain using the LGPL license as well.  You can <a href="http://tensegrity.hellblazer.com/code/thoth-distribution.zip">download both the source and the binaries here</a>.  This includes, naturally, the Java version of Steve Fortune's Voronoi domain generator.</p>
<p>
Below is a nice Java applet that I also rewrote which they provided as a demo of how the system works.  My changes are to make the demo deterministic through a constant seed of the random generator and to make the simulated behavior a bit more realistic than their previous version had done.</p>
<p>
There's obviously some problems with this initial algorithm that they seem to have taken care of in latter versions of the protocol, and I'm actually adding tests to the system so I can verify the behavior.  But it's a fantastic start at a system which promises to solve two extremely nasty problems in MMOG and allow me to continue on with my <em>Third Space</em> project.</em></p>
<p><b><u>Java applet demo</u></b>&nbsp&nbsp<font size="2">(compiled with <a href="http://java.sun.com/javase/downloads/index_jdk5.jsp">Java 5.0</a>)</font><ul> 
<font size="2">click on the applet then press <font color="red"><b>'ENTER'</b></font> to start...&nbsp&nbsp&nbsp(<a href="#Controls">other key controls</a>)</font><p>
</ul><center>
<form method="post" action="http://www.tensegrity.hellblazer.com/2008/05/scalable_interest_management_a_1.html">
<table width="450" style="font-size: smaller" border="0" cellspacing="2" cellpadding="0">
<tr><td><b>Parameters:</b> </td>
    <td align="right">X dimension</td>   <td><input type="text" size="3" maxlength="3" name="dim_x"  value="450 "></td>
    <td align="right">Node size</td>     <td><input type="text" size="2" maxlength="2" name="node_size"  value="25 "></td>
    <td align="right">AOI radius</td>    <td><input type="text" size="3" maxlength="3" name="aoi_radius" value="200"></td></tr>
<tr><td>&nbsp</td>
    <td align="right">Y dimension</td>   <td><input type="text" size="3" maxlength="3" name="dim_y"  value="450 "></td>
    <td align="right">Connection limit</td><td><input type="text" size="2" maxlength="2" name="conn_limit" value="12"></td>
    <td align="right" colspan="2"><input type="submit" value="re-submit" name="submit"></td></tr>    
</table>
</form>
<applet name="P2P Perceptron Demo"
        code="com/hellblazer/thoth/demo/PerceptronDemo.class"        
        archive="http://tensegrity.hellblazer.com/code/thoth-1.0-SNAPSHOT.jar"        
        width="450" height="450">
        
<param name="node_size"         value="25 ">        
<param name="connection_limit"  value="12">
<param name="aoi_radius"        value="200">
<param name="dimension_x"       value="450">
<param name="dimension_y"       value="450">
</applet>
</center><br>
<a name="Controls">
<b>Controls</b>: (need to first click on the applet for key-press to be effective)
<UL><table style="font-size: smaller">
<tr><td width="100">ENTER:</td><td>pause/resume</td></tr>
<tr><td>SPACE:</td><td>next step</td></tr>
<tr><td>left-click</td><td>select node to view</td></tr>
<tr><td>'F':</td><td>toggle "follow mode"</td></tr>
<tr><td>'E':</td><td>toggle "Voronoi edges"</td></tr>
<tr><td>'O':</td><td>restore viewport to origin</td></tr>
<tr><td>'A':</td><td>toggle "AOI-radius"</td></tr>
<tr><td>'G':</td><td>toggle "global nodes"</td></tr>
</table>
</UL>]]>
   </content>
</entry>
<entry>
   <title>JPIE - To Infinity and Beyond!</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/04/jpie_to_infinity_and_beyond_1.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4345</id>
   
   <published>2008-04-17T19:47:27Z</published>
   <updated>2008-04-17T22:12:03Z</updated>
   
   <summary>Okay, I have to confess that I didn&apos;t think I was taking Bob to the woodshed in my response to his response to my interminable screed. But he&apos;s a good sport (haven&apos;t spotted any wolf packs nipping at my heels,...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p><img alt="pie.gif" src="http://www.tensegrity.hellblazer.com/media/pie.gif" width="273" height="163" align="right"/>Okay, I have to confess that I didn't think I was taking Bob to the woodshed in my <a href="http://www.tensegrity.hellblazer.com/2008/04/the_french_have_no_word_for_en_1.html">response</a> to his <a href="http://theabstracttruth.wordpress.com/2008/04/17/java-platform-infrastructure-edition-part-2/">response</a> to my <a href="http://www.tensegrity.hellblazer.com/2008/04/going_against_the_flow_crossin_1.html">interminable screed.</a>  But he's a good sport (haven't spotted any wolf packs nipping at my heels, yet) and follows up the initial serve with some good points worth thinking about.</p>

<p>One of things that Bob throws out in his post is a rather interesting product called <a href="http://www.zeroturnaround.com/javarebel/">Java Rebel</a> that bears watching.  It seems like very interesting technology and I'm quite curious as to what it looks like under the covers.</p>

<p>But going to the meta point that Dr. Pasker seems to be pointing at, I just happened to read a rather interesting article who's topic seems quite germane to the discussion at hand: <a href="http://erikengbrecht.blogspot.com/2008/04/multiprocess-versus-multithreaded.html">Multiprocess versus Multithreaded...or why Java infects Unix with the Windows mindset</a>.  I highly recommend anyone interested in this kind of stuff read that post as I think it does speak to the heart of the issue.</p>

<p>One of the eternispecs has been the <a href="http://www.bitser.net/isolate-interest/papers/bryce-05.04.pdf">Java Isolate spec</a> - JSR <a href="http://jcp.org/aboutJava/communityprocess/final/jsr121/index.html">121</a>.  It's always garnered a lot of interest and at one time, some sound and fury was directed towards it.  But it's something that has yet to find its way into the outside world.</p>

<p>Between the two topics above - Java as a Windows mindset and Isolates - I think that one can get a pretty clear picture of what's going on and where the essential issues lay.  The problem is simply that we've effectively eliminated the process out of the Java model without providing the required support within the model for the work that we'd like to do which is desperately seeking a process model.</p>]]>
      <![CDATA[<p><br />
Back in the day, one of the projects I did was the rather mutant Java application server which ran in House Harkonnen's database.  For those of you who don't remember the beast, let me stress that the model was rather different than what you find in modern application servers - thus the reason why it failed miserably.  The model was that the actual Java VM ran in the database session.  The great thing about this model was the isolation given to the running Java application.  You could manage all of its resources precisely and do all sorts of neat stuff with it.  The bad thing about it the model was the isolation given to the running Java application.  See, it turns out that pretty much All Computing Is An Exercise In Caching<sup></em>tm</em></sup> and consequently having the level of isolation between users and applications that we had in this application server drove programmers nuts - literally as some had to check into the emergency room after a week long beta camp.</p>

<p>One of the things we had to solve in this Java VM which ran in the database was that with this level of isolation - remember, the VM ran in the database session and had the same isolation semantics as a database session - was the sharing of what amounted to read only data between all the instantiations of the VM.  In my case, I was starting up a VM and bringing to life Servlets and EJBs out of nothing in response to the first connection of a user.  What we found is that the vast, vast bulk of the time we were spending on spinning up the VM was all the constant, read only data.  Java, as it turns out, doesn't have CONST and consequently has to cons up a huge amount of crap just to get the system up n' running - for example, every Locale known to humans, whether you needed them or not.  And so, to make a long story short, we created the concept of shared, read only objects that we could share between invocations.  It sped up start times dramatically, but still didn't solve the sharing problem we had between users.</p>

<p>So, this terrible experience of building something that was a complete flop left me with emotional scars too terrible to contemplate, but also provided me with a healthy respect for the issues involved in creating the kind of isolation that we all seem to crave in this infrastructure community.</p>

<p>Myself, I've come to believe much more in the Unix Process model camp than I do in the Microsoft Windows Thread camp - although I am certainly not someone who could speak with authority on the final word on this subject, by any means.</p>

<p>A couple of issues I think need to be brought up with respect of where we currently are in Java.  The first is the hopefully obvious fact that we didn't know what we were doing when we built the concept of the Java application server, ensconced as it were in the J2EE specification.  Being one of the guys who was responsible for the first version of the spec, I can personally witness to the confusion and stupidity (and I mean that in the nicest way) we all brought to the table in building that specification.  I mean, you look back at the history of J2EE and the first thought I usually have is <em>"My God, what have I done?"</em> (to quote David Byrne).</p>

<p>However, luckily I believe that we have far better models today.  Most notably, the OSGi model.  I've given a long talk on OSGi (which really only scrapes the surface of this wonderful spec), and this post is already longer than a blog post should ever be, so I won't reproduce it here.  But one thing that should stand out is that OSGi was designed - from the ground up - to do some of the kinds of things that Bob is talking about.  I'm not sure of what kind of technology <em>Java Rebel</em> is using under the covers, but I can tell you that we can already do this in OSGi containers today.  The OSGi Bundle is a set of java classes and resources that has a true lifecycle, meaning that you can cycle it out of the container quickly and update it with a new version transparently.  Seriously cool stuff that's really only the tip of the ice berg...</p>

<p>Jeesh... This post is way, way too long so I'll leave things here where they stand and start to think about responding to what I thought I was actually going to talk about wrt transactional memory, thread control, etc., in the next post on the subject of JPIE.</p>]]>
   </content>
</entry>
<entry>
   <title>Nice little gem - JNA</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/04/nice_little_gem_jna.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4343</id>
   
   <published>2008-04-16T14:28:35Z</published>
   <updated>2008-04-16T14:34:54Z</updated>
   
   <summary>Just found the Java Native Access library for dynamic access to native libraries without JNI. Sweet. Had been using the JNI wrapper, which provided similar functionality, (but cost money and had licensing encrustations) previously. Glad to see this available as...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p>Just found the<a href="https://jna.dev.java.net/"> Java Native Access library</a> for dynamic access to native libraries without JNI.  Sweet.  Had been using the JNI wrapper, which provided similar functionality, (but cost money and had licensing encrustations) previously.  Glad to see this available as it makes it far easier for me to start integrating with C based physics engines (<a href="http://www.ode.org/">ODE</a>) and 3D gaming engines (<a href="http://www.ogre3d.org/">OGRE</a>) in the 3rd Space project.</p>]]>
      
   </content>
</entry>
<entry>
   <title>JSR 277 - Mostly Harmless or a Good Thing For OSGi?</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/04/jsr_277_mostly_harmless_or_a_g.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4342</id>
   
   <published>2008-04-15T19:17:56Z</published>
   <updated>2008-04-15T19:26:52Z</updated>
   
   <summary>Bryan Atsatt, who is House Harkonnen&apos;s representative on the JSR 277 expert group, has been doing a lot of work trying to bring the two warring parties together and not simply salvage the relationship but to turn the momentum around...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p><img alt="newClash-730586.jpg" src="http://www.tensegrity.hellblazer.com/media/newClash-730586.jpg" width="250" height="253" align="right"/>Bryan Atsatt, who is House Harkonnen's representative on the JSR 277 expert group, has been doing a lot of work trying to bring the two warring parties together and not simply salvage the relationship but to turn the momentum around and spark a new found friendship between the two.</p>

<p>His first post on his new blog is dedicated to this premise, <a href="http://atsatt.blogspot.com/2008/04/jsr-277-could-be-great-for-osgi.html">JSR 277 Could Be Great for OSGi</a><blockquote><em>The initial spec actually has two separate parts: an api/framework, and an implementation with a new distribution format. Unfortunately, these are presented in a way that seriously blurs the distinction. Worse, the new distribution format (".jam" files) often takes center stage.</p>

<p>The emPHAsis is on the wrong syLLAble.</p>

<p>The api/framework layer must be the primary focus of the JSR 277 specification, providing a coherent compile/runtime model that enables multiple implementations. Specific implementations, while required to surface framework/api issues, should be documented in appendices or even separate specs.</p>

<p>If the EDR spec had been written from this perspective, we probably would have avoided most of the current animosity. We can and should fix this in the next draft release. Implementations can then be seen on equal footing. More importantly, they can be left to compete on their own merits.</p>

<p>Not everyone wants or needs OSGi, and the new .jam implementation may be right for them.</p>

<p>But we know that there will be LOTS of bundles around when SE 7 ships, vastly outnumbering .jam files, so we need an OSGi implementation. ASAP. Built by OSGi insiders. Without it, we cannot have confidence that the api/framework abstractions are right or complete. With it, we not only gain spec validation but have a ready-made solution for using bundles on SE 7.</em></blockquote>Give it a read.</p>]]>
      
   </content>
</entry>
<entry>
   <title>The French Have No Word For Entrepreneur</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/04/the_french_have_no_word_for_en_1.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4341</id>
   
   <published>2008-04-15T03:46:26Z</published>
   <updated>2008-04-15T05:24:18Z</updated>
   
   <summary>So Bob Pasker has a typically thoughtful response to my post regarding the changes I&apos;ve made to the infrastructure of the Prime Mover simulation framework. The regaling of my adventures reminds him of his conclusion that Java is a lousy...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
         <category term="Programming Tools" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p>So Bob Pasker has a typically thoughtful response to my post regarding the changes I've made to the infrastructure of the Prime Mover simulation framework.  The regaling of my adventures reminds him of his conclusion that <em><a href="http://theabstracttruth.wordpress.com/2008/04/14/a-system-programming-language-variant-of-java/">Java is a lousy language for building infrastructure</a></em>.</p>

<p>It's something that I never really thought about, personally.  It's not that I haven't cursed Java for some reason or another on a continual basis since I started programming in it.  But that's always the way it is when you're pushing the limits of what a language is capable of and what a system is designed to do.  You love to hate it and the very fact that it fights against you as you bend, fold and mutilate it, in the process of violating the warranty is just our way of saying that we really love it - really, we do.  Sure, it's not a healthy relationship, but then again, specializing in these kinds of things has never really been healthy.</p>

<p>Now, I must say that, in defense of proposition that Java as a <em>fantastic</em> language for building infrastructure, that the "pain and suffering" I experienced (not really, but I know it looks that way from the outside) in the refactoring of the guts of the Prime Mover infrastructure really didn't have anything to do with the shortcomings of Java as an infrastructure programming language <em>per se</em>.  Indeed, the primary library that I've made use of in this project, the <a href="http://asm.objectweb.org/">ASM byte code engineering framework</a>, has proven to be a superlative tool for doing precisely the kind of stuff that Bob reminisces about WRT the days of the wild, wild west - back when we had to wrangle byte codes with our bare hands and force them to our will using nothing more than our teeth and a screwdriver.</p>

<p>Rather, all the issues I documented wrt Prime Mover have been problems of my own making - in the end, I'm always the worst enemy I have.  Far outstripping any puny terror and punishment that Guy Steel or the hordes of Orc programmers over at JavaSoft can dish out.</p>]]>
      <![CDATA[<p>Regardless of how it sounded, the problems I had really didn't have anything to do with the lack of sophisticated and useful tooling or frameworks.  As I've mentioned, the ASM framework is quite sophisticated and provided a stunning environment which allowed me to produce the system.  Looking back ten years and thinking about the tools we used back then to do stuff that isn't nearly as complicated...  well, there's simply no comparison.</p>

<p>The mechanics of transforming the byte codes and bending them to my nefarious plans never was the issue.  Instead, the problem was what I was actually trying to do.  ASM, rather than getting in my way and limiting what I was able to do, provided me with not only a simply amazing transformation framework, but also supplied the analysis tools that gave me the mechanisms to figure out what needed to be done, where and so forth.  The tooling and frameworks weren't the issue.</p>

<p>At the heart of the problems I imposed on myself was the rather large mistake of trying to be too clever by half and remove the proxies from the picture.  Doing this vastly complicated the issue and actually forced me to solve a far, far harder problem - i.e. discovering precise type information in the data flow of the code I wanted to transform.  If it was easy to solve this problem, then we wouldn't need HotSpot or any other advanced VM technology - we'd already have the fine grained type information needed to do all the optimization compiler technology would allow us to do.</p>

<p>Once I had eliminated that blind spot caused by my poor initial architectural choices, the code become dramatically less complicated and simultaneously more robust in the process.  The capabilities of the system also grew, solving some nasty dangly bits that I hadn't realized were hanging there, waiting for the cat to start swinging at them when I wasn't looking.</p>

<p>Now, this isn't to say that things couldn't be better.  Things can <em>always</em> get better.  But when I look around at the alternatives, I can't help but consider myself to be extremely lucky.  We're far from perfection, to be sure.  But I'm doing things that are literally impossible in other languages and/or face insurmountable difficulties because of either the lack of maturity wrt Java or the dearth of tooling for them.</p>

<p>I mean, I don't even want to think about what dark pacts I'd have to enter into to implement Prime Mover in any other language.  Certainly, it's not really possible to implement the same architecture because of the lack of a virtual machine and byte codes in languages such as C++ where systems infrastructure is traditionally done.  But even in languages like C#, where there is the prerequisite VM, the paucity of tooling and lack of support for building infrastructure is far behind the amazing array of tools we have in Java.</p>

<p>Geebus, I'd better quit while I'm ahead - I don't want to sound like even more of a Java fan boy than I already do.</p>

<p>But still.  Working at the systems infrastructure level in Java has never been better and given what we have available today, it's a quite sophisticated and truly amazing place to work.  Quite unlike the wild untamed days when we were first doing this stuff...</p>]]>
   </content>
</entry>
<entry>
   <title>Going Against The Flow - Crossing the Streams in Prime Mover</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/04/going_against_the_flow_crossin_1.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4340</id>
   
   <published>2008-04-14T17:05:21Z</published>
   <updated>2008-04-14T18:51:44Z</updated>
   
   <summary> Well, that was fun. I just spent a decent chunk of my weekend swapping out the fundamental mechanism in the Prime Mover event driven simulation framework. Between taking care of the little one and the massive allergy attack I...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
         <category term="3rd Space" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Event Driven Simulation" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<center><img alt="The 3rd Space fine tunes the event driven simulation framework."  title="The 3rd Space fine tunes the event driven simulation framework." src="http://www.tensegrity.hellblazer.com/media/cross-the-streams.jpg" width="418" height="319" /></center>

<p>Well, that was fun.  I just spent a decent chunk of my weekend swapping out the fundamental mechanism in the <em>Prime Mover</em> event driven simulation framework.  Between taking care of the little one and the massive allergy attack I was suffering (thanks, Mom Nature!), I think I should get an award or something.  Wait!  Here's a gold star I can put on my laptop case.  </p>

<p>In any event, the changes to the underlying framework are actually quite cool.  What had happened was that Prime Mover was finally getting used in anger - well, gently played with, really - and this exposed some serious short comings in the data flow analysis I was using to perform the byte code rewriting which made the magic happen under the hood.  Over a few beers at Bucks on Friday afternoon, we mulled over a few different strategies for fixing the issue - none of which were particularly appetizing.</p>

<p>So, let me step back a bit and lay out what happened to the framework and why.</p>]]>
      <![CDATA[<p>At the heart of the Prime Mover framework is a byte code rewriting system which allows Java to be used as the scripting language for event driven simulations.  Now, event driven simulation frameworks are pretty cool and are very useful in modeling as well as gaming (as an aside, I find it terrifying to witness the complete lack of simulation frameworks in most gaming systems - i.e. they all focus on the graphics and the behavior is a distant second thought).  The basic idea is quite simple.  You have simulation entities which can only communicate through the exchange of events.  In the simulation, only the events are processed, which means that eons of simulated time can pass in microseconds if there are no events to be processed.  This is why modelers of all disciplines (from business, to economists, to physics to wireless network engineers) find event driven simulation so darn useful.</p>

<p>However, the overriding problem in all these frameworks is the rather ugly way that these frameworks are exposed to the end user - i.e. the modeler.  Usually, some bizarro scripting language is created and that is interpreted.  Other ways of providing the framework is to create a simulation "kernel" and expose this to the modeler in the form of "posting" or "subscribing" to events.  Pretty darn ugly - at best - and subject to not just a lot of confusion, but nasty issues with typing and above all efficiency.</p>

<p>So, as I described previously, Prime Mover does away with all that using the clever idea of making use of the underlying Java VM as the driver for the event framework.  This paradigm for event driven simulation turns out to be precisely the same kind of stuff that many of us have been doing for a while.  The underlying idea of using proxies and reflective calls has been around since the Smalltalk days of OO - and I'm sure before.  The idea that void return methods are excellent models for one way events is also something that has been around since the dawn of time in distributed communication.  The only thing that's really different in this modeling paradigm is to use these techniques to implement event driven simulations rather than distributed communication architectures.</p>

<p>The advantages to event driven simulation are analogous in that you now have what amounts to a transparent system that simply runs your code, albeit with some different semantics due to events being processed asynchronously from the caller - something quite typical in distributed systems.</p>

<p>In any event, the infrastructure that I had developed had followed the lines used by the JIST framework in that I analyzed the byte codes and created type substitutions for the actual references to the simulation entities and rewrote the call sites at the event sends in the calling methods.  Granted, doing this was a herculean feat demonstrating my mad programming skillz, but the problem is inherently difficult and in many common cases poses an insurmountable barrier to success.</p>

<p>At issue is that in order to make these byte code transformations, I had to do an awful lot of data flow analysis.  I was using the data flow analysis that's provided in the ASM framework and this allowed me to do some very precise intra-method data flow analysis.  But it was quite clear that in order to do the problem "right", I would have to do some pretty gnarly cross-procedural call analysis that I couldn't do with the ASM framework.  Consequently, I was looking into data  flow analysis frameworks (short conclusion: there aren't very many of them available) and reading reams of papers on the black art of code analysis.  I had basically come to the conclusion that it was going to be frickin' painful and would see if I could "work around" any problems that came up with the current code base that I had created - after all, the goal of the framework wasn't to do bitchin' data flow analysis, rather it was to create a simulation framework so I could start working on the MMOG infrastructure.  Diving further into the data flow analysis really felt like hovering on the edge of a black hole's event horizon.  The last thing I wanted to do was get sucked into that.</p>

<p>Sadly, as I mentioned at the beginning of the post, it became immediately obvious that even butt simple use cases required a lot more analysis than what I was doing and that the work arounds - if they existed at all for some cases - would be quite painful.   So I was faced with doing a lot of debugging work to see if I could fix the particular cases that we were trying or to head off in a more radical direction.</p>

<p>I had been mulling over dumping the entire byte code transformation mechanism in favor a straight proxy model.  The obvious advantages to the proxy model is that you can encapsulate the behavior required to implement the event driven simulation machinery in the proxy, meaning that you don't have to distribute the machinery via code rewriting to all the potential call sites.  However, the proxy model has a number of disadvantages as well which kept me from simply sitting down and doing the work to change the underlying system to a proxy model.</p>

<p>Probably the biggest disadvantage to the proxy model is the favored choice of using strict interface based proxies.  This is the common model of RMI and pretty much any proxy system.  You simply provide your proxies based on interfaces and now you can replace any references to the original object with these proxies.  This is great, as far as it goes, but it's not really a natural model.  There's a lot of fudging which goes on, and it's notoriously easy to break through the proxy barrier and find yourself working with the real object by accident.  In addition, working with pure interfaces isn't always a natural model for people who are not programmers.  Sure, we all use interfaces like we were born doing it, but it's a simple fact that most people who model do so with classes.  I really wanted to preserve the ability to work with straight classes as my simulation entities and resisted this strong pull for interface based proxies.</p>

<p>Now, it's relatively straight forward to make proxies which work for classes.  CGLIB and other frameworks do a quite nice job of making proxies for concrete classes - it's not exactly rocket science, after all.  But the problem - from my perspective - of using these types of proxies is that you now have significant overhead due to the fact that your proxy has a bunch of unused instance slots taking up a lot of space.  If the number of proxies is small in your systems, then this is no big deal - i.e. the space overhead really is minimal so no need worrying about it.  But in the MMOG systems I'm trying to tackle with Prime Mover, the number of entities is huge - many,many millions of simulation entities.  It's like the absolute worst of all the fine grain distributed object nightmares rolled into one and amplified by several powers of ten.</p>

<p>So while I could solve the immediate problem by using class based proxies, I knew that in the end that my life would suck even more than it did now because the stated goal of the project - i.e. to provide a massively scalable online gaming system - would be thwarted by the simple fact that my storage requirements would easily double - if not more, depending on how the statistics of references worked out.  </p>

<p>Thus, after a few beers on Friday I was resigned to changing the system to use the class based proxies and put off dealing with the space issues at a later date - treating the space overhead as an "optimization" issue which could be dealt with in some fashion.  Magic pixie dust or leprechauns, I guess.  Not the best solution, but hey.  Maybe I couldn't, in the end, produce the kind of system I was hoping to.  It happens.</p>

<p>And so I dug into the problem Saturday, taking out the big knives and hacking away at the underbrush that composed the byte code rewriting.  By late Saturday night I had most of the system transformed to use the proxy based system and was feeling pretty good about the work I'd accomplished.  However, the phone rings and Stefan's on the line - apologizing for calling late, of course - talking to me about the idea he had while working in his garden.  The idea was something that I had briefly fantasized about but discarded for reasons which I'll soon explain.  However, the idea that Stefan described was simple:  Why waste the slots in the proxy?  Why couldn't we unify the proxy and the simulation entity into one object?</p>

<p>As I said, I had briefly fantasized about this but had rejected it because one of the problems would be actually breaking the references between entities upon serialization.  As I've mentioned, I'm going to be relying on Coherence to scale as well as provide continuous availability and that requires serializing the entities.  Breaking the references between entities is required or else you get one massive multi-terra bit blob of goo.</p>

<p>But as I was talking with Stefan, I came to realize that this was simply an issue with serialization.  I could easily control what happens when I serialize a proxy from a referrer - i.e. write out the UUID which uniquely describes the entity, which takes precisely 4 longs.  And I could just as easily use an alternate serialization for the entity qua entity which serialized the actual state of the entity.  Once I realized that I could have two serialization schemes which coexisted side by side, I realized that I could, indeed, unify the proxy and the actual state of the entity and eliminate all the overhead I was fearing.</p>

<p>So now, what I do is simply generate a subclass for each entity which implements the mechanics of the event driven simulation framework - e.g. asynchronous event processing and continuations.  Then the only byte code rewriting I have to do is focussed on the creation of the entities themselves.  Analyzing the code to find the sites where the entity instance is created and rewriting them is a quite trivial and completely robust process, given that to create an instance of a type, you have to actually refer to the actual type.  Of course, this doesn't deal with creation via reflection, but hey.  Everything has limitations and the domain of modeling and simulation isn't the wild wild west of cowboy programming.  And in any event, the transformation is quite trivial and straight forward to do.  Considering that Prime Mover's own bootstrapping has to use reflection, the use of reflection - if you have to - in the model is quite easy.</p>

<p>The end result of all this is that Prime Mover is now in far better shape to face the future and I feel much more confident in the ability of the system to maintain its semantics and deal with all the slings and arrows we're going to virtually throw at it in the next phases of development.  I've eliminated an extremely nasty data flow problem, a potentially crippling space inefficiency overhead and discovered a new kind of Proxy trick (I don't think I've ever seen this technique anywhere, but the world is large) that had wide applicability beyond the little universe of Prime Mover.</p>

<p>Not bad for a weekend's work.</p>]]>
   </content>
</entry>
<entry>
   <title>Event Driven Autonomic Management - The Long Kiss Goodnight</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/04/event_driven_autonomic_managem.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4334</id>
   
   <published>2008-04-09T17:40:48Z</published>
   <updated>2008-06-17T02:13:05Z</updated>
   
   <summary>(Part I - Preliminaries Part III - The First Cut is the Deepest) From my perspective, one of the major pitfalls in any project which starts out to produce a management infrastructure is that the project almost immediately starts focussing...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
         <category term="Distributed Systems" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Event driven autonomic management" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Management" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p><em>(<a href="http://www.tensegrity.hellblazer.com/2008/04/event_driven_autonomic_managme_1.html">Part I - Preliminaries</a><br />
<a href="http://www.tensegrity.hellblazer.com/2008/05/event_driven_autonomic_managem_2.html">Part III - The First Cut is the Deepest</a>)</em></p>

<p>From my perspective, one of the major pitfalls in any project which starts out to produce a management infrastructure is that the project almost immediately starts focussing on the API layer rather than the defining the large scale system behavior.  In many ways, this is completely understandable, given that the API has the most immediate impact on the first users of the system - i.e. those hapless fools that form the brigade of developers who have to integrate their systems into your management infrastructure.  Given that in most large organizations, APIs become the mechanism that groups use to mediate their interaction - not just at the Java level, but in a visceral sense that governs the actual political interaction between the groups.  Somewhat because APIs are something concrete and form a nucleus around which people can argue concretely about.  But mostly it's because most people are rather ignorant of how systems actually interact, but one thing they do know is that there are APIs and consequently these concrete manifestations of handles that can be universally understood become the battleground upon which system integration takes place.  Or, put another way, APIs are the lowest common denominator that even managers can understand, consequently they are the only focus of pretty much every large scale project.</p>

<p>But the problem with this focus is that an API doesn't define a system, rather it's the other way around.  The way I think about it is that the APIs of a system are like the inner core of a sphere.  Defining the surface of the system - i.e. what the system "looks" like - will provide enormous leverage on the internals of that system.  And this leverage will simply force things into place - meaning that the reason the API exists is because it is literally the inevitable result of the forces that keep the system together.</p>

<p>But I digress.</p>]]>
      <![CDATA[<p>As I was saying, focussing on the API really has perverse effects on developing systems, and in something as sweeping as a large scale management infrastructure, this myopic focus is simply devastating.</p>

<p>So, what is the overall properties of the system we're trying to model here?  What is it that we're trying to accomplish in the dynamic sense of system definition?</p>

<p>Luckily, the problem of management is pretty common so there's lots of examples of real world systems we can examine to see what's up.  One resource I've found amazingly useful is the open source information  repository found in <a href="http://www.infrastructures.org/">infrastructures.org</a>.  Oddly, I've found that when I point this treasure trove out to people their eyes just kind of glaze over.  Over the years I've come to judge the information content quality of a site (from my context definition of "good") by how much a manager or high level project coordinator's eyes defocus when I try to get them interested in the particular mine of information.  Infrastructures.org is a sight which literally will cause any manager to start pulling out their phone and start texting random people in a desperate attempt to look busy. Even better, the "big picture" personnel will literally start walking out of your office when you start diving into the site itself, exploring the various nuggets of collective wisdom.  So you know that it has to be a good site.  Check it out, as it'll be well worth your time, if you're interested in this stuff.</p>

<p>The purpose of a management infrastructure is to automate the process of change.  One of the desired effects of a successful system is that the investment that you have to make in terms of human labor goes <em>down</em> - i.e. you should have to dedicate far less people and have them spend far less time dealing with the system.  I know this sounds rather obvious when you see it here in the ASCII, but if you simply look at the available systems out there, you find that - perversely - it seems like precisely the opposite has happened.  Rather than reducing the amount of time someone has to dedicate to the system, what seems to happen is that the time required now increases polynomialy as more and more "functionality" is added to the system.  Rather than simplifying the problem, the complexity grows with each and every feature as things interact in complicated and unforeseen ways.  Instead of reducing the complexity of a very complex problem, the complexity increases.</p>

<p>Now, the absolutely stunning thing to me is that end users and administrators don't simply revolt.  But I guess there's a certain macho aspect to doing system administration.  An aura of "preisthood" and a realm of complexity that marks one's manhood.  Or it could be that <a href="http://en.wikipedia.org/wiki/Asperger_syndrome">Asperger syndrome</a> is far more <a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9072119&pageNumber=1">common amongst IT personell</a> and they simply don't notice the complexity because they are supermen and shrug off complexity like a duck sheds water.</p>

<p>But where you can't ignore these issues is on the bottom line of your expenses.  People cost money.  And smart people who can herd the cats that you have in your data center cost a lot of money.  So any time you have to inject a human into any process, you are spending a lot of money.  Consequently, anything that removes humans from the process and allows you to leverage the smart ones you have more will pay you back handsomely.</p>

<p><br />
So what we are looking for, from the high level view of the system, is something that drastically reduces the complexity in dealing with the incredibly complex process of managing a living and breathing system of perhaps 10's of thousands of processes and all of their complicated interacting pieces.</p>

<p>Another mistake that I quite frequently find in the way projects approach system management is that they somehow believe that they have to solve the <em>entire</em> problem or they can solve none of the problem.  So, for example, you see people literally start with bare metal provisioning and work their way up from there.  Now I'm certainly not saying that we don't need something - or some <u>things</u> - which cover the entire suite of issues, soup to nuts.  But the problem with focussing on everything is that the problem really is quite stunningly huge.</p>

<p>It never ceases to amaze me in my interactions with smart people who are doing cool things, in that they simply don't seem to comprehend that there is great value in not setting the initial bar to a height somewhere around the orbit of Pluto.  I can't tell you how many times I've had the conversation where I'm talking with a colleague about, for example, OSGi.  When I said that he should take baby steps and simply make the system we were discussing a single, large bundle he kept asking what was the point.  He wanted to immediately start dissecting the large system into a highly modular system with a correct factoring of interacting services.</p>

<p>When asked the question "How do you eat an elephant", the correct answer is "bite by bite".</p>

<p>It really is lunacy to think you can wolf down an entire elephant in one bite.  And if you take it bite by bite, you'll find that each bite is actually useful in and of itself.  In the OSGi example with my colleague, I pointed out that simply having the system as a single bundle was actually a huge step forward.  By having the system as a bundle, it was now something that came under the same provisioning mechanisms that all OSGi bundles are subject to.  For example, I can start/stop/load/unload the bundle - something that we literally cannot do with the system in its current form.  Further, we can now deploy the bundle to any OSGi container by referring to the location URL for that bundle.  This means we now have a pull model for deployment which means we don't have to worry about provisioning the physical directory of the running process which would host that process.  These are non-trivial things.</p>

<p>And then look at where you now are with respect to the ultimate goal of having a well factored, modularized system composed of interacting services.  If you now have the system running as an OSGi bundle, the system is now operating in an OSGi environment.  Even if you do nothing with the system at this point, and merely leave it as a single bundle, any <em>new</em> functionality you add to this system - and believe me, this system is not static and is constantly having new functionality added to it - can now take full advantage of being in an OSGi framework.  This means that you can stop using Singletons for your services and simply use OSGi services as god intended.  Further, you can now provide the new functionality as OSGi bundles rather than pounding the original system, pushing the functionality into it as you normally would.</p>

<p>Taking a bite of the elephant and chewing it before you swallow and take the next bite has advantages even if the elephant is still there.</p>

<p>Again, sorry for the diversion, but the point was that by trying to solve the entire system management problem, we almost always paralyze ourselves into non-action because the problem is so huge that we don't know where to start.  Worse, because we're trying to do <em>everything</em> we find that we do nothing well at all.  The resulting system then ends up increasing the complexity because all of the parts of it don't fit well together, haven't gotten the design attention that they need and are poorly implemented because of the sheer size of the work to be done.</p>

<p>So that's why I focussed on a limited domain in my research.  As I think you'll see, simply because I've limited the domain I'm applying the solution to, I haven't actually limited the <em>potential</em> scope of the solutions that can be solved by the system.  The system is general enough to do a whole host of things.  However, but trying to solve specific problems in a limited domain, I've created an environment which can grow to solve large sectors of the problem in an organic and managed fashion.  </p>

<p>The trick is to create something that can easily fit into existing mechanisms, procedures and tools that administrators already use to manage these complex systems.  The idea is to take over some of the complexity of the existing systems and reduce that complexity without interfering with the rest of the system.  So, while a good deal of the total scope of the global problem still remains, we have still made things better by reducing the overall complexity by taking a couple of bites out of the elephant.</p>

<p>Even better, we end up with a process which can be applied to the rest of the system (or a large sector of it) in a systematic fashion to solve the complexity remaining.</p>

<p>Bite by bite.</p>

<center><img alt="kiss_lips.jpg" src="http://www.tensegrity.hellblazer.com/media/kiss_lips.jpg" width="480" height="404" /></center>]]>
   </content>
</entry>
<entry>
   <title>Event Driven Autonomic Management - Preliminaries</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/04/event_driven_autonomic_managme_1.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4333</id>
   
   <published>2008-04-09T02:52:41Z</published>
   <updated>2008-06-17T02:14:47Z</updated>
   
   <summary>Update: Part II - the long kiss goodnight, Part III - The First Cut is the Deepest This is the first in a series of posts documenting the research I&apos;ve been doing into a different way of thinking about system...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
         <category term="Distributed Systems" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Event driven autonomic management" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Management" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="OSGi" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p><strong>Update: </strong><a href="http://www.tensegrity.hellblazer.com/2008/04/event_driven_autonomic_managem.html">Part II - the long kiss goodnight</a>, <a href="http://www.tensegrity.hellblazer.com/2008/05/event_driven_autonomic_managem_2.html">Part III - The First Cut is the Deepest</a></p>

<p>This is the first in a series of posts documenting the research I've been doing into a different way of thinking about system management infrastructure.  For quite some time, I've been obsessed with the idea of how to simply and effectively manage large scale systems.  Throughout this obsession, I've travelled down various roads and found myself in several box canyons along the way.  I've tried out a lot of different strategies and have finally settled into something which provides the kind of framework I've been looking for which I haven't found replicated anywhere.</p>

<p>Note that I'm certainly not making the claim that it is "Teh Best" management infrastructure.  Rather, what I'm making the claim is that it's the most interesting management architecture <em>to me</em>.  As anyone who knows me can testify, I have rather peculiar tastes and I am a strange bird at times.  So fair warning, eh?</p>

<p>In any event, what I plan to do is to provide a fairly deep dive into the architecture that I've come up with.  In the standard tradition of all literature scientific and technical, it will be presented in precisely the opposite order in which I actually came up with things - i.e. from the top down, in a semi coherent form that makes sense.  Lord knows that actual discoveries and explorations are more a matter of luck in which you discover something and then spend an inordinate amount of time tracking down why the heck you managed to stumble upon it and where it fits in the larger picture of things that you're trying to map out.  I've always found this cognitive dissonance amusing, myself, and hope you won't mind to much when I veer off into seemingly irrelevant paths rather than sticking to the point at hand.</p>

<p>If you're one of those people who can't wait until the end of the story to find out what's going on, by all means download the PDF of my talk on the subject at last year's Spring Experience entitled <a href="http://www.tensegrity.hellblazer.com/media/Digging-The-Trenches.pdf"><em>Digging the Trenches on the Ninth Level</em></a>.  If you're not familiar with Dante's <em>Divine Comedy</em>, then you won't get the joke.  But suffice it to say that I'm a big believer in the principle that every time you solve a problem, you discover ten more problems that you didn't know you had.</p>

<p>A perfect example of this sometimes perverse law is something as simple as email.  Email solved a lot of problems that a modern economy and social population have, but in doing so it created a lot more.  Without email, we would never have been subjected to the sublime beauty of penile extension spam nor would your grandmother be subjected to the horror of id phishing which you discover has snagged her bank account and drained all her life's savings leaving you with a predicament that makes you wonder what all this progress was supposed to do in the first place.</p>

<p>Likewise, I firmly believe that in solving the problems I believe have been addressed by OSGi, Spring DM and management architectures like mine, we've inadvertently unleashed new levels of horror that will ensure future generations will curse our names as they suffer from the fall out and live the unspeakable abominations unleashed from these "solutions" and witness them unfold in ways that we couldn't possibly imagine.</p>

<p>So, with that cheery panorama as the back drop, I'll end this introductory post and start working on the next post, which provides high level overview and ten dollar tour of the sewers that I've been digging for your benefit on the ninth level of hell.</p>

<p>Remember.  I dig because I care.   After all, you do want that frozen crap to be routed somewhere and dealt with, don't you?</p>

<p><br />
<center><img alt="Gustave_Dore_Inferno34.jpg" src="http://www.tensegrity.hellblazer.com/media/Gustave_Dore_Inferno34.jpg" width="461" height="368" /></center><br />
<center>C'mon in!  The water's wonderful!</center></p>]]>
      
   </content>
</entry>
<entry>
   <title>Digging the Trenches on the Ninth Level of Hell</title>
   <link rel="alternate" type="text/html" href="http://www.tensegrity.hellblazer.com/2008/04/digging_the_trenches_on_the_ni.html" />
   <id>tag:www.tensegrity.hellblazer.com,2008://4.4332</id>
   
   <published>2008-04-09T02:43:22Z</published>
   <updated>2008-04-09T04:26:10Z</updated>
   
   <summary>My talk at last year&apos;s Spring Experience talk on the next generation of application server architecture is available here. The talk is about OSGi and how the next generation of application server platforms will simply do away with the cumbersome...</summary>
   <author>
      <name>Hal</name>
      <uri>www.tensegrity.hellblazer.com</uri>
   </author>
         <category term="Distributed Systems" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="Management" scheme="http://www.sixapart.com/ns/types#category" />
         <category term="OSGi" scheme="http://www.sixapart.com/ns/types#category" />
   
   
   <content type="html" xml:lang="en" xml:base="http://www.tensegrity.hellblazer.com/">
      <![CDATA[<p>My talk at last year's Spring Experience talk on the next generation of application server architecture is available <a href="http://tensegrity.hellblazer.com/media/Digging-The-Trenches.pdf">here</a>.</p>

<p>The talk is about OSGi and how the next generation of application server platforms will simply do away with the cumbersome and rather dated component models that we all know and hate in favor of the vastly superior OSGi platform.  Or that's the theory at least.  Only time will tell if I'm correct or just another mad hatter sniffing too much mercury outgassing from the various toys littering his office.</p>

<p>In addition, I also lay out the management architecture I've been experimenting with for the past year.  Obviously, it uses OSGi as its base, but OSGi - by itself - isn't sufficient to provide the kind of management infrastructure you need to manage large numbers of processes.  I call this management architecture - for lack of a better name - Event Driven Autonomic Management.  I'll be kicking off a series of posts going into far more detail on this architecture as a means of documenting the research I've been doing.  </p>

<p>Think of it as therapy, as talking about it on this blog - posting, so to speak, to the wind about concepts and issues that no one else seems to find terribly interesting or useful.  You can tell I'm a great hit at parties, can't you?</p>]]>
      
   </content>
</entry>

</feed>
