Sunday, May 30, 2004

Aspect Oriented IT fits BEA Liquid Computing

(imported from http://blogs.codehaus.org/people/avasseur, read comments there)


Last week I attended eWorld, mainly as a speaker. It was a unique view on BEA's Liquid Computing vision kick off. Where AOP fits in Liquid Computing vision ? Why should we go on simplifying the AOP stack as our motto in AspectWerkz : full Java, J2EE integration, Java 1.5 readyness, value added Aspects, tool ecosystem... ?




Liquid Computing is the vision for a Simplified Enterprise Computing. Don't think it is SOA. SOA is what BEA provides today with Platform 8.1, but tomorrow, it will be something more.
"The time has come for a comprehensive vision for IT. One that improves business responsiveness by simplifying enterprise computing."
- Alfred S. Chaung
Founder, Chairman & CEO
BEA Systems, Inc.




Reading more in BEA's Liquid Computing pdf brochure, I found it is good exercise to emphasys on specific topics where AOP is a key way to enable Liquid Computing.

Note: the following is my own personnal vision and does not illustrates any official statement from BEA.




Active Adaptability: "Dynamic instrumentation and monitoring will track, display and manage system capabilities. At the core, the infrastructure
is constantly tuning itself in the service of the business."




Self healing policies can be easily builded on Dynamic Aspects.

Dynamic weaving capabilities of BEA JRockit and AspectWerkz has been demonstrated at our eWorld session, activating JMX reporting at runtime, in a web service / pojo based application running on 8.1 and a not yet released version of JRockit.



We can extend the demo to dynamically weave a caching aspect at our web service level to provide a business specific self healing policy. All this stack could be builded in 1 day based on AspectWerkz dynamic AOP stack, no matter the application complexity itself.



This is active adaptabilty now, on Platform 8.1. The same key idea can be enabled today on your older WebLogic Server 6.1, or on your Tomcat stack - whatever is running Java 1.3+ can be handled by AspectWerkz Dynamic AOP.




Enterprise compatibility: "the application just plugs into a
compatibility layer [Compatibility Fabric], rapidly delivering and sharing new
capability."




Cross cutting requirements can be addressed rapidly by AOP technologies.

The AOP stack is the compatibility fabric of the cross cutting concerns inherent to all software applications. Thinking AO enables to decouple this concern and address it as a single requirement, allowing change at this level only, to provide the same functionnality with a different underlying implementation but without any change in the application that serves your business.



At our session we have demonstrated an authentication / authorization service implemented in AO. The underlying implementation was using JAAS. It can now be easily enhanced to provide an implementation specific to any IT environment, be it JAAS compatible or not, be it LDAP based, or be it with very specific policies. This software complexity is reduced to the Aspect, and does not impact the functionnal requirements of the application.


It is not WebLogic specific. The same AO stack can be used to secure a Swing based application as well.



The AO implementation brings cross application security live in a minute, no matter the complexity of the application(s) and the IT environment. For more complex requirements, this AO implementation can be enhanced with business specific rules (application flow, business rules, dynamic activation of policies) by adding aspects on the stack, where those are needed.




Breakthrough Productivity: A powerfull engine that extends self-service "into meaningful application functionality. It gives business owners
the ability to make changes to processes and capabilities on their own.[..] There’s no downtime, no need for traditional re-programming and, because IT maintains governance, no loss of IT control."




Self servicing can be enabled thru a dynamic AO stack. Deploy a new aspect that encapsulates a new functionnal requirement, and have it inserted in your running application with dynamic AO, and metadata driven programming.



Metadata driven AOP brings self-servicing to a new IT control era, where model driven architecture can be unleashed by an AO based service stack. Add a cache on service methods, no matter the application was designed for a cache requirements. Change this cache to be distributed, single user based, or for the flow of this specific use-case. Add a JMX reporting layer on it to control cache hit count. Remove this cache when system is not under load.

At our AOP: SOA for the application eWorld session, we have demonstrated hot acitvation of a caching aspect while application was live. We have extended the cache scope to some other business method at a later point, just by using a tool and 3 mouse clicks.



AO solves a traditionnal multi-step IT project iterations in a disruptive way. Pick vendor certified aspects, hotdeploy them with tools and have them bringing your IT to the next generation of your requirements without any downtime. This is Breakthrough Productivity. I would have wrote Disruptive Productivity.




Conclusion: Go live with AO !



The three key concepts of Liquid Computing are part of Aspect Oriented Technologies and especially full java dynamic AOP stacks like AspectWerkz. A good aspect set, tools ecosystem and manageability of the AO layer itself disrupts the classical vision of IT projects. "Design, develop, QA, deploy" is turned into an on demand self servicing layer allowing you to concentrate on your assets. Dynamic AO brings Active Adaptability, address Enterprise Compatibilty and provides Disruptive Productivity.
The AO ways decorrelates your IT complexity from the complexity to address new requirements. Changes are made easy.




I hope this high level view on AO, the issues we aim to address everyday as an AOP stack builder, and the demo we can do today convince you that Aspect Oriented Technology is a key piece of the Liquid Computing puzzle.



Up to us to bring all this value to you now.

Make it live today with AspectWerkz. Ask for docs, demos, support, articles, tutorials. Join us in this aspect and tool ecosystem building.

Go live with AO. Go live with Liquid Computing. Go live with AspectWerkz.

Thursday, May 27, 2004

AOP integration in Tomcat 5

(imported from http://blogs.codehaus.org/people/avasseur, read comments there)

On several recent ML post AspectWerkz users complained about getting into troubles when hooking in AOP in Tomcat 5. Steve provided good feedback but ... there is off course a damned better way to handle that !


Here is a little hands on that gives the idea for a 5 minutes shot.
Pretty much straigthforward based on


  • cvs head ie the next 1.0 beta and not 0.10

  • no integration detail, just some bin/aspectwerkz.bat magic

  • aop.xml deployed wihin the target application itself

  • a little fix in a strange Manifest.mf file in qdox-1-3.jar



I was concerned about this issue and had an hectic face to face burger discussion with Jonas about "my" so called seamless integration of AOP... I needed to sit down on that and hack, too bad for the jet lag in this crazy GMT 9h far from home SF BEA eWorld clock.


Since the Codehaus had to migrate some CVS details today, the little qdox.jar fix that is needed cannot be commited, but just do it yourself if you want to go on with those explanations. Or wait tomorrow since Bob the despot is around there as well... He'll fix that for me if he is not too busy on the new Codehaus / BEA BeeHive stuff there.


So I took a Tomcat 5 from Apache, unzipped the stuff on my windows box.
I checked that it was fine with the bin/startup.bat and shutted it down to spread AOP in.


Then I made sure that AW *cvs head* was builded, and ASPECTWERKZ_HOME and JAVA_HOME was set.


I decided to give a try to this integration issue and decided to start with a silly tracing aspect that is sitting in AW samples (examples.logging.JavaLoggingAspect). I then builded the samples with a maven target (aspectwerkz:samples:compile)and had a new target/aspectwerkz-samples.jar ready to use.


Then I just opened this bin/catalina.bat that is actually starting things and added this just before the comment:


rem Execute Java with the applicable properties
...

to have AOP seamless integration:

set CLASSPATH=%CLASSPATH%;%ASPECTWERKZ_HOME%\target\aspectwerkz-samples.jar
set _EXECJAVA=%ASPECTWERKZ_HOME%\bin\aspectwerkz.bat
set JAVA_OPTS=%JAVA_OPTS% -Daspectwerkz.transform.verbose=false

So as you see I go with the bin\aspectwerkz.bat way, which is the easiest kick off stuff we provide, with adaptive behavior regarding Java version detection etc, even if when it comes to production usage I would rather use some JRockit VM.


You will have noticed that I just added my silly tracing sample aspect in the CLASSPATH and replaced bin/java call by bin/aspectwerkz.bat - not taking care about the details.


From there, Tomcat started up *almost* fine. The AW/lib/qdox-1.3.jar has a strange Manifest.mf file that Tomcat complains about... Just dropped this Manifest.mf from the qdox.jar and we are up and running with AOP online mode / class load time weaving / AOP container from cvs head.


Time to bind my system level tracing Aspect to some application.
I did a try by writting a 5 lines aop.xml file (actually copy pasted it from AW samples/hotdeployed.xml) and dropping it in Tomcat samples in webapps\servlets-examples\META-INF\aop.xml, since this is what we now provided in cvs head (and not in 0.10).


Once that done, nothing happened. I added some tracing stuff (-Daspectwerkz.transform.verbose=true) and figured out (with a bit of pain since toString() on Tomcat classloader is damned too much verbose..) that Tomcat classloader is not taking this META-INF topmost stuff into account.


I decided to move that to the WEB-INF/classes path, so ending up in webapps\servlets-examples\WEB-INF\classes\META-INF\aop.xml [file below]. I ll double check that later since this WEB-INF/.../META-INF is a bit strange there.


and here it is (once I browsed to http://localhost:8080/servlets-examples/)


METHOD_EXECUTION--> filters.ExampleFilter::doFilter
METHOD_EXECUTION--> HelloWorldExample::doGet
METHOD_EXECUTION<-- HelloWorldExample::doGet
METHOD_EXECUTION--> filters.ExampleFilter::toString
METHOD_EXECUTION<-- filters.ExampleFilter::toString
METHOD_EXECUTION<-- filters.ExampleFilter::doFilter
METHOD_EXECUTION--> filters.ExampleFilter::doFilter
METHOD_EXECUTION--> SessionExample::doGet
METHOD_EXECUTION--> listeners.SessionListener::sessionCreated
METHOD_EXECUTION--> listeners.SessionListener::log
METHOD_EXECUTION<-- listeners.SessionListener::log
METHOD_EXECUTION<-- listeners.SessionListener::sessionCreated
METHOD_EXECUTION<-- SessionExample::doGet
METHOD_EXECUTION--> filters.ExampleFilter::toString
METHOD_EXECUTION<-- filters.ExampleFilter::toString
METHOD_EXECUTION<-- filters.ExampleFilter::doFilter


aop.xml


<!DOCTYPE aspectwerkz PUBLIC
"-//AspectWerkz//DTD//EN"
"http://aspectwerkz.codehaus.org/dtd/aspectwerkz.dtd">
<aspectwerkz>
<system id="sample">
<aspect class="examples.logging.JavaLoggingAspect">
<pointcut name="pc" expression="execution(* *..*.*(..))"/>
<advice name="logMethod" type="around" bind-to="pc"/>
</aspect>
</system>
</aspectwerkz>
]]>


Conclusion
We are almost there and 1.0 will be damned good don't you think ?

Thursday, May 20, 2004

See you at eWorld

(imported from http://blogs.codehaus.org/people/avasseur, read comments there)

I am moving to San Francisco for BEA eWorld.

Jonas and I will give several sessions / demos about AOP in BEA JRockit and the BEA WebLogic Platform, including WebLogic Server and WebLogic WorkShop.

In case you are in the area but do not attend to eWorld, just join the Silicon Valley BEA User Group since we will be there on wedsnesday as well.

We have been under the radar since AOSD, so be ready for something disruptive !
I will post a viewlet of some parts of the demo in some weeks.