Tales from Barcelona - Day2
Day 2
Some Notes from TheServerSide Java Symposium Europe - day 2
Drunken Chats
Not really too drunk last night, but spent a fair chunk of the evening chatting with Oisin Hurley from Iona. Oisin (pronounced like Ocean)
had earlier been on the panel as an "SOA expert", and knows a thing or two about architecting and delivering software projects.
One thing we talked about project life-cycles and how there is a gap in the market for a company/organisation to provide a very prescriptive way of setting up a project - based on the project, some templated project that prescribes how the team will develop. For example - if someone came in and said: "Right, here's your environment. Its: Maven, Subversion, CruiseControl, Eclipse, TomCat, Oracle. Secondly, Here's your application architecture for this project: JSF/myFaces, Hibernate, no/few singletons, messaging through Mule, other coding standards, JUnit / MockRunner - 60% minimum coverage."
That takes away so many problems from the development team - the framework in which you code is prescribed, so you can just get on with adding business value. The "lucky" thing for .Net developers is that they have fewer implementation choices, which actually concentrates the mind on writing the code to solve the business case.
Enterprise Application Mashup: Architecting for the Future
The speaker here was Eugene Ciurana - a pretty charismatic guy with good references. Previously he worked for several years architecting the systems for the worlds biggest retailer: Walmart.
His basic message was that we (the development industry) should move further away from custom coding and more into "Smart" coding and Integration.
This message sounds very sensible of course. He also warned about some common mistakes he has seen in enterprises:
- blindly buying, rather than building in some cases - this is where the word "Smart" comes in.
- Outsourcing key projects to third-parties (as the in-house knowledge is high-value)
- Cost overruns come from some common sources too:
- Remote management is expensive
- Deployment & Integration costs are often more expensive than proposed
-
He also confirmed the industry notion that 40% of development is spent maintaining code (i.e. not adding any business value), although this figure is higher in some companies.
One of the things that he managed to achieve was to persuade the techs, business people & lawyers at Walmart to use Open Source technologies - apparently the lawyers were the hardest - as they want indemnity.
He felt that we should embrace Open Source - and always use recent versions and cutting edge stuff. Now this is seen as a high risk from enterprises - but his experience was that it worked. I think his rule of thumb was that you should never run software more than 18 months past its General Release date. He contended that this rule had resulted in the most stable software. As soon as people went against this rule and stayed with the "safe" versions - that's when maintenance costs actually started to go up and availability of the application fell.
Resin upgrade anyone?..
The second half of his slot focused on integration & middleware: "Get rid of point-to-point communication" was basically his message. The way he suggests is using an ESB (Enterprise Service Bus). I totally agree. He used Mule - which has had various independent positive reviews and is in production in many high demand environments. Interestingly, they even routed their CMS through the Bus, such that content was distributed out to servers through the ESB also. This design served him well, as they ended up having to replace the CMS system, but because they were going through the Bus, there was zero impact on other parts of the system (as the BUS enforces a common format & API contract)
One other thing he recommended was that we but Java 6 or Java 7 on our technology roadmap NOW.
Again I agree - I think we should go up to Java 6 soon and get specific training to get our developers up to speed on the new features of Java compared to 1.4
One of the key benefits to the upgrade from 1.4 will be the improved runtime monitorability (is that even a word?!) of the JVM through JMX.
Case Study: High Volume Processing using Spring Framework
The speaker was Meeraj Kunnumpurath (Enterprise Architect @ Voca)
This title was actually a bit misleading, as the high volume processing was not achieved due to their usage of Spring, but rather other technology choices they had made. His response to that claim: "Spring encourages best practices, which fit in well with an architecture that provides performance". Still a very interesting talk. Here are some key points:
- Facts & Figures - Voca is pretty hard-core!
- Voca processes all UK direct debits, 90% of UK salary payments, and a bunch of other stuff
- This equates to 100 million transactions daily
- In testing, their architecture has processed 100 million transactions in 2 hours 15 mins. That's about 12,000 per second. Not bad.
- The process is considered part of the UK Critical National Infrastructure - alongside things like water & electricity distribution - due to the effect that its failure would have on the economy
- The total value of transactions they process yearly is €4.5 trillion - yes, trillion
-
- Design
- Technology Stack: Java, Spring, Hibernate, WebLogic, Oracle DB - 10g RAC, Oracle AQ (Advanced Queuing), , Soalaris Sun Fire UltraSPARC
- Whilst they used Hibernate for most things - the very core parts of the system, they dropped back down to JDBC calls.
It seemed this was just to be "safe" as Hibernate was not considered proven enough when they started the project.
He did not indicate whether they would make that decision differently now... - All transactions were local - not XA (i.e. distributed)
- The choice of Oracle AQ as the messaging was an interesting one.
Oracle AQ implements its queueing using tables, and one of the interfaces it exposes is through JDBC, rather than JMS.
This means:- No additional messaging server to worry about
- Writes into the messaging queues are part of the same transaction as any other DB writes - cool! Nice and neat way of avoiding XA
-
- Minimise Movement of Data
If they had logic that required a fair bit of data, they moved that processing down into the db (as stored procs presumably) - Parallelisation
Break up any processing, and do the bits concurrently where possible - Partition Data
Similar to minimising movement of data, if you are able partition data this provides performance boosts. - Minimising DB contention
They were using RAC, and by pinning app servers to a single node in the RAC this greatly reduced risk of contention at DB level - Asynchronous decoupling
- Caching
- Hibernate 2nd level cache
- Plus some of theur own custom caching
-
- Use of Spring allowed:
- Developers didn't have to run in an container at all - just straight out of SE with some db pool, transaction mgmnt, etc. injected in
Just a config change to go to live versions - promoted loose coupling & modularity
- increased productivity by 30% (over using the full EE stack)
-
- They relied "hugely" on Oracle for:
- bulk uploads
- High Availability - they used Data Guard (I don't know much about that)
- Load Balancing
-
- They also used Mule (ESB) for service provisioning and orchestration
- All requests were stateless. State was maintained in the DB
-
- Other bits & pieces
- They found it difficult to sell the use of Open Source (Spring, Hibernate) into the ultra-conservative UK banking sector - but they did it
-
The thing that Meeraj said to watch for the future is SCA (Service Component Architecture) - a bit buzzwordy, but something to keep an eye on...
Summary: These guys are at the front end of high performance java apps, and they aren't using any of the fancy grid technology stuff out there (like GigaSpaces & Appistry). Just goes to show that with the right architecture and with performance in mind from day 1 you can go a long way... Also interesting to hear of yet another Case Study that relied significantly on the features provided by Oracle.
Eclipse Persistence Services Project
By Doug Clark (who did yesterday afternoon's KeyNote that I mentioned on yesterday's blog)
This was a drill down into the one bit of that - the new incarnation of TopLink: EclipseLink
Firstly, I don't like the name! It implies that it is some kind of Eclipse plugin or something - and not a full persistence framework
Anyway, some more notes:
- JPA1.0 compliant
- Also offers:
- MOXy - For Object to XML mapping
JAX-B comliant
Developer can treat an xml doc as an object
Mapping (columns to fields) can be auto, or controlled through meta data - SDO - Service Data Objects
- DBWS - Database Web Services
This was pretty interesting - basically allows you to expose an SQL statement as a Web Service.
e.g. SELECT * FROM S_LANGUAGES - we could expose that as a GetLanguages Web Service with very little effort. - EIS - (Enterprise Integration <Something> - I think) This allows you to expose non database data sources - such as XML or JMS and access them in the same way that you would a db
-
- Runs in any java container (doesn't have to be EE)
- Entity caching
Interestingly it caches the actual object instance rather than the pure data representation. This has performance benefits, and is unique in the ORM space I believe - Level 2 caching across transactions & users
- Coordination in a clustered environment
Can be (configurably) through JMS, RMI, JGroups, etc.
Also integrates with Coherence (formerly Tangosol) which is the coolest distributed caching around... - Default is optimistic caching
- Caching options are configurable
e.g. expiry, pessimistic, etc. - Doug hammered home the importance of data locking with regards to concurrency.
There are defaults, but you have to think about how you want your app to work.
this can be optimistic locking, which checks on a per column level when updating - and there are other options - Supports JPQL as well as SQL
- Optimisation - e.g. for joins & batches
- Annotations allow interesting configurations. Couple of interesting examples:
- @PrivateOwned - if an attribute is annotated like this, then should you remove the refernce from the holding object, then it is also physically deleted from the store. e.g. customer & address - if you delete the customer, you want to auto-delete the address (not just the reference)
- @Converters - defines how the annotated attribute should be converted on its way to a DB type (and in other direction)
-
- Customisable - for example you can plug in factories to define object creation, or object copy behavaiour
- Performance - Doug claimed it is the most optimised persistence framework out there - and I believe that.
Doug didn't mention any other O/R mapping tools during the presentation, but inevitably the questions were asked about comparisons to Hibernate.
Main thing is that Hibernate provides the ORM stuff, but not the other features listed above.
Also, Doug claims that it is faster - which I believe, but would need to be verified of course :-)
Summary: EclipseLink is a really robust, really tunable persistence framework that I think we should take a serious look at - especially now that the whole framework is open source.
GlassFish Update
For those that don't know, GlassFish is an Open Source, Enterprise Class Java EE application server (and a bunch more)
Sun is managing the project and probably the most surprising thing for me is the traction that its gained in a relatively short space of time.
Anyway, there are plenty of real-world implementation out there already - mainly on v1. v2 is just released and it has a lot of cool stuff.
Here are a few highlights that I jotted down as interesting:
- Memory Replication (using JXTA) - for session sharing as well as caching
- Built in ESB with JBI - with GUI admin (or CLI)
- Nice adminsitration UI
- JPA implementation is Toplink
- The JMS implementation is actually very good - enterpise class
Summary: GlassFish is a definite contender as application server choice should we ever replace ours
OSGi
Its all about component integration, where components can be anything - from mobile devices to software libraries.
Effectively provides a gluing protocol between the components, and includes support for dependencies & versioning.
Key point is that its all dynamic (can be managed at runtime - new versions deployed, things brought out of service - all the dependents automatically become out of service too, etc...)
All us developers at VC have been using it for years - its the underpinning of Eclipse's plugin framework :-)
Can't be bothered writing more so here's a link to the presentation if you're interested.
High Performance Architectures
There was also an interesting session on High Performance Architectures which had dudes from GigaSpaces, Azul, Appistry & Kirk Pepperdine on the panel. Was interesting, but if I don't stop writing now, I won't have any drunk chat to add tomorrow... Ask me when I'm back in GIB...