Caching – A Technique for Performance

JSR 107

The good old JSR 107 (JCache – Java Temporary Caching API) nearly made it into Java EE 7. Hopefully, JCache will finally get into Java EE 8 and, maybe, with better integration with other specifications (we could think of having JCache as a second level cache for JPA)

We used to have performance teams within the development environment. Their job was to make it ‘go faster’ after the developer ‘made it go right’ (gave the correct answers).

An Important Technique

Caching strikes me as an important technique. It will become less useful as the speed of everything improves to the point where it no longer becomes a necessity. Man power costs money while hardware is cheap.

In my future vision, caching by annotations would offer the app code developer, with an intimate knowledge of what he wrote, to offer guidance to the compile and build tools, not the implementtion. The build tool would implement the infrastructure to make it happen – not something specifically coded by the developer. Maybe that’s what JSR107 is all about. We’ll see.

It would not remove the need for a bod/team with a more global view, to further tune the performance of a complete suite.

Think About It

We really need to keep performance issues in mind as we design systems as well as when we build them. Each discipline will need an implementation bod to wear their performance ‘hat’ often during the development lifecycle. We could ask for tuning  and performance from many of the areas we typically use :

  • The compile tool builder would tune generated results for optimum speed
  • The app developer would tune the code to best advantage
  • The database bods would choose optimal index path constructions and the appropriate choice of index technique. Clustering techniques might be useful to allocate data stores across physical hardware devices
  • Network response is, as always, an issue too, so a nod to this area is important

The User

It all goes toward giving ‘the user’ a satisfactory experience. I have often found that ‘performance’, per se, is never talked about as long as the answers are ‘fast enough’ – but ALWAYS talked about when the answers are ‘not fast enough’.

Performance is not something we can patch on at the end of development, as an after-thought. Performance MUST be an integral component of the entire project lifecycle including post-implementation. Caching is one tool in our performance toolkit.


Thanks to Antonio Goncalves’s post  http://java.dzone.com/articles/my-java-ee-8-wishlist for prompting my rant :-}

Java EE8 Wish Lists

Here is a good read if you need some food for thought. It’s about our melange of processes, tools, specifications and diverse technologies bundled under the term ‘J2EE’ – enterprise Java.

See this: http://java.dzone.com/articles/my-java-ee-8-wishlist

  • No buzzwords – too many already, convenient to use but confusing; you think ‘xxx’ means this – while i think ‘xxx’ means that
  • Caching – an important tool for performance improvements
  • Security – the top-most priority in my book, with hacking and government sponsored intrusions – yet sadly the poor step-child of many implementaions
  • Enterprise services and stereotypes – too many to even begin to name !!
  • One container / one POJO / several services – Oh, yes, PLEASE !!!
  • CDI, CDI, CDI – dependency injection, god knows we need something to allow external decisions to influence code execution – but is this the right way ?
  • WAR is the new EAR – there are too many choices already for what is essentially a zip-process – a bundler of all the bits needed to make something work.
  • Templating – coming along, though slowly. It’s why i love groovy/grails/gaelyf/caelyf – a separation of logic vs presentation
  • Configuration and staging – always a pain, mostly for those poor bods who deploy your love-child across a worldwide platform
  • Logging – Critical !!! Ya can’t debug ANYTHING without it, unless ya want to write acres of sysout.printlns !-P
  • Testability – yep – a must-have
  • Standard artifacts and repositories – i’m already too beatup over the hoops i need to jump thru to get my build tool to find the right (sub)tool – ivy, maven,gradle,github – gimme a break !!

The above list are my bug-bears when working on web stuff. The barriers to learning and implementation are way too high for the average bod. We are not all java gurus. It all just seems to lack a cohesiveness that we find in other more mature I.T. arenas.

What’s your take on this ?

Password Conundrum

Just having a bad hair day with my password making machine. It has completely run out of passwords, so guess we should try to make up a few. How about ‘bazooka’, ‘regimentation’, ‘geranium’, ‘poppadom’, ‘armageden’, ‘parcimonious’ – blinking heck, i can’t even spell that one !!

When it all gets a bit too much….

DANGER : RANT AHEAD –

Do you remember the good old days ? Those were the days when real I.T. developers (‘programmers’, we used to call ourselves) would write code in ink on the back of a napkin. Today, it takes an army of support and backup people just to help a developer get passed the mine-field of firewalls, security, passwords, ping-suppressors, and the like, in order to do battle with the mighty IDE’s of life, the compilers of death who kill your dreams with messages of dread – ‘syntax error’ — arrrgggg…., then you fight the change control systems from venus, the UAT team from hell, your friendly business analyst who claims “thats the way they wanted it“, the project manager with a heat rash, and finally the ‘user’ who instantly slays you with an innocent “that’s not what we wanted“. Let me get a warm cloth for my forehead, while i have a liedown…

DANGER : RANT AHEAD –

I’ve just had a trying session with the open source community known as sourceforge. Having joined a project there, i thought it would be good to join their mailing lists too. But seems that you cannot post unless you first subscribe, after which you must ask permission to post and wait till someone gets around to looking at your request and maybe, just maybe, approving it. Ok, so i know there are so many unhappy people out here who having nothing better to do than spend their entire afternoon before the evening news spamming my site, but dude, if they care enough to spam you, it’s just cos they care, they are the truly dedicated, the great unwashed, 😎 and i must give them credit for being more dilligent than moi. Back to my rant… so after 7, count them ‘seven’, emails from various robots and spam-merchant detectors, i did finally make it on to the short list of the ‘admin’ – ‘she who must be obeyed’. Now will cool my heals while i have another liedown and perhaps my enthusiam to join open source will go away. Now where was that napkin…….

Puzzled again

Why is there a learning curve on each and every piece of technology ? I find the learning curve on many such items to be nearly vertical, in fact i feel i’d have a better chance learning to build a nuclear weapon – a shallower learning curve, with the help of the internet, nearly flat… I’ve bin trying  to post a new topic here on wordimpress.com or is that worddepress.com ? The learning curve has nearly defeated me yet again. Being just a few hours younger than my eightyith birthday, i find it ever so difficult getting to grips with this new-fangled technology – it’s a new form of stress- ‘Oh, doctor, oh me, i’ve become so stressed cos i’ve had to learn six new ways to turn on my oven, cooker and iron, the video just sits there and blinks mindlessly at me.”

Hello world!

Nothing. No, nothing comes to mind when faced with a blank sheet of paper. What do you say ? What can I write ? Who are you ? For that matter, who am i ? Such deep and meaningful contemplations seem pointless in a free-for-all forum such as this. I assume if you are reading this you may be bored, lost, looking for something else, or just clicked the wrong icon. I do that often. But i guess that making mistakes comes with the territory, kinda like walking on two feet comes with being human. Yes, trial and error – don’t you love it ? The school of hard knocks is the classroom where we learn most quickly. Textbooks have their place, no doubt. But nothing beats that experience on a terrifically hot day, ice cream cone in hand, just ready to lick off that spot on top, ooh, so good… when – whoops – the school of hard knocks arrives and the delicious ball of sugar goes plop onto your shoe. Global warming ? Naw, just the school of hard knocks. 8-)