Cornelia's Weblog

my sporadically shared thoughts on, well, whatever is capturing my attention at the moment.

Archive for May, 2010

A Software Dude(tte) Plays with Hardware

… or Dealing with a Loud Computer Fan.I’ve been known to pop a card in and out of a desktop, or swap out a hard drive or add memory in my laptop but let’s face it, these things are pretty darn brain-dead so I don’t get a lot of points for that. So what I learned this week about some hardware is noteworthy – at least for me.The whole things starts with me eating the EMC, or rather VMWare dogfood. Over the last 6 months or so I’ve moved more and more of my environment over to VMs. My goals are slightly different than VMWare usage in most data centers; in data centers (one of) the goal is often consolidation – running multiple VMs on the same hardware – hardware that otherwise would be underutilized. My use of VMware is quite the opposite; I don’t have enough hardware to run all of the VMs that I have, though I rarely have to run more than a couple at a time. I am heavily leveraging VMs to help me with dev and test; I have one image that is my official EMC image that includes the office suite, including email, and then any number of dev images that have different technology stacks on them. I’ve got my XML REST Framework dev image and another for test, I’ve got an image for working with a bunch of latest/greatest Apache products like CXF, ServiceMix and Camel, etc. But that’s just it, my laptop doesn’t have enough horsepower to run two images at once.So under my desk I had an old machine acting as a footrest. I had replaced that machine with a more full featured desktop a bit more than a year ago – one that could handle some basic home video processing. The old one was a very basic model – absolutely no bells and whistles. But I thought maybe it would have enough horsepower to run one of my images. Over the weekend I loaded up Ubutnu 10.04 and then VMPlayer, transfered over my VM files and fired it up. At this point it all looks good, but it doesn’t sound good. Every few seconds the machine fans kick into overdrive and the resultant sound makes this a non-option. So this self-proclaimed software dude starts googling. I’ll spare you all of the details and get right to the summary.

  • The fan was kicking in exactly as it should – notching up when the CPU temp was passing a certain threshold
  • The CPU temp, when idle was running around 57C and was kicking up to the 61-63C range when under load. (Some digging and I found that the max temp recommendation is in the upper 70s for my processor)
  • I thought briefly about trying to change the trigger points for the different levels of fan speed but found that the current configuration was pretty standard
  • I took out a graphics card that I had previously put in (don’t need it to read email) and that lowered the temp by a couple of degrees

At this point it was a little better but still not where I wanted it to be. I started looking at heatsinks for a possible replacement. I had also seen a lot of recommendations about cleaning out the dust. Yeah, there was a fair bit of dust in and around the fans and the heatsink so I went down and bought a can of compressed air, blew everything out and hooked it all back up.And OMG! The idling temp went from 57C to 31C and the under load temp went to the 37-42C range!!! I was thinking “what’s a little dust?” but a little dust makes a big difference! (remember, I’m a software geek) So if your fan is kicking into overdrive all of the time, FIRST, try cleaning out the dust – that may be all you need to do.

Second Version of the XML REST Framework Released

To coincide with EMC World and the presentation I gave on RESTful SOA, I’m delighted to report that we have released the second version of the XML REST Framework. As I described in a previous post, the April 18 release introduced a framework that allowed a services developer to produce RESTful services over EMC Documentum xDB by “declaring” the resource model, including definition of the uniform interface and media type handling, with Jax-RS annotated POJOs and by using XQuery to implement the operations of the service. This was a good start, yet didn’t really go far enough to even call the resulting services RESTful because the resource representations that flowed into and out of the services where completely devoid of hyperlinks.The new version of the framework now provides the developer a mechanism for insertion of hyperlinks, again leveraging XML standards to do so – this time I’m talking XSLT. Just as with the first version of the framework, the code that goes into your Java POJOs is very thin, essentially calling into the framework that in turn invokes a series of XML-centric steps. The job of the developer then is to inject (using Spring dependency injection) the XML processing artifacts that achieve the required functionality. With the first version of the framework that was an XQuery per operation, and now in version two it is an XQuery plus one or more XSLTs. In version one of the framework you there was only one option available – to execute a single XQuery; in this new version you have the choice of three different “pipelines” – XQuery alone, XQuery followed by an XSLT and XQuery wrapped by XSLTs before and after. Included in the sample application that is part of the framework release are some XSLTs that make it very easy for the developer to simply declare the links they want inserted – no great XSLT expertise required.The EDN postings go into a good bit of detail on how you can leverage the framework. Each posting has two main parts – code and documentation. If you haven’t already downloaded and installed the code from the first release then go directly to the code in the second release; it is a superset of the former. For documentation, please start with the first release – it describes the base framework – and then move on to the docs for the second release; the latter adds to the former rather than replacing it.Finally, yes, there is more to come. We have a very early implementation of the next version of the framework running in the lab (thanks to my very able colleague Xiaotao Liu). Stay tuned, I’ll give you some hints as to what will be included over subsequent posts. I promise it will be fun.

RESTful SOA at EMC World 2010 and …

It’s been a really good week for me. I didn’t attend EMC World last year because, well, I didn’t really have much to talk about. But in the last year the work that we have been doing in the CTO Office around an integration architecture that has emerged as Service-oriented and RESTful has reached a point where there is not only plenty to talk about but, wow, there is a stream of additional work that follows on from this. I’ll be busy for a while. Aside from having the opportunity to attend some great sessions and connect with a whole slew of really talented people, I also had the opportunity to present a session in the Developer Track of the conference.The title of the presentation was RESTful SOA, Developing RESTful Web Services for Distributed Applications (Like Cloud). (Hmm, as I type that title now I realize, of course, that “Cloud” is not an application, but I think you know that I mean “like those running in the cloud.”) I was scheduled in the last slot on the last day of the conference – OUCH! All week I spoke with people who said “I’d love to see your presentation but I’ll already be on my way home.” So I expected around 10 people, half of which would be colleagues, and low and behold, I think there were more than 50 in the room!! That really speaks to the interest that people have in this still emerging architectural style.After spending just a moment to introduce what we do in the Architecture Group of the CTO Office (work on an integration architecture) and why we are embracing a RESTful approach, the presentation broke out into two almost equal halves.In the first chunk I talked about REST in general. I still feel that most folks understand only a part of the four fundamental cornerstones of a RESTful architecture. Those cornerstones are:

  • A resource centricity and addressability
  • Abiding by a (the?) uniform interface
  • The use of media types for resource representation
  • And hyperlinking

For each of these cornerstones I covered what it is and why it’s important. In the discussion on the uniform interface we drilled down the the characteristics of safe, idempotent and cacheable (Joe Gregorio talks about “zippable” as well – I don’t have any experience with that one yet so have little to say at this point). Rather than writing a whole chapter detailing these things let me give you a brief analogy – the web as we know it today. It works as well as it does, it scales as well as it does because it is RESTful. You can access web resources (web pages) via their URLs, new web sites can be added with no performance degradation in part because of the layered web and cacheable operation results, the network can be unreliable yet applications still work because of safe and idempotent operations, a range of different devices and application types all work against the web, and you can navigate to related resources, without going through some central point of control, by simply invoking embedded hyperlinks. Way cool.Following this discussion on RESTful architectures in general, which took us through the first half of the hour, I moved on into pragmatics and talked about an approach for implementing RESTful services. Using the steps outlined in Richardson and Ruby we quickly covered how to implement services that achieve resource orientation and addressability, implement a uniform interface and support various media types. We use Java and Jax-RS annotated POJOs to declare our services and for implementation I showed how you can use XML technologies such as an XML database like EMC Documentum xDB and an XQuery engine (a part of xDB) to avoid a lot of grungy Java code. The steps for the services developer are very prescriptive; assuming the resource model and physical model are designed she will:

  1. Declare the resource model and uniform interface; a Java class per resource, a method per uniform interface operation supported.
  2. Craft an xQuery to mediate from the resource model to the physical model and to implement the service operations.
  3. And glue it all together using spring.

The first version of the XML REST Framework we have created can be found on the EMC Developer Network and the article that delivers the release goes into much more detail on how all this works.BUT, we’re not done. The resource representations we produce and consume using the first version of the framework do not include hyperlinks. Can you imagine a Web where you have to go back to some index each time you want to access another web page or complete your Amazon purchase? Or one where you have to know the exact URL for EVERY page you want to access? Well, without links in resource representations that is exactly what we are forcing the client programs to do. So the final part of the presentation covered the extensions we made to the first version of the framework to enable the services developer to easily insert hyperlinks to related resources within their resource representations, using XSLT. For details on how this all works please see the second version of the XML REST Framework, also found on the EMC Developer Network.Unfortunately, with so much material to cover I had little time left for questions during the session but fielded quite a few after we had broken up. If you were in the session, or even if you weren’t, and have any questions, fire away! Thanks to everyone who attended EMC World this year – and especially those of you who stuck around until the end.