Saturday, July 19, 2008
Book Review: J2EE and Weblogic
"J2EE Web Services on BEA Weblogic" was published as part of the Hewlett-Packard Professional Book Series. While the Weblogic content the descriptions of some of the management functions of HP Openview were a bit alienating as I have not used this product. However it did also talk about some useful utilities and open source products that were not provided by either BEA or HP.
While the description of the tools were fairly high level and probably could be translated into similar functions in other suites I do not expect this book attract users of other SOA platforms suites.
The book style is fairly easy to read with some good diagrams and examples. The SOA standards and principles are covered well with a focus on the WS-*, SOAP and WSDL standards.
The basics of J2EE and EJBs are explained and some fundamentals of the Weblogic platform. This is not an evangelistic book about SOA or Web Services but goes into a bit about the technology of how to bring it about. The SOA benefits are there but the SOA story gets a bit lost amongst the instruction on how to use the BEA tools.
Some of the material reads like BEA marketing literature. I would have liked more practical tips on what to use and what not to use. In a book like this we need information that we can't glean from the manuals. This provided the high level overview with out some of the more practical "dos and don'ts".
There is good information on versioning and a good section on evaluating WS management tools. Also the book provides some practical approaches to performance issues.
This book has limited readership and will date quickly. Your best technical advice will always come from the product manuals but this book explains a bit about the suite is used as a whole. Published in 2004 this book is nearing its "use by" date but there is still some relevance to what it describes. Be quick though, with the acquisition of BEA by Oracle we can expect some changes to the BEA product suite.
Tuesday, October 23, 2007
Concluding Conference Comments
- The definition of SOA
- The motivation behind SOA
- Legacy Transition
- My organisation's software stack
- The link between SOA and Enterprise Architecture
- The metadata required for SOA
- SOA and Metadata: Where you can Put It
To wrap this up series up I will go through my conclusions. Firstly, the changes we need to make to support SOA in an organization involve:
• New Components, New Tools, New Skills
• New Application/Service Architecture
• Governance around reuse and business process
• Less emphasis on applications, more governance at the service level
• Focus on interfaces and contracts particularly in the information model
• More Metadata
• Changes to methodology
New Components, New Tools, New Skills
When we talk about changes it is important to understand the baseline from which you are changing. Some organisations will have well developed skills in distributed portal-based applications. My organisation is yet to deploy its portal product and is still developing skills outside of the mainframe environment. We are still building our skills in Unix and Java. We are still putting together our development environment. None of these components, tools or skills are peculiar to SOA. What we have done specifically to implement SOA is to purchase the BEA Weblogic platform and we are looking at ways of changing our development approach. We find we need to quickly ramp up skills in our new environment as well as SOA Development, SOA Testing and management of metadata.
New Application/Service Architecture
There was a critical cell in the Zachman Framework called “Application Architecture”. This could be relabelled “Service Architecture”. It is services that now should be the focus of our attention. This is working at a different granularity.
Governance around reuse and business process
Governance is required around reuse of services and reuse of artefacts. There is more work in the Enterprise Architecture (EA) space than there is for traditional application-centric development. This should be balanced by relatively less work in the solution architecture space. Modelling Business Processes is more important with SOA.
Less emphasis on applications, more governance at the service level
Application Development is more focused on assembly of services and the development of a presentation layer so there is less emphasis on applications themselves. There will need to be governance changes to introduce SOA. There needs to be stronger EA governance. Now you not only have to find an owner and sponsor of an application. You may have to find and owner or sponsor of a service. This may be easier than finding owner for monolithic application in some cases (and in other cases it may not).
Focus on interfaces and contracts particularly in the information model
The modelling of persistent data store won’t change but in addition we need to model the interfaces and contracts between services. This will be required to drive service development.
More Metadata
All this means we have more enterprise metadata. This presents challenges for managing this metadata. This was the subject of an earlier posting.
Changes to methodology
Software development methodology includes more work on interface, contracts and SLAs. The development of testing services presents a challenge. This is because you may have to test without having and application to test it with. You have to test on behalf of applications that may use it but do not exist yet.
I make the following architecture recommendations to facilitate SOA:
• Have an Enterprise Architecture
• Manage the application portfolio
• Drive the enterprise from business processes or from events
• Apply good governance to services and metadata
• Data modeling should include interface/contract design
SOA must be driven from and EA. It is not something that can be put in place for a single application. The benefits of SOA will not accumulate until you have a number of applications completed.
When you build a service you build it for all the applications that potentially use it. Therefore you have to know about these applications. My organisation has a centralised IT department. This helps enable both EA and SOA. A federated model can work but someone still needs a clear picture of the application portfolio and needs to define interfaces and contracts of your services.
Business Processes will drive SOA. This is to ensure the services have meaning to the business and that they can be combined into processes in the same way that business combines its tasks into processes.
The Governance changes in SOA. I’ve talked about the governance of services and the governance of metadata. Both are important for successful SOA.
Once the business process is sorted out the interface and contract between the services must be modelled. This will then drive the development of the services. This information needs to be kept up-to-date and is the key metadata required for reusing the service.
Some of the points brought up at the conference interactive session were true of most software development:
- You need good business sponsorship
- Choose your first SOA projects carefully
- If the business does not see the need then it's not going to work
- Talk to the business in language it understands
- Get executive support of your SOA program
Wednesday, October 10, 2007
Binding and Coupling
From the Doug Kaye, the man who wrote the book on Loose Coupling
Loose coupling is like pornography. Everyone talks about it, but when challenged, few can tell you what it is. For some, it borders on a religion with the attendant fervor one would expect from the newly converted.
When I say he "wrote the book" I mean that literally. There is probably only one book dedicated to this subject and he wrote it.
I am not surprised it is possible to write a whole book on this. Firstly it is pivotal to SOA and secondly there are so many different aspects to coupling. Today I will discuss binding and Coupling but my postings on coupling probably will not be able finish until I read this book.
Binding is the time when a logical description of an attribute is tied to its physical value. For instance a service address can be bound when the source code is written, when it is compiled or when it is linked into an executable module. This is called ‘early binding’ or ‘build-time binding’. A service address can also be bound to its physical address when the message is sent, or when it is handled by intermediaries. This is called ‘late binding’ or ‘run-time binding’.
Some formats of payload can also be bound at build-time. For instance java objects (and serialized data objects) are bound at build-time. Therefore a receiver will reject a message containing a serialized java object that is not bound to the same physical representation of the object.
Generally in SOA, loosely coupled services are also considered to have all aspects of their messages bound at run-time. Having an address or payload that is bound at build-time reduces the run-time flexibility of these services.
Binding and coupling could be treated as independent dimensions of the separation between services. A build time dependency on a message is so significant however that I will roll it into the coupling dimension. This is appropriate as coupling is a combination of characteristics and not a single dimension anyway. By rolling build time dependency into our types of coupling it also enables us to keep our definition of a service clean without having to comment on binding between services.
This leaves me with another coupling type ‘Build-Time Coupling’ which I will add to my list of coupling types. It is more tightly coupled than most forms of message coupling. This list has been modified in my posting about Aspect Orient Programming and I intend to republish it again after I have made a couple more revisions.
'Build-Time Coupling’ is still a form of Message Coupling so I still include it as part of a service in SOA. It would generally not be considered good to have these dependencies and we would be justified in excluding build-time dependencies from the definition of a service.
It is good practice to pass version information in messages between services. Therefore a message may contain a version number or a build date so that another service can check it and take appropriate action. If a receiving service detects a change in the version of the sending service then this fact might be logged, or the metadata inspected or the message may be rejected. This is not a build time dependency described above. It is another metadata control. Rather than add ‘version coupling’ to a long list of coupling types I will combine the other coupling types that have similar metadata that control the behaviour of the services into ‘Process Control Coupling'.
I hope to revise my own list of Coupling Types shortly but in the meantime click on this link to look at the list developed by the man who wrote the book on coupling.
Footnote:
I have found and extended forum discussion on Passing Serialized Java Objects vs. Web Services . This features and appropriately named J. Cowboy who is railing against those bullies in management who want him to develop Web Services instead of passing (build-time coupled) serialized java objects around his system.
Wednesday, September 12, 2007
SOA Best Practices: A Book Review
The book had the feel of describing the real world rather than discussing and ideal world. By contrast the book by Erl was from a Web Services purist's point of view and glossed over some practical issues like what to do about user interfaces, performance problems and legacy transaction integrity. On the other hand Erl had the advantage of not having to describe the concepts in terms of differing technologies.
Legacy integration issues were covered well by Krafzig et al. There was an excellent chapter on process integrity and a good chapter on infrastructure issues like Scalability, Interoperability and Security. They covered the range of process integrity techniques from "Eyes Closed and Praying" to "Two Phase Commit over a heterogeneous environments" and "SAGAs with complex compensation graphs".
Krafzig et al provide more of "Horses for Courses" approach. Their approach does not necessarily advocate the same approach for fine grain and course grain services. Their approach even accepts that synchronous as well as asynchronous service buses might need to work side by side.
One theme was the importance of the registry and repository for SOA. The book gives some practical suggest about what to put in these stores. Another theme is the importance of governance of the development process. This theme is taken up in a later chapter which discusses SOA-driven project management, configuration management and testing. The book also discusses a thin-thread approach to software development. This is accompanied by discussions on how to fund SOA development and how to manage the risk of these initiatives.
The climax and conclusion of the book is four case studies. These are real-life examples with solutions that had to meet compromises and struggled with incorporating legacy environments with their solutions. It would have been nice to have an example that was not a finance company but it seems that is where the money is when it comes to SOA (and any big information systems for that matter).
The book did not provide a motivating definition of SOA although the thoughts on architecture I found enlightening. Such as "architecture … is designed to last longer than one or two of these technology innovation cycles" and that its purpose is to simplify development. How easy it is to forget that our new inventions in IT are just to make the world a simpler place.
I enjoyed this book. It was good to read a European context on SOA. They referenced Niklaus Wirth (a hero to anyone who did computer science when I did it) a couple of times and referred to other European IT Gurus which is refreshing break from the US IT heritage. I commend it to those who want a technology-agnostic look at SOA.
References
Erl, Thomas, Service-Oriented Architecture: Concepts, Technology, and Design, 2005 Prentice Hall
Krafzig, Dirk, Banke, Karl and Slama, Dirk, Enterprise SOA: Service-Oriented Architecture Best Practices, Prentice Hall, 2004
Friday, August 24, 2007
Software Stack Springing from Nowhere
This week I decided it was about time my organization documented its software stack. By 'software stack' I mean one of those neat diagrams that start at the database layer and build layer on layer until you get to the user interface or browser at the top. I liken it a multi-layer cake. The ones the vendors show always look very neat and fit easily onto a powerpoint slide. The ones us real people prepare are usually more complicated and difficult to represent because we have options, legacy tools, in-house software frameworks, interim standards and the like.
I started with a big current project. The data storage for the system for this project involved two mainframe DBMS technologies and some J EE software so it is pretty well stretching us to provide appropriate technologies and is a good place to start to work out what our target software stack should be.
First of all, it turned out that I did not understand how the mainframe gateway software was working. The gateway technology I had represented in my stack had been replaced two years ago. Then I learnt that that we had moved away from using Enterprise Java Beans (EJBs) in this project and had got heavily into the Spring framework so now were using POJOs and wrapping these in Message Driven Beans (MDBs) to provide a JMS messaging interface between services. Still we succeed to get a generally agreed picture of the current project software stack.
From this I wanted to build a 'target software stack' this would be the architecture for some future major project. Maybe this would not be the next project but a couple years down the track I would be hope to see this approach in a project. To produce the target software stack I took some long term objectives. These were
- to communicate using SOAP to other agencies and across platforms to other services
- to use JDBC and SQL to get data from our (non-relational) mainframe databases and move the legacy business logic into J EE.
The reason behind the second point above is to allow the organisation to move to relational databases (mainframe or midrange) at some future time.
The Swing thing bothered me a bit. We have big integration challenges and I want to push forward with Web Services but my developers want to use Swing which offers more efficient messaging between fine grained services. After some googling and reading I have decided that a Swing approach seems compatible with Web Services. Swing provides a good declarative style using XML. The developers can continue to use their POJOs and MDBs for the finer grained services to avoid the overhead of SOAP messaging but for the courser grained services, and particularly werecommunication with other organisations is concerned, Web Service and SOAP is the appropriate standard.
One news item that gave me some optimism was the announcement of Spring Web Services 1.0 two days ago in SOA World. I am glad to read the Spring will support Web Services and therefore make the above approach more common.
So in our target stack we have (from the user interface at the top of the cake)
Internet Browser over HTTP
AJAX (for rich client – may be optional for some projects)
UDDI (for service discovery – we have not got this yet)
LDAP (authentication)
Audit Tool (we have not got this yet but it is important of us)
WS-* (as required), Spring, SOA Discipline (I have called this level 'advance structure' for want of a better term)
WSDL, SOAP (Course grained services)
POJO, MDB, JMS (Fine grained services)
J EE
Hibernate, Oracle (Relational Data)
JDBC, SQL Adapters, ADABAS, IDMS (Legacy Data)
That is the target anyway. It will change before we hit it, but the organisation needs a target even if it is only a straw man to be ripped apart and put back together in new and better ways. The exercise of defining this has been useful and helped me talk with developers and architects about what we are doing today and plan to do tomorrow.
Reference
SOA World Magazine News Desk, SOA World - Spring Web Services 1.0 Launched,
http://au.sys-con.com/read/419023.htm
Monday, July 9, 2007
Model View Controller
The two frameworks in question are Apache Cocoon and BEA Page Flows. My organisation started down the Cocoon path fairly early in its J2EE (now Java EE) history. This seemed a good open-source product for separating the user interface, data and business logic. We seemed to be a lone voice with other government departments going for Struts, which is listed in Wiki as a MVC framework.
We moved away from Cocoon when we purchased the BEA Weblogic platform and now have adopted Page Flows as our framework of choice. Page flows is not billed as a MVC framework but provides a sufficient level of detail to easily implement MVC. That means we have another choice to make in the pursuit of our set of SOA standards and technologies. If we have settled on the Page Flow framework now we may also have to specify we implement it in an MVC fashion.
Interestingly Cocoon has separation of concerns as a clear focus although it does not claim to be MVC but does provide similar separation.
It would seem that both Cocoon and Page Flows do not dictate an MVC solution however the MVC pattern can be implemented with both of them.
MVC: http://java.sun.com/blueprints/patterns/MVC.html
Cocoon: http://www.java-source.net/open-source/web-frameworks/cocoon
Page Flows: http://dev2dev.bea.com/pub/a/2004/01/Dew.html
Cocoon and MVC: http://webservices.xml.com/pub/a/ws/2003/01/29/cocoon-xforms.html