2013/05/30

fanboy

It is fair to say I'm a fan of NetKernel. And I know quite a bit of the background of both the main protagonists. Today I'm therefore a very happy puppy, because over on his blog, Tony Butterfield is blowing the trumpet on his latest creation - ROC Hockey.



This game gives a new dimension to the classic game of Air Hockey. But that's not the important issue. The issue is that Tony has come full circle. Back when I was cutting my first IT-teeth on the MSX, Tony was already an accomplished game designer/developer/... (everybody did everything in those days, specialization is for insects).

Don't take my word for it, find an Memotech MTX emulator and find the rom for PotHole Pete. Unless you've recently finished Braid in one sitting (I don't think so dude or dudette, I don't think so), I guarantee you you're going have to put grinding on WoW (no, doesn't deserve a link) aside for quite a bit to finish it.

Modest as he is, Tony is downplaying what is out there, instead highlighting the weak points of the game mechanics. It's a British thing, forgive him. He's going to move this forward, it's going to be playable on Facebook ! And more importantly, it is going to be the first of many more and better ROC-based games to come. 

And let me tell you, you'll feel the adrenalin pumping when you've figured out the scoring system and you're catching up quickly and there's just one square left in the game and you're going to take that b*stard down ... down I said ... you hear me ...

Sorry, I got carried away a bit there. I'll let you go and check it out now. ROC Rules !
 

2013/05/15

news

I've not been such a good boy recently in keeping this blog updated. I offer no apologies, only the promise that things should pick up now ...








2013/04/05

potential

Like you, I quite enjoy an article full of fun and science, but not having made it through university (not having started university in the first place), I do occasionally need - quite a bit - of help when reading the NetKernel newsletters.

Today's newsletter was no exception.

After dilligent study I came to the conclusion that this is what Peter (aka Thor) is talking about :

Every child in the civilized world knows what this is. Which does say something about our civilization, but there's other blogs debating those topics. For those just coming in from a 40 year stay in the desert (welcome, please do shake the sand of your boots first) ... this is the first screen of a game called Angry Birds.

Angry Birds was originally a showcase for the potential of HTML5. However, it also had quite a bit of potential itself, you can hardly pass a shop (any shop) these days without one of those ugly things staring back at you.

The game itself is all about releasing potential and more specifically the most points are being awarded for making the M.N.C. (minimal necessary change) to cause the M.D.R. (maximum desired response). Or otherwise put ... use as little energy as possible to release as much potential as possible.

And that is - also - what NetKernel is about.

Enjoy the weekend !

P.S. No, I have not forgotten about explaining what the CRUD server is about. Watch this space.
P.P.S. If you think I'm making the acronyms up as I go along, you should read The End of Eternity by Isaac Asimov. Quite relevant.

2013/03/23

quickie

Even when everything and everyone conspires against you, you should do the utmost to deliver what you promised.

So, without a lot of explanation (that will follow early next week) the following links :
CRUD server 
CRUD server demo

This is no less than a general solution for the backend of most application demos that you see on the internet and one specific implementation.

Enjoy !  

2013/03/15

going gui

Last week the NetKernel repository got a new module (html5-frameworks) containing a couple of often used Javascript frameworks. This is not by accident. While HTML5 does contain the seeds to push back on Javascript in the browser, things are not yet at that stage (and won't be for some time to come).

NetKernel on the other hand is often positioned as a backend engine. And this is strange. A lot of great websites run on top of the Jetty webserver and NetKernel's Fulcrums do too. So there is absolutely no reason for the frontend-crowd not to use NetKernel as a serving platform. I myself have already done this in the past using the Qooxdoo framework. However, I am not a graphical designer. Making sexy interfaces is not my thing. This is however not NetKernel's fault !

A couple of weeks back somebody asked me to redo this presentation using NetKernel as the backend and serving the AngularJS framework on NetKernel as well. Challenging me is a great way to distract me from my - other - work ... I'm always up for challenges. Next week I'll show you the general backend solution for all such demo-applications (and the internet is full of them, every new framework has such showcases). Let it be known that I can now create similar applications in under 15 minutes. Applications that benefit from all the NetKernel optimizing too. Try beating that !

This week I'll show you a frontend solution for a new tool that is released today in Layer1. This tool (a list accessor for the golden threads in a system) is going to be used in one of my current projects to allow manual control over the expiry of some resources. This is a very common use case

Akamai for example does not only charge mint for their caching solution they also charge for every request to clear a certain cached object before the normal expiry moment. Obtaining the access from them to do it yourself is only in the range of very large businesses. Kerching ! 

My free solution to control golden threads (and thus expiry) manually can be found here. Update to the latest (today) Layer1, make sure you get the html5-frameworks module installed (AngularJS is served from there), install the module, browse to http://localhost:8080/goldenthread/interface/index and watch the combined power of NetKernel and AngularJS in action.

In the source you'll find a simple RestOverlay and less than 100 lines of Groovy code to provide the backend, less than 50 lines of Javascript code that drives the magic in the AngularJS enhanced HTML for the frontend. The bootstrap css makes it look ... maybe not sexy, but definitely not ugly either.

Enjoy !

P.S. This tool (adapted of course) will soon be added to the Backend Fulcrum tools of NetKernel itself. I'm offering it here as a showcase of quick to-market development.

P.P.S. If you want the equivalent of the Akamai solution inside your software and at a fraction of the cost, check out NetKernel !

2013/02/08

reuse

As happens so often at the start of the new year, at least a couple of the good intentions are quickly moved aside under the pressure of reality. In this case under the pressure of absolutely crazy (in a good way) things happening in the NetKernel space.

So let me talk a bit about reuse while you wait just a bit longer on the second episode of Pinky and the Brain. I'll start with a quote from Frank Boddeke
Most of our products are re-shuffles of modules we already have.
Sounds crazy ? Well, did you look at the periodic table recently ? I had to learn it by heart in secondary school and my knowledge is still - largely - relevant today. It was already largely relevant in 1896. I was in secondary school in the (nineteen)eighties. The number of new molecules that has been build with those same elements since then is huge (not the mention the number since the days of Mendeljev himself).

NetKernel works the same way. And the simile continues, for just as you can also compose molecules, everything is a resource and the composition of a resource is also a resource which can be use in a composition ...

Not convinced ? Well, recently I quickly required a set of resources, let us abstract it as res:/nameproject/resourceid. Now, as these things go, this is an infinite set of resources. A couple of these resolve to actual data, most do not. I needed a sensible default for those that don't.



Didn't I recently read about just that pattern ? Yes, I did ... in the Tic-Tac-Toe series. Here's the relevant bit of mapper configuration :


    <endpoint>
        <verbs>SOURCE,SINK,DELETE,EXISTS</verbs>
        <grammar>
            <simple>c:{x}:{y}</simple>
        </grammar>
        <request>
            <identifier>active:cell</identifier>
            <argument name="x">arg:x</argument>
            <argument name="y">arg:y</argument>
        </request>
    </endpoint>
    <endpoint>
        <verbs>SOURCE,SINK,DELETE,EXISTS</verbs>
        <grammar>
            <active>
                <identifier>active:cell</identifier>
                <argument name="x"/>
                <argument name="y"/>
            </active>
        </grammar>
        <request>
            <identifier>fpds:/ttt/cell/[[arg:x]]-[[arg:y]]</identifier>
            <representation>java.lang.String</representation>
        </request>
    </endpoint>
    <endpoint>
        <grammar>
            <simple>res:/ttt/cell/{x}-{y}</simple>
        </grammar>
        <request>
            <identifier>res:/ttt/cell/default</identifier>
        </request>
    </endpoint>


Still not convinced ? Well, recently (did I mention times are crazily busy ?) I was asked to design a central logging component for NetKernel. Not a problem, you just provide a java.util.logging.SocketHandler handler in your logging configuration. But where do the logs go to ? Well, you could surely use something like Splunk, but there are NetKernel patterns/molecules for it too !




The Enterprise Edition users could do it with NKP and seamlessly log straight on a (or multiple) central server(s). For the Standard Edition users ... remember Camel ?  In fact I blogged about it myself here.


 from("mina:tcp://0.0.0.0:" + vPort + "?textline=true&sync=false")
 .to("class:org.elbeesee.logging.consumer.endpoint.LogMessageHandler?method=onMessage");


And that's it. Five minutes to pull together a module that provides a central logging server.

Enjoy and watch this space for more soon !

2013/01/11

pinky and the brain

It is all very well, these Phenomenal cosmic powers in an itty bitty Netkernel, but where do you start when you wake up screaming at 3 am in the morning, sweat dripping and a head full with this one plan to conquer the world ?

Note : If the above never happens to you ... you are a lucky person, trust me !

After the obligatory Muhahaha, you fire up your computer, start NetKernel, ...

Fifteen minutes later you are playing Minecraft or Dwarven Fortress and an hour after that you are back in bed, hoping that the alarm will not go off at 6 am (it will).

The problem wasn't that your plan/vision/idea was bad, but that you didn't quite have the tools ready in NetKernel to build it. You got distracted in creating those, next thing you were looking for stuff on the internet ... <fill in the rest of the slippery slope yourself>.

So, this week (and in future posts too) I'm going to provide a couple of common tools for building a service on the web and next week ... we are going to build one.

JQuery is a good place to start. We can debate whether or not it is worth serving it in NetKernel ... I think it is. So here is my module to do so.

Next on my tool list is a framework to build a decent HTML5 webpage. I like Skeleton. And here is my module to serve it.

Typical in a service on the web these days is that there is a free tier or an online working demo. That does open a door to abuse of course and since we - for the time being - live in a dog-eat-dog world, it is best to take this into account and have some kind of protection against it.

My brother-in-law, an excellent web/graphical designer, tells me it is both old hat and annoying for potential customers, but I like to use Recaptcha. Yes, another Google-capt(ch)ure . There is already an existing implementation by Chris Cormack, available on the NetKernelROC GitHub. Alternatively, here is mine (different approach, same result).

There all that is left now is to build a killer application and a teaser website. Come and see next week (or build your own at 3 am) !

P.S. I'll be visiting the Twin Cities again next week. If you want to meet-up, ping me !