Updated: 17/4/07; 10:52:26.
James Strachan's Weblog
Ramblings on Open Source, Java, Groovy, XML and other geeky malarkey
        

Wednesday, December 4, 2002

Both these two posts echo similar thoughts I've had in the past...

Aspects/Runtime Attributes and JavaDoc tags.

There has been some blogging about AOP and generating Aspects and/or Runtime Attributes from JavaDoc tags.

This whole approach seems a bit strange to me. I mean, one the basic ideas of AOP to get rid of "code scattering" and be able to manage the code in one or more specific places.
Spreading out the meta information as tags in the code will give us back the same problem that AOP is solving for us.
[grubbel]

Kiczales Comments on Attribute Based Programming.

Gregor Kiczales (of AspectJ fame) comments in the AspectJ mailing list about Attribute based programming: 

This question comes up fairly often -- people, when they first see AOP, ask "why not tag all the places that an aspect applies explicitly". The problem with doing this is that it violates the main goal of AOP, which is to implement these concerns in a modular way.

To see why this is true, consider what happens if, for a given concern, i.e. Logging, you decide you have the wrong name after a few months. If you have tags all over your code you have to go find them all, and then change them -- the tagging is a non-modular implementation of "describing the affected methods". If you use AspectJ style pointcuts instead, you just go to one place -- this is a modular implementation of "describing the affected methods".

Convenience again in conflict with the concerns of modularity. 

[::Manageability::]

For me whats important is we have an API to access metadata attributes and then plugin different implementations.

So metadata attributes could be implemented via doclet tags or could be implemented via some pattern matching configuration file which is quite seperate from the source code. Or maybe a bit of both. Or combining values from some UML or XMI metadata repository. Or using the new JSR 201 metadata facility, whatever that looks like. etc.

Hopefully commons attributes can be that API.


7:16:06 PM    comment []

Three years ago today. Craig McClanahan: In accordance with the project guidelines as described on the Jakarta web site (http://jakarta.apache.org), I hereby propose that Sam Ruby be granted Committer status in the Jakarta Project. [Sam Ruby]

Crikey. Alot has happened in those 3 years. Happy birthday Sam :-)


3:56:49 PM    comment []

JSR 201 and Non-Disruptive Language Extensions.

Looks like there's a new JSR in the JCP, the following will be added to J2SE 1.5:

  1. Enumerated Types.
  2. An automatic conversion of primitives to their object wrappers. 
  3. Enhanced for loops.
  4. Unqualified constants.

Anyway, the JCP reads: "We have therefore approached the task of updating the Java programming language with considerable trepidation. The existing spirit and features of the language are used by a very large developer community and we wish to avoid disrupting or annoying existing users."

Clearly, the changes aren't too radical, but I'm curious, what kinds of language changes are disuptive?  Obviously, one that does change the VM specification, and of course, the syntax change that makes older code fail compilation.  So, given that we can define non-disruptive language extensions, could we not define a standard way of extending the language?
 
A 1998 paper by Guy Steel "Growing A Language" points out this issue. Guy asks "How should the Java programming language grow?".  He writes: "A language design can no longer be a thing. It must be a pattern - a pattern for growth - a pattern for growing the pattern for defining the patterns that programmers can use for their real work and their main goal."  Read that quote a second time! So he tells us to "go meta", this I hope the next JSR should look like.

[::Manageability::]

Wow this is excellent. Grouping all the various changes to the language (generics, metadata support, enumerations, auto-boxing, enhanced for loop etc) into a single JSR makes lots of sense.

So it looks like the J* I've been rambling about lately is actually now JSR 201.

There are current draft specs for enumerations, autoboxing, enhanced for loop, static import. I do like the new for loop and the static import can be kinda handy for static helper methods and constants.

What I'd really like (though knowing Sun this isn't going to happen) is that this JSR release a reference implementation of this compiler for the new Java langauge that spits out standard byte codes which work on any 1.2 or greater JVM. Then we can all jump to the new Java language (via a reusable Ant task or Maven plugin) without waiting until every end user of our software is on JDK1.5. 

Right now take up of JDK 1.4 is very slow since there are still so many people using JDK 1.2 and JDK 1.3 in production. I'd like us to be able to start using this new language now, without waiting for the entire planet to upgrade to the 1.5 platform before we can take advantage of the new language features.


2:27:42 PM    comment []

I've just finished reading Marc Fleury's article Why I love EJBs and its certainly an interesting read.

I think the title 'Why I love J2EE' would have been better, since in the whole document he barely talks about EJBs (server side Java Beans) but instead talks mostly J2EE services, caching and interceptors. For me the core messages of this paper were

  • caching information locally is a great way to boost performance
  • colocating your services in your web tier can boost performance (i.e. not using server side EJBs and instead using POJOs)
  • using interceptors to add services like transactions is a good thing
  • that CMP is good

Barely is there a mention of EJBs themselves as server side components. Indeed the paper actively encourages the use of POJOs and to try avoid using remote EJBs.

I pretty much agree with most of the above points. I'm suprised that Marc didn't cover the power of messaging via JMS. Store and forward, publish and subscribe and asynchronous messaging very powerful tools (coupled with clustering, load balancing and fault tolerance) for caching and remoting when building scalable distributed systems.

One area I disagree with Marc is on CMP. CMP is one way of implementing persistence for sure though JDO, TopLink, ObjectBridge, Hibernate and so forth are others which are good too. Persistence is one of those complex areas with lots of ways to do it that I don't think there's ever going to be a one-size-fits-all clear winner, It very much depends on your requirements. Certainly CMP and JDO are the leading standard APIs to persistence. The most important aspect isn't which API you use for persistence but that you can use an efficient caching mechanism.

Caching

Caching is vitally important to building any kind of scalable system. It has 2 primary benefits

Reduced latency. Caching typcally greatly reduces latency and CPU usage at the client side (for example in the web tier) and helps to promote an efficient and scalable SEDA style archicture. The less time waiting for remote data to arrive from some back end system, the quicker you can finish processing the current request and get on to to the next one. i.e. your web tier can handle more load on less hardware and provides a snappier response.

Reduced load on back end services. When a cache is used there's no need to hit an expensive back end service (database, EJB/CORBA service etc). Typically caching takes a massive load off the back end servers which can directly result in significant hardware and software licence revenue cost savings for most enterprises.

As you can probably tell by now, I'm pretty keen on caching which is why I've been a long time proponent of the JCache JSR and am also the architect of a commercial JCache product, SpiritCache. Incidentally its been nice to see both Apache and JBoss showing a keen interest in the JCache initiative. I expect JBoss to start touting the power of JCache soon.

Going forward

I'm glad to see that the JBoss folks get it, that its the services inside J2EE rather than EJB per se thats important.

What I think we need to do is to move away from EJB and get back to writing POJOs again and just use AOP and interceptors to implement remoting when we actually need it - which is rare, since mostly we can colocate back end services with the web tier.

If we need to communicate with remote services we have lots of choices. If clients and servers are both Java we can reuse EJB as a possible remoting engine. If we wish to support store and forward, publish and subscribe or just asynchronous messaging then JMS is a great choice. Or we can use other remoting engines like Axis or Glue or AltRMI. Which implementation we choose should depend on the system in question and be configured at deploy time via deployment descriptors and interceptors.

So I think the future of building enterprise Java applications is going to be to take an XP approach. Start with the simplest possible approach, a POJO approach (rather than EJB), then we can use those services from J2SE and J2EE  as we need them (JCache, JMS, transactions, persistence, remoting etc). This coupled with an AOP approach to deploy most of these services invisibly via interceptors will allow us to build distributed systems effectively without wasting time grokking specifications and things we don't need.


12:03:28 PM    comment []

Using daemontools for Orion and Postgresql. One thing I always used to hate about linux was SysV style init scripts. I always wondered why they had... [Talk.org]

This looks pretty groovy. A nice simple way to create unix services out of Java programs. Neat!


9:00:30 AM    comment []

© Copyright 2007 James Strachan.
 
December 2002
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Nov   Jan




Click to see the XML version of this web page.
Subscribe to "James Strachan's Weblog" in Radio UserLand.
Click here to send an email to the editor of this weblog.
blogchalk: James/Male/31-35. Lives in United Kingdom/London/Islington and speaks English. Spends 60% of daytime online. Uses a Fast (128k-512k) connection.
this site is a java.blog

currently subscribed to:

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. <big>kev's</big> catalogue of this and that.

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. /\ndy's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. /dev/null

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ::Manageability::

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Abe Fettig's Web Workshop

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Absurdities and nonsenses

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. All Things

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. All Things Distributed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Andres Aguiar's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Aslak Hellesoy's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. bayard

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Be Blogging

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Blaug Blawg Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Blogging Pubbitch

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. bob mcwhirter

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brett Morgan's Insanity Weblog Zilla

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Behlendorf's Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Jepson's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Brian Maso's Tecno-Geek Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Bright Eyed Mister Zen

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Cafe con Leche XML News and Resources

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. CapeBlog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Citations for : squishy

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Clemens Vasters: Indigo'ed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Cocoon and more

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Code Feed

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Code:Q

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Codito ergo sum

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. corporate eejit

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Coty's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Craig Burton: logs, links, life, and lexicon

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. crazybob.org - web log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Crowbar Tech

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. cwinters.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Darren Hobbs

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. deem

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. deep:code

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dion

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dive into mark

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. DJ's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Don Box's Spoutlet

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Don Park's Daily Habit

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. dorodok

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Doug Kaye: Web Services Strategies

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Eclectic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Eric Alexander

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ericfreeman.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Erik Hatcher - Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Erik's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Fast Takes

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Forwarding Address: OS X

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Free XML tools

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Glen Daniels

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Gordon Weakliem's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. graham glass: what's next?

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. gru's logic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. grubbel

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Guido Casper's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. IKVM.NET Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jason Carreira

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Java Testing, Tools, and Engineering

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. java.sun.com

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. JavaGu(i)(y)

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jeff Turner's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jelly

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jeremiahcode

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jeremy Allaire's Radio

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Joe's Jelly

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Joel on Software

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jon's Radio

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Jon's StudioZ.tv Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. josh lucas' Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. jutopia

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. kdub's log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ken Bereskin's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Knowing .NET

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. mabo

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mac Net Journal

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. MacSlash

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. manicwave

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mark O'Neill's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Martin Dulisch's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Matt Croydon::postneo

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Memory Dump

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. meta-douglasp

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. miceda

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Michael J. Radwin's blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mike Clark

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mitch Kapor's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Mozquito XForms

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Nathan Torkington's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Nicholas Riley's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. nickminutello

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ockham's Flashlight

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Off the beaten track

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. ongoing

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Organic BPEL

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Otaku, Cedric's weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Outer Web Thought Log

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ovidiu Predescu's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Part of the problem.....

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Patrick Chanezon's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Patrick Logan's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Peter Drayton's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. PragDave

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. PSquad's Corner

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Pushing the envelope

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Raible Designs ~ We Build Web Apps

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Random thoughts

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ray Ozzie's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rebelutionary

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Remus

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Rick Salsa's Blog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rinkrank

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Rod Waldhoff's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. rosewater

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Royle's Random Ruminations

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sam Ruby

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sanjiva Weerawarana's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sean McGrath, CTO, Propylon

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Service Oriented Enterprise

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. skizz.biz

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Sklires Skepsis...

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Small Values of Cool

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Spike's GeekBlog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Steve Conover's Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Steve's Radio Weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Technomagica

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Ted Leung on the air

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Blue Pill

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Fishbowl

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Mountain of Worthless Information

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. The Occasional Blogger

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. TheArchitect.co.uk - Jorgen Thelin's weblog

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. TheServerSide.Com: Your J2EE Community Forum

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. thinair

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Thinking About Computing

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Tobiased thoughts

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Tomalak's Realm

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. toolbox

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. transMorphic

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Vincent Massol Think Tank

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Weblog for Costin Manolache

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Weblog: Morgan Delagrange

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. WebMink

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. Whispering

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. X180

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. XMLhack

Radio UserLand users: click to subscribe. Other folks: use the RSS link to acquire this channel. xpzen.com: what's on my mind

Here's how this works.