Friday, September 12, 2008

Phantastic Phun: Fantastic Contraption

I am clearly behind the times by not discovering gem earlier, but thanks to Paul's Blog I finally bumped into the Fantastic Contraption web game. Yay, it is indeed lots of fun.

Physics-based or -inspired games have been around as long as electronic games (even Asteroids had inertia and acceleration; not to mention dozens of others that used gravitation, kinetics and motion etc. etc. etc.). But this is still something slightly different still. And it's easy to think of variations and extensions to the basic idea.

Monday, September 08, 2008

Action, Jackson: 0.9.3 update released

As per "release early, release often", a new patch release of Jackson came to being a few days ago.

So what's noteworthy?

  • This is the first version to be published to Codehaus Maven (I was planning to only release official 1.0, but since this was requested it made sense to do earlier)
  • A few convenience methods were added (JsonParser.skipChildren(), JsonNode.iterator() to implement Iterable)
  • Handling of numbers had minor problems in cases where different accessors were called; accuracy could be lost.
  • A few problems (some of which were due to recent refactoring to use even higher-performance UTF-8 decoders) were fixed

Additionally, I started keeping track of new ideas for additions, features, at Codehaus Jackson Jira. This should also give a sneak peek of things to come in near future, as well as obviously track progress regarding in-progress features and fixes.

The next thing I really want to do for Jackson would be something like XStream's "2 minute tutorial". I suspect most users would want to start with "Java type mapper" (esp. since many other JSON packages only provide such abstractions), so I will probably start by descibring that appoach. Other suggestions are welcome too (preferably via Jackson user list).

... and then I will be off to finish (?) Woodstox 4.0 Typed Access API.

Thursday, September 04, 2008

StaxMate 1.3: a sizable leap for High Performance XML Processing on Java Platform

So here it is: a significant revision of StaxMate library, version 1.3. Given that it is "only" a minor version bump, why is it important?

Because this time around, I focused on improving those small things that are irritating on day-to-day usage, based on my own experiences as well as on my co-workers' experiences; and resolving of which can actually improve both enjoyability and productivity of development. Things like:

  • Lack of decent Javadocs: mostly resolved now
  • Missing Typed Access methods (for booleans, ints, longs), as well as mismatch between element/attribute access, and reader/writer-side support.
  • Verbosity of constructing root-level instances (root cursor, output document/fragment): addressed by allowing factories to be constructed with matching Stax factory, and adding more convenience methods that construct not only StaxMate objects, but also underlying stream reader/writer
  • Unexpected exceptions for some methods: for example, added SMInputCursor.getStreamLocation() that works even if cursor itself is not value
  • Provide SMInputCursor.getPathDesc() (which works best if "element tracking" is enabled; if so, can get XPath-like description)

On the other hand, I did not yet address all items in the backlog (see StaxMate Jira for list of remaining ideas). This is mostly because I really wanted to get a new "official" release out so that this first batch of improvements can be properly tried out by users. And if all goes well, maybe I will get to write an article or two about how to use them. In the meantime, feel free to check out updated version of the Sample Uuid Generator web app included with StaxMate 1.3 distribution package (under dir ./sample-webapp).

With that said, please go and check out StaxMate 1.3, since: "using Stax without StaxMate is like drinking tonic water without gin!"

Wednesday, September 03, 2008

Yet Another Update: Woodstox 3.2.7

Ok, it is time for the quarterly update (it is almost exactly 3 months since 3.2.6 was released), and now Woodstox 3.2.7 is out.

As usual, no new features were added, but half a dozen fixes were applied so that:

  • DOM-support (stax readers/writers that operate on DOM trees and segments) is finally robust, and specifically should work better with JAXB
  • 2 surprising bugs in parser core (one in implementation of XMLStreamReader.isWhiteSpace(), the other in index checks for XMLStreamReader.getAttributeXxx() methods) were encountered and fixed.
  • A problem with Stax2ReaderAdapter.getDepth() was fixed (which affected StaxMate that uses this particular class)

I was also hoping to include preliminary OSGi support, but that was not to be. Maybe it will be in 3.2.8. :-)

... and now I am off to hacking StaxMate, again, and then need to complete Woodstox 4.0. But Jackson wish list has also been expanding rapidly. Well, something else will be released relatively shortly, anyway, and you will learn about it here. Stay tuned & be safe out there.

Smooth Road to Robust Distributed Systems...

... is paved with bumpy unreliable components: see here for details. Couldn't agree more: reliability doesn't come about by piling high-priced (allegedly) reliable components in a loose compost, but from first realizing that thing will go wrong and design with that in mind.

Tuesday, September 02, 2008

World's 103rd Most Popular Open Source Package: Woodstox! (with 3% "market share")

(and incidentally also World's 104th and 125th most popular OS package it seems...)

Ok, so the first thing you are thinking after hearing this press-stopping news must be: what the heck are you babbling about? Ok, here it is: Open Source Census (page 3). It is official now, all we need is Netcraft confirming it (hey, can I get my geek badge back for this nerdy inside joke?)

I think this site is interesting, as yet another tangent on how open source "eco-system" (yes yes, it's a buzzword... but for once, fitting) is evolving. Since there is quite a bit of data to play with, well, some folks are playing with it. That's nice: data may not be groundbreaking, but it is still at least mildly interesting. And something that just would not exist for proprietary systems, not for free, and probably not even for fee.

As to how it all works, I suspect the tool that scans machines to produce submissions on which reports are based on correlates names of found jar files with something like info from Maven repositories, or perhaps OpenLogic's certified library database (description on the page is somewhat vague and mostly non-technical -- which probably makes sense I'm sure there are services being sold, as part of the whole experience). Either way, I hope detection logic can be improved: as is, there are no less (and perhaps more?) than 4 instances of Woodstox (part of this is due to 2 alternate licenses, but naming change for jars between versions 1 and 2 contributes to the problem).

Actual rankings are of course interesting to some degree. You can deduce many things which are sort of obvious: for example, that there is lots of inertia in software deployments (ancient versions being used), that most people just deploy whatever defaults system come equipped with (why else would anyone use, say, Stax reference implementation for anything?), and that software stacks largely determine which other libraries get used. Woodstox would not get even its humble 3% coverage if it was not for stacks like XFire and Axis2 (and many other stacks that do use it as their Stax implementation of choice).

It is also interesting to note that of other Open Source packages I have worked with, the other one listed is Java Uuid Generator. (with 1.3% prevalence, which while somewhat low is still quite high considering it is not bundled with many stacks [AFAIK]). And Jackson and StaxMate should make it to the list in future. I especially hope that No Coder Has To Suffer from Writing Pure Stax API Code. Ever. There is no need, now that StaxMate works on all known good Stax implementations. And Jackson: well, considering that it is more than 2x as fast as Woodstox on parsing (when using equivalent document information), what is not to like?

On that note, I better go and finish up StaxMate 1.3. It will be good. You will like it, and will want to use it. Stay tuned!



Related Blogs

(by Author (topics))

Powered By

About me

  • I am known as Cowtowncoder
  • Contact me at@yahoo.com
Check my profile to learn more.