Recent Posts

RSS Feeds

Globus Kit - Grid Computing on the Cheap


Cool talk on the Globus OS tools for doing grid computing. Very cool stuff.

my notes

Advanced talk on Globus tool kit 3.

 

(http://www.softwaresummit.com/2003/speakers/brown.htm)

 

GT3 Notification

1)    notification source fires events

2)    notifiction sink receives

3)    associate with some dummy service data

4)    add “ogsi:NotificationSorurce/Sink” to GWSDL

5)    sink calls addListerns on sources Service DataSource calls notifyChange to fire notifcation

6)    sink implements deliverNotification to catch

There is no tool support for the java files to declare what the GWSDL tools should do to get source and sink. However with JSR 175 you could imagine a way that this declaration could end up in java file.

 

The idea behind this is to do coarse grained notification.

 

The Service Data:

1)    structured data associated with a grid service – zero or more Service Data Elements (SDE) per instance

2)    SDEs are described by an XML grammar – java bean is generated for each SDE type (defined in an XML schema? He said .xsd file)

3)    Client calls findServiceData(“SDE1”) – careful of misspelling

4)    Helper methods extract populated Bean instance

5)    Use conjunction with notification – add payload to event.

When the interesting ‘data thing’ gets pushed along with the event. The client gets the data with the event. The other side is a pull notification where the client gets dummy data and then has to call back to the poster to get the data.

 

The SDE’s are associated with the service its self and the instances of the services

 

SDEs in every grid service

1)    GridServiceHandle

2)    FactoryLocator

3)    TerminationTime

4)    ServiceDataNames

5)    Interfaces – names of all interfaces that a service implements

 

Quick of write a grid service

1)    define all aspects of the service interface –java or gwsdl

2)    generate grid support code

3)    four mor steps

 

Grid project – example

1)    Distributed SBG Rendering

2)    RenderSourceService

a.     Farms out the svg file and a rendering area to each worker

3)    RenderWorkerService

a.     Builds a jpeg from the specified area of the svg file

4)    GUI Java Application

a.     Creates RenderSourceService via factory

b.     Triggers worker service to get work from source service

c.     Watches for status notification and finished jpegs

d.     Displays all status and tiles the sub-mages as completed

 

If I want to make my machine available I have to download Globus which takes 30 minutes or more. And there is a bug that he could not make work so he made it all local on his machine (wouldn’t it be cool if we could do that during the demo?)

 

GT3 Features

1)    factories

2)    notification

3)    service data

4)    standalone clinet

5)    could it do more, sure! This is all we need for the demo.

 

Next was code. Cool Stuff.

 

Eclipse integration is coming but not there yet.

Services are defined by interfaces, duh…

Used batik from apache to do the actual rendering. Batik gets the URL and can render from that.

 

The RenderWorker takes a renderSourceHandle which referres to the RenderSource via the handle (i.e. this is the uri to the RenderSource service) to get at its work.

 

Must have a ‘schema’ directory conisident with the code directory (foo.bar.objects, foo.bar.schema).

 

The xsd describes the methods and their arguments and their return types.

 

anyType represents ‘Object’ if you will. It’s the generic type. Used to represent the returned image from the worker service.

 

Basic steps, get a factory, use the factory to create the manager service, use the location stuff to find the created service, set the initial parameters.

 

Start some worker thereads (passing the handle to the manager) that will go back to the manager service and ask about the work to do.

 

The locator is used to find several workers and then tells them to start. They will in turn go back to the manager and ask for some work.

 

When notification happens we get the any data stuff (defined in schema) then we have to do some Corba like narrowing. To get the any type downcasted to the type we want.

 

GUI – creates a render factory instance and 16 renderers (which could be running on our machines). Distributed rendering of an image across 16 threads (which could have been on our machines). Very cool demo, can’t wait to play with the code from the CD.

Permalink     No Comments

J2EE Metadata Talk


Just finished Simon's talk on JSR 175.

here are my notes

Simon Nash – member of JSR 175 team

(http://www.softwaresummit.com/2003/speakers/nash.htm)

Back ground and motivation

JSR 175 specification

1)    Source syntax

2)    Processing model

3)    Runtime api

4)    Class file format

5)    Standard annotations

 

Background – java is imperative not declarative, java has declarations but only for core language constructs. The declaration of ‘the what’ limits the scope for tools to help the developer be more productive.

 

The annotations are beyond the bounds of the language, instead it fits into the language. Its not about making Java huge to handle every  thing, its about making a way for you to extend stuff so that you can declare what in your java classes (i.e. this class is a web-service). The annotation are not part of the program logic but can affect the meaning of the program (i.e. the declaration that the class is a web service might causes WSDL to be generated at deployment time). An annotation will not change the way assignment works or the way that try/catch works.

 

Semantics of the annotations can be standard or user defined. (I’m assuming that at some point we will see how to use user defined annotations. Just said we’d be getting to that…)

 

Benefits – productivity, clarity, flexibility, correctness – all the same stuff you get from something like MDA or other model based code generation. I like this but its just not new. Now that its becoming part of the language though it seems that we might be at the cusp of general acceptance of meta-data based programming (i.e. MDA). If you build bad stuff with this it will be bad. Clearly you can build bad stuff with anything, this is no difference.

 

Q: will AOP make use of this, A: probably, seems a natural fit (the join points should be able to be specified with these annotations).

 

175 – simple meta-data in source code, attached to program syntactic elements, limited range of type, stored in the class file (available at runtime), can be read at runtime.

 

Cool example of declaring a web service for a class. Interesting thing to note is that the types of the attributes for annotations is only a limited set (most noteably not Object or any arbitrary subclass, only the types defined in the JSR to be able to be used).

 

Attributes can be defaulted.

 

An example of @WebService annotation for a class then adding an @Operation on one of the operations. The @Operation is not explicitly contained in the @WebService.

There are 4 meta-annotations @Target – what can the annotation end up on, @Retention – how far to carry the annotation forward, @Inherited – declares if the annotation should be inherited, @Documented – should this stuff show up in the java doc.

 

@Retention – runtime, class or source – class is default, runtime makes them available for reflection

 

Since source is the default retention it seems that the expectation is that post processing on class files will be the norm.

 

Annotations can be used anywhere that ‘public’ can be used. They are seen as modifiers.

 

You will be able to annotate your package with a package-info.java file.

 

Processing Model:

1)    Source based

2)    Class based

 

You can integrate your annotation processors with the java compiler? There was a slide about that but it appears that its not ready yet. The way they are thinking is making a plug-in architecture for the compiler. Today what you have to do is post process the class file or process the java code (i.e. you have to parse the java…)

 

JSR 175 extends the reflection API’s to get at annotations. There is a new thing called AnnotatedElement.

 

More annotations are changed or defined in JSR’s (181, 207, 224 others as well).

Permalink     No Comments

Portal Talk


Just finished Paul's talk on Portals. Very interesting. I can't wait to get back to normal life so that I can spend some time playing with all the cool stuff that I've learned here...

my notes

Paul Giangarra – Portals

 

Third or forth generation portals are about collaboration? Missed the detail on that comment.

 

What is a portal?

1)    a place to start for your users

2)    a place to aggregate the stuff that people want to do

 

Value of Portals

1)    simplify access to resources

2)    eliminate information overload

3)    personalize for the one-to-one marketing appeal

4)    collaboration meets applications

5)    the enterprise now ‘owns’ the desktop

 

The Portal helps to aggregate the information that we want to see, personalized etc. Allows us to avoid info-overload.

 

Why Portals – employee productive, increase efficiency through automation, quicker response to customer

 

Gen0/Gen1 (-1998 to 2000) portals simple hyperlinks and search, homepages on sterids

 

Gen2 (2000 to 2001) robust app framework, collaboration, Mobile and wirelss, management framework, being deployed today

 

Gen3  (2002+) context personalization, cascading portals, web services, process integration, abstraction layers, federated search, federated portals, p2p offline support, proactive notification, mainframe support, knowledge management

 

Why are biz portals so important?

1)    eventually all web apps will be portal apps

2)    portals will be the most visible software infrastructure in a company’s e-business strategy

3)    the need for integration drives the growth and importance of portals

4)    application vendors are using portals as UI and Integration

5)    Portal frameworks…

 

Portal Planning Process – or how to get a portal into your company

1)    obtain sponsorship

2)    analyze drivers and expected benefits

3)    inventory the features desired

4)    conduct an infrastructure impact assessment

5)    select products

6)    sell internally

Basically laid out how to decide if you want to build a portal, decide what you want/need, a portal for portal sake is stupid.

 

Don’t confuse a Portal with a web site. The are not the same, the portal is window into web applications/web sites.

Portal Infrastructure

1)    knowledge arch

2)    community arch

3)    security arch

4)    tech arch

5)    dev and dep

6)    operational arch

Important for B2C portals to truly aggregate the info instead of sending you off (i.e. looking at CD players and linked off to Sony, you just lots a customer, Sony.com has a link to ‘find someone to sell this to you’).

 

Knowledge management is important in building a portal. Unstructured info is just info, if you can organize it its knowledge. We need knowledge.

 

(Paul spawned a thought: Interesting thing to think about: A development portal for open source communities. Why don’t we have something like a portal for developers. Aggregate information into knowledge, connect people in great ways that makes the community more effective.)

 

Lots of detail about objectives that you’d want to build a portal for. This was a lot like a marketing pitch of why portals are important, i.e. why do a portal.

 

Technical arch of the portal

1)    Portlet container services

a.     Content access

b.     Web clipper

c.     Search

d.     Document manager

e.     Po9rtlet data

f.      Admin

g.     Collaboration

h.     Credential vault

i.      Portlet proxy

j.      Single sign-on

2)    J2EE

3)    Page aggregation

a.     Themes and skins

b.     Transcoding

c.     JSP tag library

d.     translation

 

Base portal design – think about it, users, admin, roles etc.

Think through your page layout as well. Title bars, menu’s, hierarchies of portlets etc.

 

JetSpeed is a great spot to play with portlets.

 

Themes do most of the hard work for cross-browser support and accessibility.

 

Delta from JSP/Servlet to Portlets,

1)    portlets are very dynamic

2)    portlets can know personalization info, locale, devices etc.

 

Building a poral –tasks

1)    creating page definitions

2)    create themes ad skins

3)    developing portlets

Cool thing is that all this can happen independently.

 

JSR 168 gives us – interoperability between local portlets and portals, i.e. we can put a portlet written WLS can be deployed into WebSphere

 

WSRP – goals

1)    enable the sharing of portles (markup fragments) over the internet with a common interface

2)    enable cross vendor publishing and consuming of content

 

WSRP allows us to build a portlet and let it be vended into another portal?

A proxy portlet receives info from a web-services interface and then render that portlet in the local Portal.

 

On the portal server the generic proxy (only one, we don’t need to implement it) and it goes off via SOAP and asks for some rendering to be done. The proxy then takes the rendering from the back end and displays it. Very interesting.

Permalink     No Comments

Economics of Open Source - Thursday Keynote - Simon Phipps


Cool talk about open source. And the way that OS will work in the future and the way that it works today. Major point - OS is about community and not about the license.

my notes

Simon Philps – keynote

 

The Massively Connected Era – assumption is mostly valid, the infrastructure is something we can take for granted. When you can just connect and not worry about the syntax of XML etc. you are massively connected.

 

Rapid evolution, in just one decade the world has become massively connected. Other major changes with new inventions has changed the world a lot fast than other inventions.

 

Technology Promotes Connection – divice proliferation, growing bandwitch , SOA, many dimensions/layers of relationships

 

Moving towards Fractal Architectures – we are moving to networks of networks. (Grid Computing?) We will need an understanding of fractal dynamics in networks.

 

Massively Connected – every node is connected to everything else. Thankfully the Internet was not build like bulletin boards. Instead it was built with free open source shared, open, royalty-free standards.

 

Exponential Opportunity Growth through blah blah blah, missed what he said…

 

Interpreting Open for the Era:

1)    80’s

a.     hardware-inspired standards processes

b.     committee membership, specification

2)    90’s

a.     business-inspired standards processes

b.     consortium membership, implementation

3)    21st

a.     community-inspired standards processes

b.     community involvement, open source

Open source is more about the consequences of saving a few bucks on your purchase price, it’s a result of our massively connected time.

 

If the network were the computer,

1)    there would be no boundaries to defend, security would be very different. If we had an identity based approach, web services would be different, because we would not have to be pushing everything through port 80. Instead the security would be defined around identity instead of the boundaries.

2)    Software would become a service that would self organize etc. We would not have to know about or care about where it was running. Grid computing again…

3)    Software would be licensed on scale, not on implementation details. We don’t know exactly where/when the surge will show up so you don’t need to know about licenses (or should not need to know).

4)    System stakeholders would be enfranchised in development. The individuals involved in using (i.e. stakeholders) the software should be involved in defining the software.

The network is the computer now. Part of the reason everything is changing so quickly.

 

Open Source:

1)    it is mostly or largely a development methodology

2)    definition – commons-based peer production http://www.benkler.org/CoasesPenguin.html - 2 modes of production in the past, artisizans work, and manufacturing. Open source is the new type of production, commons-based peer kind of production. Interesting idea.

3)    Structured and controlled development

a.     Reputation-based

b.     Controlled by initiators

c.     Things based on your reputation not your status, your employer etc.

4)    High quality results commonly

5)    Remains loosely-coupled – maintains choice

a.     First and foremost is the right to fork the code, you can always take the code and make your own copy.

6)    Facilitated by commons-creating license

a.     Make the commons possible, not the most important thing, just makes it possible for the community to form and contribute

7)    Many licenses, one objective – make the community possible.

 

Open Source: Agile Development done by a community

 

Open and Proprietary – lots think these are opposite, they are not, standards are open or closed, source is community or proprietary, impl is interoperable or locked

 

Staying Open…

License is for copyright, who owns it and why – LGPL and GPL keeps the power in the hands of the copyright (and threrefore power) holder and not the community.

 

Understanding open source – deployment

The scope of free – free is not the same as zero dollars, free is about freedom not about saving money. Source is for developers, deployers don’t really care about source, they want it to work and be able to fix it if its hosed. The licenses facilitates community.

J we use the same term for our consumers as the drug industry, the first shot is free. J

 

deployment models for open-source;

1)    help your self

2)    package to produce and support

3)    customize per use and support

4)    customize to product and support

5)    aggregate to bundle and support

These are the ways that we will be using open-source in the future.

 

Research suggests that the #1 reason is choice and freedom and quality of the code. Cost is shared, not free, but controlled and shared.

 

www.sunsorce.net for details

 

Lots of other stuff about the open source stuff that Sun, openoffice.org, netbeans.org,

 

Sun Java Desktop System – complete desktop for the average user – initalliy aimed at groups. Looks really cool (it just works, idea ‘stolen’ from the mac J) Open office, mozilla etc.

 

Why sun is doing open source:

1)    shared innovation

2)    customer and partner benefits

3)    increased quality and security

4)    future direction of most software

5)    base for future evolution of best practice and unexpected value

6)    and its still great stuff even after all that

 

Sun’s Expirences – Issues

1)    open source is a big step – its for life not something you drift into

2)    source needs hosting

3)    community needs facilitating

4)    license issues outside education of most IP attorneys

5)    Developers find public exposure a shock

6)    Managers find loss of control challenging

Sun’s Experience – benefits

1)    Good returns

a.     Savings take time to appear

b.     Community is chief asset

2)    Software quality is better

a.     Fewer bugs, more quickly identified

b.     Design tracks market needs

c.     Design improved by extensive review

3)    Lock-in Avoided

a.     No single dominat force

b.     Influence of would-be marked controllers largely avoided

c.     Can always go elsewhere, no IP locks

 

Open Source is the methodology of the massively connected society

Business models of open source are better and the only way to support open source. The community is not set up for deployment, most people choose open source for freedom not because the price tag is low.

Permalink     No Comments

Grid Computing - really cool stuff


Just finished with Paul Giangarra's talk on grid computing. I have not done much more with grid computing than watch IBM's comercials so this was a ton of new info. It was really cool and if Grid computing really does take off and becomes a natural part of computing we will have a bunch of cool new stuff to do and work with.
I need to run to my speaking spot so I don't have time to say more. This was a cool talk.

my notes

Paul Giangarra – IBM – done grid computing for govt.

 

What is Grid Computing

1)    why do I care

2)    what does it do

3)    how does it do it

Grid computing core concepts

Grid computing architecture

Grid computing impl

So what do I do now

Real world examples

 

Grid Problem: provide for flexible secure coordinated resource sharing among virtual organizations

 

Grid Challenge: create an arch and solution set based on open standards and where they exist exploit existing tech to solve this.

 

Jokingly says Grid is Posix done right. Grid allows you to virtualize resources with a set of functionality.

 

A grid is a collection of capabilities that have been virtualized to be transparently accessed.

Grid:

1)    Services Oriented Architecture

a.     Services are things that provide lots of different things, J2EE is ‘platform services’ Amazon provides a ‘book lookup service’ etc.

2)    Based on Standard, open, general-purpose protocols and interfaces

3)    Services and technologies

a.     Help coordinate and manage disparate and possibly heterogeneous resources that are not subject to centralized control

b.     Can be used to deliver no-trivial qualities of service (quality does not mean its good, it means that you know how good it is).

 

3 model and unique value propositions

1)    average computers are running at an average of 40% usage.

2)    Data virtualization is useful, security is important but the data model is good to have virtualized. Data can come from lots of different spots and be aggregated so users can function better.

3)    Resiliency – allow you to move and manage where your apps run, the grid dispatcher can move your work around to where ever it makes sense, you as app developer don’t have to know about where your app will run, the grid ‘management’ stuff will move your app to where it can run best.

Grid computing tries to build the computer looking like a single thing across the scope of the disparate pieces that make up the grid.

 

Lots of people are using grids it virtualizes license management in an enterprise. CAD runs on one machine and lots can use it because the grid makes the remote piece of computing look ‘local’.

 

Cool example of building a big OS at IBM. Lots of people had AIX boxes, when it came time to build the OS a central computer would ask around for idle machines and would farm out big chucks of work to the idle machines. When you sat down to use your computer it would kick the compile back to the scheduler. This is an example of grid computing that was happening 15 years ago.  They did not use standard grid api’s but they were doing grid computing.

 

Data Grid – you can send the work to the data, or you can get the work to the data. The Grid can be smart like processing a satellite image (4gb), you don’t want to send that whole image around the grid but if you could chunk up the image and send it out then it might make sense to distribute the work by sending the data to the work. If instead you can’t chunk the data then perhaps it makes sense to pull the work to the data. The grid can manage that based on quality of service and other stuff (I think that is what I heard).

 

What can Grid computing do for me?

1)    Infrastructure optimization

a.     workload management and consolidation – turn large compute problems into small bits that can be parallelized

2)    Increased access to data and collaboration

a.     Federation of data – inbound

b.     Global distribution – outbound

3)    Resilient / Highly Available Infrastructure

a.     Recover and failover

 

Grid computing can allow you to make use of your cycles to make your computing life easier.

 

Grids increase access to data allowing better collaboration.

 

Grid job scheduler can know that part of the job croaked then and restart the failed part.

 

Compress video is straightforward. It can more or less distributed over a lot of computers without issue. If the 2nd 10 seconds does not work then you can always restart it.

 

Web Services & Grid Protocols are synergistic. Open Grid Services Architecture.

 

Fabric – resources and access to the resources live in the fabric of the grid, file systems, process power, basic storage, etc. The resources can be queried and put together with the Fabric interfaces. You can virtually provision and build a computer and then build an application on top of it.

 

Collective – protocols and services thar are not associated with any one specific resource but rather are global in nature and capture interactions across collections of resources (i.e. the fabric).

 

App Layer – where applications live.

 

OGSA needed additional stuff from web services

1)    autonomic capabilities

2)    provisioning

3)    State management for web services

 

Lines between apps and resources are bluring

 

OSGA can be put into micro codes to manage SAN and network stuff etc, no need for OS intervention, cool stuff.

 

Cool graphics, autonomic stuff cross the whole stack

 

Globus is an open source impl of the OGSA definitions

 

OSGI = Open Grid services Infrastructure (I think this is the impl of the OSGA, i.e. Globus).

 

WSDL 2.0 will have all the OGSA extensions. Currently working on that now.

 

The extensions include stuff like this

1)    ws-addressing

2)    ws-choreography

3)    ws-attributes

4)    ws-trust

5)    ws-security

 

OGSA Structure

1)    Service management

a.     Reg and discovers

b.     Services

c.     Service orchestratation

d.     Metering and accounting

2)    Service communication

a.     Messagind and queuing serices

b.     Event services

c.     Distributed secure logging service

3)    Policy management

a.     Policy service mamanger

b.     This looks like P3P stuff

4)    Security

a.     Also looks like P3P stuff

 

These are all part of the api’s.

 

Anatomy of a grid service

1)    handle to a grid service

2)    hosting environment is on the bottom

3)    grid service lives on top of the hosting environment

4)    Consider a weather service, I can get one that is location based and I can get the handle from a service handle manager type service

5)    Service data access, lifecycle magement

6)    Service creation (factory) service discovery (registry), notification, handle management, workflow, autding etc.

 

So now we are going to build a directory service.

1)    abstract service interface remains the same despite the way the service is implemented.

2)    Our service implemented through jdbc to the ldap db, or jindi to ldap to the db, does not matter, the service is implemented however you need to, just conform to the abstract service interface.

 

Things we have to deal with in building an app in a grid env.

1)    many existing apps are monolithic or tightly coupled

2)    need to refactor apps, worry about distributed thread, datalocking, latency

3)    rehosting apps, exploit meta-os services, achieve platform independence, refactor for distributed parallel execution

4)    Need for re-hosted middleware

5)    Ability to exploit grid computing services, e.g. distributed provisioning

6)    Manage and exploit quality of service across the grid

7)    Challenge: move to and exploit services oriented architecture.

 

SOA = loose coupling and clear definition, SOA is the basis of Grid computing.

 

Permalink     No Comments

making faces (i.e. JSF)


Just finished lunch, before lunch I went to Stephen Stelting talk on JSF. It was good, the example was cool because he walked through a lot of stuff.

here are my notes

Needed

  • J2SE 1.3.1 or later
  • Servlet 2.3
  • JSP 1.2

Jwsdp 1.2 has tomcat built in

Jsf-api.jar, Jsf-ri.jar, Jstl.jar, Standard.jar, Commons-beanutils.jar, Common-collections.jar, common-digester.jar, common-logging.jar

 

Five steps

1)    web.xml file must include JSF mapping

2)    copy .jar files to web-inf/lib

3)    web app must have app config file called web-inf/faces-config.xml (default name)

4)    web app must invoke FacesServlet before using JSF features

5)    jsp’s must be setup to use JSF

 

Technically you can map the faces Servlet to anything you want. Not sure that is true from my experiments.

 

Key Concepts

1)    JSF request processing model

a.     FacesServlet

b.     Lifecycle

2)    JSF Global Configuration

3)    Component model

 

Lifecycle: FacesServlet controls the lifecycle, it marshals resources and calls crucial methods. Sepcifically:

1)    get faces context

2)    get lifecycle object

3)    call the lifecycle methods

4)    releases the context

The context gives me a way to access services from the faces framework.

Lifecycle:

1)    builds or rebuilds a JSF component tree

2)    applies request values to components

3)    processes validations for new request values

4)    update model values

5)    invokes app behavior

6)    renders the response

 

Faces Config:

The default name is faces-config.xml file you can switch names and have multiple files that configure the app.

1)    Nav Rules (declartive page flow)

2)    Java Bean components

3)    Render kits

4)    Converters and Validators

5)    Custom UI Components

Components:

Graphical behaviour is managed through UI components

Basic behavior is defined in UIComponet and UIComponentBase

 

Components can use the following API’s for extended functionality

1)    Converts – change values from String to another format

2)    Listeners/Events

3)    Validators

4)    Renderers

 

Actions in JSF are meant to do stuff not manage page navigation. The page nav is managed in the faces-config.xml.

 

The event model does not do any client side events, the event model runs only on the server. You could however hack something together if you needed to.

 

Validators:

Make the data valid before it gets sent to the server.

 

Render:

Makes HTML from components.

 

Benefits of JSF include

1)    component functionality

2)    support for event-based notification on the server

3)    support for i18n and I10n

4)    XML config of things like nav

5)    Built-in integration with beans (model components)

6)    Variable representation of UI components (renderers)

7)    Easy integration with builder tools

 

Drawbacks with JSF

1)    Non-trival seup

2)    Complex processing cycle for each jsf request

3)    Performance cost to use JSF

I disagree with most of these. The setup is straightforward, the cycle is more or less transparent for most developers. The performance cost was hedged with the fact that any framework is going to cost some performance for other tradeoffs.

 

Demo of JSF:

1)    basic form elements

2)    association with model elements

3)    event notification

4)    page navigation

5)    internationalization

Tons of info about JSWSDP.

 

A discussion of common errors and the way they show up. This was really useful I think for the developer just getting started. Good idea to put into a talk.

 

Lots of cool examples that showed all the stuff discussed above.

Permalink     No Comments

Portlets JSR 168


Just finished with the talk on JSR 168. Cool stuff.

my notes

Portlets are a part of Portal and assembled into a full fledged portal.

There is no Portal spec, they are vendor specific but the portlets are standardized so you should be able to run your portlets in any Portal.


Portal Page Elements

1)    Portlets

a.     title bar, and controls

b.     Portlet window

2)    Portal page (built up from portlets and static HTML)

The Portlets do not have to have title bar and controls like you see in Yahoo.

 

Portal app is part of a web app, webapp can have ‘normal’ Servlets and JSPs

Portlets deployed like Servlets

Web-inf/portlet.xml is the deployment descriptor.

Portlet can user Servlets and JSP’s to generate markup fragments or perform tasks

Portlets have access to other Servlet stuff.

 

Basics – Window States

1)    Normal

2)    Minimized

3)    Maximized

4)    Custom states

a.     Declared by portlet, only used if supported by Portal

b.     Example: HALF_PAGE, NARROW, FLOATING, WIDE… The portlet specifies these in the portlet.xml. If the Portal supports the custom stuff then they can be used, otherwise they are ignored.

Some/many of the state changes are triggered by the buttons in the top right of the portlet.

Portlet Mode

1)    view

2)    edit

3)    help

4)    custom modes

a.     declared by portelt, only usedif supported by Portal

b.     ‘standard’ custom modes suggested by spec: about, config, edit_defaults, preview, print

Portlet api has request and response things that are passed into the processAction (respond to action events) and render (generate markup) methods.

GenericPortlet overrides render and forwards to mode-sepcific methods (doView, doEdit, doHelp).

 

Lifecycle – each HTTP request only one Portlet can get ‘processAction’ only if the request is an Action URL and ‘trageted’ to the portlet. Render for each portlets, no guaranty of order, might do concurrently in threads, protlet returns content fragment. Portal assembles fragements into a web page.

 

Change things only happen in processAction method.  Portal decides when render happens, if one portlet is max’ed then none of the others will be shown.

 

Other API – mostly mirrors Servlet api’s. Except for the PortletPreferences which manages preferences for the portlet.

 

Example – hello world the portlet.xml has the title. Portal knows how to render the title bar from the descriptor, which buttons show up in the top right hand side.

 

 

More stuff.

 

URL’s to external stuff are fine and leave the Portal window to a new window.

URL’s to the portlets are different either action or render type.  The URL can have parameters and the parameters only go to the targeted Portlet.

 

Namespace Encoding

Portlets generate HTML that lives on a bigger page.

Requires name and identifiers to be named-spaced – unique to the portlet, avoid collisions, HTML id’s, JavaScript variables and functions

The render response class can tell you what your namespace is. You are expect to generate your JavaScript on the fly while rendering your Portlet.

 

Forms in a portlet

 

Forms should use POST, don’t use GET, use POST with the ActionURL and its parameters. The container generates the action URL and add ‘private’ parameters for these URL’s. These URLs go into the ‘action’ attribute for the FORM.

 

Preferences

 

Declared and defined in the deployment descriptor. Provides persistent customization of the portlets view or behavior. It is container specific how they persist. All the preferences are multi-valued and Strings. You have to take care of getting the types changed. You can only modify from the processAction method.  Store is an atomic method. May throw and exception if store is not possible (no user, no way to determine chance of success, no way to determine reason for failure).

 

HTTP Session Attributes – scoped to ‘PORTLET_SCOPE’ or ‘APPLICATION_SCOPE’

 

Any url you build needs to go through ‘encodeURL’.

 

Preferences are stored in a db but its vendor specific as to how they go to the db. I’m assuming there are places you can get in there and get the preferences and put them where you want them. The preferences are described in the deployment descriptor.

 

JSPs and Servlets

Allows protlet to externalize its rendering with the PortletRequestDispatcher. The JSP’s must render ‘fragments’. The JSP’s or Servlets can get at javax.portlet.config – the PortletConfig, javax.portlet… other stuff. There is a tag-lib for doing Portlet stuff in JSP’s. They allow you to get at the defined objects, build action and rnder url’s and get into the namespace.

 

JSP Portlet Pattern – portlet class contains performAction to (process forms, modify preference and session data, maintain state fo rmulti-page forms). Render method dispatch to JSPs (presentation markup, but JSP probably not generally reusable, must generate only fragements, jsp probably strongly tied to the portlet). JSP is hosted by WebApp, accessible from outside (rely on unpublished URL to hide it).

 

The example was krufty because of all the code in the JSP. I hope there is a better way to get the stuff into the JSP. Presenter asserts that the EL will make things better for JSP 2.0.  I need to play with it to form a better opinion.

 

Other Stuff

Your portlet does not get to decide what its type is going to be. In the render method you are told what the Portal wants.

 

There is no ‘declarative security’ for the Portlet and the security is weak. There is no Portal specification to say how things work. I.e. a banking portlet that needs ssl and a weather portlet that does not. It’s up to the Portal to determine what happens.

 

Portlets can be cached. The Portlet can specify how its cached.

 

WSRP – allows you to aggregate Portlets from other servers via a web-services interface. The two specs cooperated with each other.

Permalink     No Comments

Not your mothers XSLT (2.0 that is)


Just finished up the XSLT 2.0 talk it was really cool. Learned alot about what is going to be there. I wanted to hear more about the standardization of the extension stuff (i.e alt way to turn XML into Java instead of JAXB). But I'll have to ask aobut that later.
here are my notes

XPath and XSLT 2.0 are coming out together. XQuery is a new query language for XML and its based on XPath.

 

XPath was originally designed to be used with XSLT.

 

Each location is made up of a node test. @ sign moves to the attribute axis. Each element can evaluate to one or more elements. The return value is called a node set.

 

// means anywhere.

[] means predicate that is used to filter the node set its applied to. The predicate can evaluate Boolean expressions. There are also lots of functions available for use anywhere (including predicates). The function used in the example was count(node set).

 

XSLT defines how to reorganize data, to XML, HTML, plain text etc.

 

XSLT is divided into different templates

 

XSLT is a functional language, there are no local variables, all variables are global.

 

The templates are functions.

apply-templates means to go and find all the children of the current node and find templates that match and apply them.

apply-templates with an select attribute is like ‘find all the sub elements that match and apply any functions that are available for them.’

 

XSLT 2.0 goals

1)    increase usability and readability

2)    expand data-typing

3)    simplify string manipulation – much simpler, reg-ex

4)    add grouping functionality

5)    allow multiple output docs

6)    maintain backward compatibility – biggest goal, old style sheets should not break

 

XSLT 2.0 uses XML-Schema types – XSLT processors are not required to be ‘schema-aware’. 19 primitive built-in types 25 derived types.

Sequence – new collection type replaces node-set and result tree fragment.

Tons of cool date manipulation stuff, 10 types for date/time, 3 formatting functions, 21 extraction functions, 3 time-zone adjustment functions.

 

Saxon 7 is a preliminary impl of XSLT 2.0 does not yet support custom data types.

 

Sequences – an ordered list that can hold zero or more items, any of the data types that fit with XSLT. This will be the new result of and expression.

Every expression returns an expression.

<xsl:for-each select=”(1 to 100)[. Mod 5 = 0]”> outputs all the integers between 1 and 100 that are mod 5 = 0.

Dev-X Transform XML Document tool to show you the output.

Ordered with duplicates, the sequence will go in the order you specify instead of document order. I.e.. <xsl:for-each select=”(following-sibling::*[1], …./>

Since you put commas into the select attribute it will do the order you specify instead of document order.

Sequences are flattened, instead of nested sequences, the processor will flatten the nested elements into one long sequence.

The value of a sequence is the first element (so you can use a sequence with one value it will default to the simple thing of the only element.) If you specify a separator attribute in your xsl:value-of you will get the whole sequence. I.e. <xsl:value-of select=”(1 to 4)” separator=” + “/> will evaluate to “1 + 2 + 3 + 4”.

A sequence with one item is equivalent to the one item.

 

Expressions – iterative expressions ‘for $var in expression(, $var2 in expression) return expression’. There was some cool example stuff with subtotals and totals for a table of prices.

Conditional expressions inside XPath.

Comparitive Expressions

Permalink     No Comments

First Day Impressions


Well at the end of the first day I must say that I really enjoyed the show far. There are lots of really cool people, its small enough that you can get to know them and the presentations so far have been really good.
BTW I'm blogging real time (almost) so the notes have not been reworded, spell checked etc. So if you find problems etc. please feel free to comment.
Best presentation today was the key note I think, I did get to see the last half of Kimberley Babrow Jennery but did not take notes. My brain was full.
My talk went well but I forgot my DVI to VGA converter so I had a bit of pannic until I found one of the other participants with a mac (there are lots BTW) and borrowed his. All was good again. I had some really good questions and the discussion was lively so it was fun.
After hours Q&A session was really cool! Met up some people that are doing lego-mindstorms and java that was really cool. Kimberley is going to setup a BOF. I can't wait to geek out with others on this topic.
A great day!

Permalink     No Comments

Taming The Tiger


Just finished with the new stuff in J2SE talk by Mark Reinhold. It was interesting after he rebooted his Linux laptop for the 2nd time :-) I did not get to finish my notes because I'm getting ready for my talk at 2:45...

here are my notes

Tiger is big & fierce – cool graphics of tiger

 

Themes:

1)    Quality

2)    Ease of development

3)    Performance

4)    Integration

One huge JSR (umbrella)

Quality – Compatibility with older versions, must be backwards compatible

Doing lots of tests to make sure that the compatibility is there. Features are important but compatibility is key.

Reliability, Avalibility, Performance are also important

 

Best Practices – for quality

1)    Regression Tests

2)    Unit Tests – Tiger is the first time they have taken unit-testing thing seriously. The people are now required to check-in unit tests with new features.

3)    Code Reviews – Code reviews attach reviewers name to the code and the reviewer is called if something is broken.

4)    Pre-Integration testing

 

Grow the dev-base: Ease of Development – the following stuff is supposed to be addressing these issues.

1)    Annotations

2)    Generic Types

3)    Enhanced for loops

4)    Enumerated types

5)    Auto-boxing

6)    Formatting & Scanning

7)    Concurrency Utilities

J2EE 1.5 will have many of these things esp. annotations/meta-data.

 

Annotations

Example of the AbstractButtonBeanInfo. The swing team built a doclet (like xdoclet) that generates the BeanInfo classes. Rienhold says (this is a hack, java doc was never meant to used for this).

Instead what we’d like is to have an Annotation that winds up in the .class file. The idea is to have the info in the annotation in the class file so that a ‘post-processor’

Annotations and be in class, vm at runtime, or only in the source. So your tools could use this info in reflection api’s. Very cool idea, probably old info but I love the idea of having this info avalible at runtime. We could do away with deployment descriptors all together J

 

Generic Types

Can build types that you don’t have to cast. Its OK but a bit c++ ish. Looks almost just like C++ generic types. Vile, but that is just my opinion. An example of moving an existing class to generic types. Next he covered some of the util classes that have changed given the new stuff.  The generics stuff took the approach that no JVM changes will be made.  All the changes are about compile time checking.

 

Enhanced for loops

Simple building of for loops. Seems good for VB people.

 

Enumerated Types

Encodes the type safe enum pattern into the compile using the ‘enum’ key word. Makes it easy to put enum’s into switch statements. The only new keyword. Its basically a sub class of class but is distinguished at runtime.

 

Autoboxing

Inter x = 3;

int y = x;

map.put(1, 42)

 

basically this is auto conversion from Integer to int.

 

Formatting & Scanning

Lets you put %i type stuff into your string processing.  You get to get rid of MessageFormat stuff (and other formatter classes)

Instead you use the Scanner class to get input and look fo rnextDouble type stuff, then you can use %.2f%n to print 0.06 instead of 0.0599999996. Scanner is meant to be the thing that awk programmers would understand.

Permalink     No Comments

Web Services


Finished one of the many web services talks here. The talk was really good but I should have went to a different one. This talk was focused on the stack of standards that make up "web services" and not on how to build, make secure, make reliable etc web services.
here are my notes

Service Oriented Architecture is the starting point and Web Services is sort of a ‘best practices’ wrapping around that.

 

Definition of web service - “…a broad based agreement for exposing programmatic behavior over a network and a set of core technologies that enable that capacity” – Noel Bergman

 

WS-I leads the effort around putting the ‘must’ into place for the standards. The other standards have too many ‘should’ and ‘could’ WS-I and puts the stuff in place to make sure the interop works.

 

Hot areas in WS

1)    Interoperability

2)    User Experience

3)    Management

4)    Choreography and Transactions

5)    Reliable

6)    Security

 

Portals are the UI web-services is the back end parts.

WS-Remote Protocol – look more into this

 

WS Foundations

1)    XML Parser

2)    JAXP

3)    JDOM

4)    JSR 109 – the programming model around web services

5)    ebXML

Long list of other standards that relate to the WS space.

SOAP with attachments.

JAX-RPC – newest version allows JAXB to be plugged into the data-binding space.

 

Many of the specs are geared toward the vendors so that we as developers can count on the implementation being conformant.

 

Lots of security stuff is going into the SOAP headers.

 

First half of the talk is the long, long list of specs that make up ‘Web Services’. To much info.

 

BPEL is in the work flow space. – need to study this more, looks very interesting

 

Web Services For Remote Portlets WSRP 1.0 is Approved through OASIS.

 

It is bad to use XML as the communication tech between micro-layers. How many times have we seen app servers fall on their butt because of this?

WS-I process defines use cases, builds usage scenarios, sample applications and runs the through the profiles, then adds tests. The output then helps them make the inter-op piece work better.

 

WS-I value add – turn all the ‘may’ or ‘should’ to ‘must’ or ‘must not’, providing guidance or best practice on standards implementation, provide concrete examples and testing stuff.

 

Profile is the list of standards and versions and then the list of ‘must’ and ‘must not’. The profile will restrict things and choose a single mechanism among many etc. So the profile provides a way for applications to be written so that they can run on different implementations.

 

Basic Profile is the ‘holding space’ as other profiles mature they will be moved into the Basic Profile. In the mean time they are called ‘extension profiles’. There will be consideration for both, maturity of the extension profile and the widely adopted nature of the extension profile.

 

WS-I Basic Profile 1.1 is beginning to make headway because SOAP w/ attachments is starting to settle down.

Permalink     No Comments

Software Summit Keynote


The address was relaly good. Soyring focused on the skills that he sees as high demand (he runs IBM services, so he knows something about it.) I really enjoyed it.
here are my notes taken during the talk.

Soring

 

Global economy has been toast for the last two years, the profit margins are starting to grow and even some of the revenue side is increasing.

 

Consumer confidence has been up and down but has flatlined.

 

Airlines are starting to be profitable.

 

Smaller average purchase size, larger number of purchases, longer purchase cycles, major price pressure, outsourcing is also having an impact. Outsourcing is putting downward pricing on salaries.

 

Expert deep technical skills is what sells programmers. Vietnam people are willing to work for 2K per year.

 

High Demand:

1)    System or Solution Architects –

a.     The system arch is responsible for managing the structure of 9000 servers and getting patches

b.     The solution arch is responsible for turning the Biz Annalist stuff into a solution

2)    Business Process Integration

a.     Someone who knows how well biz works and make it better

3)    Portal Design and Legacy Integration

a.     Biz to emp portal for HR functions

b.     The big thing is to integrate the Portal to the legacy systems

c.     Now its biz to biz portals, purchasing portal for IBM that allows vendors to respond to requests for stuff

d.     The next big wave is biz to consumer

4)    Performance Analysis & Tuning

a.     People who know about how to make things run faster

5)    Security and Privacy

a.     This is a huge market now because of the ‘privacy policies’ that companies are publishing

6)    Orchestration and Provisioning

a.     Companies need to be able to quickly update servers and clients with new stuff. Provisioning is difficult to do in big environments. Orchestration is greatly needed to be able to make the transition.

7)    Linux Servers

a.     People who know Linux are in high demand. IBM supports linux on everything they make.

b.     Linux is starting to move to the desktop. IBM is having customers pulling them to support Linux on the desktop.

8)    Virtualization (grids, SANs, etc.)

a.     Uses idle CPU cycles to make software run faster

b.     USOpen grid built by IBM, 90% owned by IBM 10% by USOpen

c.     IBM switched their 90% and made it work on protein folding, the switching of the Grid was highlighted and how cool it was to be able to switch them. Grid computing can become a utility.

d.     Managing Storage Area Networks are very expensive to drive and manager.

IBM – Portals are huge! IBM can’t keep up with the demand.

P3P – privacy guess 3 on a 5 scale

Web Services – emerging tech but is huge more than 5 on 5 scale

XML – 5 out of 5

J2EE and J2SE – are both big but the basic skills are becoming a commodity and there is major downward pressure on salary – keeping people that know how to design and arch.

Patterns – three out of 5 on a 5 scale

 

Design Pattern Toolkit http://www.alphaworks.ibm.com/tech/dptk eclipse plugin

12 million downloads of eclipse

http://www7b.software.ibm.com/wsdd/downloads/j2eecv_install.html

Identifies AntiPatterns in your code and helps you to correct them.

 

Performace Analysis for Java Web Sites

EBay 3Gbits per second 400million page views a day.

They introduce several changes on a regular basis

 

Web Services Takes Off – 2003

UDDI – Find

WSDL – Publish

SOAP – Bind

Missing Bits – security, reliable messaging and tranactions

 

Web Services and .Net integration – http://www.ws-i.org

 

Platform for Privacy Preferences

 

Linux on the desktop – productivity apps, word, powerpoint, etc. Most view and print documents and don’t usually do anything complex like editing J. Most people don’t really use the features so why not just make prod apps that are greatly simplified. The other open source stuff (Apache, Tomcat etc.) continues to drive prices down.

 

e-business on demand – based on 4 things

1)    Standards, open source stuff etc. – standard integration is 500K

2)    Business process integration and functionality – applications don’t work together very well. IBM estimates that they will be able to remove 5Billion out of the purchasing process by integration. Grid computing where computing becomes a utility make the systems flexible and adaptable.

3)    Autonomic Computing - Complexity in management – make a system that can adapt quickly. You body can adapt locally without having to contact the major CPU. Systems that can be self-detecting and ‘clean up’ or ‘isolate’ the problem.

4)    Virtualization – grid

 

http://www.alphaworks.ibm.com/tech/bpws4j

http://www-106.ibm.com/developerworks/webservices/library/ws-bpel

 

Tools that can generate bpel – then other tools take bpel and turn it into high level design artifacts for J2EE etc.

 

SWIFT – trillions of dollars per day is transferred through there each day

 

Agile Software Development – works great for many application and you should check it out. Some apps (pace makers, etc) should be focused on tools and docs but many many others can be done with agile methods.

 

Aspect Oriented Software Development http://aosd.net

 

Recipe for success

1)    Best Practices

2)    Great Tools (aspectj, eclipse etc.)

3)    Deep Skills (in relevant subjects, seek certifications)

 

 

Permalink     No Comments

Software Summit Blogging


I've created a new category for my blog entries from the show. I'll try to update at least twice a day. There is wireless access so I'm hopeful that I'll be able to blog real time from the talks.

Permalink     No Comments

Geek Week


Just got back from the welcome reception at Colorado Software Summit. It was fantastic!
Meet Greg from NY. Had a great conversation on XP vs Agile, vs other processes. It was very good. Can't wait to talk with him more over the week. Should be lots of other geeks that will be fun to get to know.
Fun Stuff!

Permalink     No Comments

Off to Keystone


I'll be speaking next week a the Colorado Software Summit. I have several updates to the Jakarata and J2EE presentations that I'll post shortly (some time on Sunday probably). I'm really excited about being there. The speaker list looks really good and there are some spots I'm really looking forward to seeing. Besides how could you not have a great time in Keystone!
You can check out the agenda for your self at the URL above but some of the topics/talks I'm looking forward to are;


Promisses to be a lot of fun.

Permalink     No Comments