18 November, 2008

Vain Class

Here is a "pattern" I have employed in a couple of projects of mine, can't still decide if it's worth mentioning as a "pattern" but anyway since I found it usefull and reused it here it is:

Vain Class

Pattern Name and Classification
Vain Class a GUI pattern.

Intent
Simplify User to Objects Interface.

Motivation
Let an Object hold parameters that toggle it's behaviour in an environment, these parameters need to be exposed to the user so he can have control of it's behaviour. A single dashboard/control panel need to be displayed to the user so he can oversee/manage all the objects or in an alternative if no such container exists display a stand alone floating window.

Applicability
These objects can be steps/nodes in a workflow, that need to be controled/parametrized by the user. Objects embeded in a simulation environment (ie 3d world), that the user may control.

Structure

Participants
  • A Dashboard Class (optional).
  • The Vain classes that hold the parameters
  • The Gui framework's control classes
Collaboration
  • The Dashboard Class provides the real estate, and controls the display of each Vain Object.
  • The Vain Objects use the Gui's primitive controls on it's real estate which are responsible for displaying the current status, feeding the user input to it's parameters and optionaly notify the environment for the change. It may embed itself in a Dashboard window or create a standalone window that can float until the user discards it.
  • The Gui's primitive controls are bound directly to each Vain Object parameters, so they execute the Data eXchange directly to the parameters variables.
Consequences
A classes's parameters are only accessible through the gui, shortcuts are taken so code bloat is removed (ie set() get() functions for parameters are not needed). User interaction with the internal control objects is more direct so hopefully reduntant interface layers can be discarded. Distribution of gui code, and more tight coupling to the object that is interfaced.

Implementation:
Each Vain Class contains an abstract virtual method  Wnd & GetWnd(Wnd &parent) that takes in the Dashboards container window and returns the Window class associated with the Vain Class. The Dashboard or the Main window then  needs to call the GetWnd and Show the result.

Hail Deisignia All Hail Pattrenia

10 November, 2008

In an Alternative Future

After getting back from vacations I power up my home InterCloud HCI. Purpose? getting some work done... I am falling behind in my blogging lately and have to catch up. I'm feeling proud for this masterbeast of technology I recently acquired, as it comes into life. The new ICC256, 256 cores using the standard 256-bit morph-processing acting either as single nodes or participating in an ad hoc stream chain, 256 ic-addressing! talk about a Cloud age eh? most of them needed to talk to the IntraCloud devices-archivers, screens,media servers,game clientsand other peripherals and a only a few for the ExtraCouds such as my company,  a couple of banks the InterCloud and an interface for the old Internet needed for my research, 256 TB in the local cache tree able to cache half the Clouds' available services for zero latenzy, and 256 GB in the first level to minimize paging faults and blitz response. 
Like I said a Masterbeast. 
It curiously took a couple of seconds today to get me to the signature screen... Aha new artwork on the background! could we moved up on a new version of the FSF SASOS? Seems like major upgrade or they wouldn't change the artwork, so long for the Dolphin. I wonder what new they put in. Local caching of the new modules schould be complete by now. I take my personal multipen and sign while the pen readies my fingerprints and oPenID for authorization to the Cloud my signature gets validated and I am in. Something I am, something I have and something I know, I mused... the three cornerstones of authentication in one move straight from the past.
When I am in I go straight to the console to query for the new system that was cached and see if I can select some optional precachings on things I will probably use - play to be more accurate - the half second delay of first use can be an annoyance but games could need a minute or more...
Anyway what kind of IT would I be if I don't mess around in the innards a bit eh?.
So for starters a new SYSQL console appears, probably incorporating the latest draft proposals that found their way to the standart last week ago- wow those FSF guys at Karlshrue are fast I wonder when Google and Microsoft will catch up. Microsoft's Singularity isn't bad but it's slow, they say it's safer but.
So let's see what else is new... more caching servers upstream, a few changes in the load balancing scheme, and a yes quite a block of addresses getting getting shored off the coastline of the address sea. Who needs all these obsolete stuff anyway, most were just old xml webservices ported to the Cloud no match for pure binary CloudEntities. Finally a set of updates and some new citizens on the hardware microkernels population, we still call them drivers traditionally but they are true CloudEntities servicing their hardware on the IntraCloud. The era of the cheap cores has led to every device getting one. And then getting each device being the physical manifestation of a CloudEntity.
It was quite a shift as I recall, objects, modules, services getting fused into CloudEntities. Each with it's special Island in the Address Sea. Not method call anymore or class Interfaces. Just CloudEntities, Ports and Protocols. It was just a natural evolution of the Net into the Cloud, prefixing good old fashioned pointers with the IPv6 addressess promoted automagicaly class Instances to Services fusing the old Internet Address space with the Adress space thus making processors cloud aware. It solved also the problem of sharing the Address Sea to world and where each company would publich their CloudEntities. Local Caching went into the private space of 192.168.0.0 and such, Also by extending the DNS to resolve not only names into addresses but also Method names into Ports solved name mangling and other binary manifestation problems. Next was the protocol name morphing into a namespace of standard protocols. Programming got a network feeling. Want to draw a circle on your screen? opengl://defaultscreen.lc:drawcircle/0.0,0.0,1 where lc the localcloud in short. That was at first the way to doit... It got better though with the years...
We are now in the Second Era of InterCloud halfway until the next Great Reboot - the only restriction of the Address Sea-It needs to get flushed from time to time... But it has become the standard way of keeping count... Anyway it has been scheduled to move up in 512-bit Address Sea on the next Great Reboot in about 10-12 years and anyone still employing 256-bit cores will lose half his capacity. But it will be a while, ICC512 is expected to reach markets in 4 years plenty of time to upgrade.

Hail Utopia All Hail Cloudia