I come across this blog when I read article about poking Spring for fun.
This blog mentions about using Coherence as the L2 cache for Hibernate. This is very interesting, because I always believe performance issue is the biggest hinder for Hibernate in an Enterprise level JPA solution.
Another related thing I need to mention is the project Mr. B and I are working on, an Oracle proprietary implementation. With Oracle DB, SOA, Weblogic J2EE Server, JPA, Coherence ... everything locked in Oracle. So every time when we confront with JPA bugs, Coherence performance issue, just like hitting a big wall that hardly to break in.
But, we need Oracle. Not only because venders like to pay big bucks to Oracle and let them feel good, but also because "J2EE server is very good at BPEL and ESB stuff", as Mr. J pointed out. So I have been thinking that is it possible just run J2EE (Weblogic) for BPEL (high level business stuff), and let everything else (Java stuff) be managed by Spring (as it should be).
Benefit from Spring's Inversion of Control especially Dependency Injection, Aspect-Oriented Programming, and other standard consistent Spring's components - Spring Web Servies, Batch, Security, Integration ..., lighter, out-of-container test framework, and powerful business products (24x7 support), so this article maybe points the direction how to let OS solutions work together with commercial proprietary applications.
Read more: How do I integrate Coherence and Hibernate? - http://coherence.oracle.com/pages/viewpage.action?pageId=16730
- I'm assuming the JPA implementation is EclipseLink (TopLink). It's probably still rubbish but at least with it being open sourced now you've got something slightly better to work with.
- Depending on which JEE spec your app server is compliant with you might be able to leverage some of the new features of JEE 6 that mimic Spring.
- Failing all else, register Spring listeners in the appropriate places in your JEE app. I quite like hosting Spring apps in an app server as the server takes care of the infrastructure (eg: DataSources) and Spring can easily get references from JNDI (one line of config!!). We have Spring registered as a Servlet listener so it does all the important work with JBoss providing the plumbing. Given Weblogic would probably also be JTA compliant (and all that other distributed transaction nonsense you might need for dealing with the Oracle BHELL beast) you get the best of both worlds.
I'd ditch Coherence though :p ;)
- Yep, current JPA implementation in Weblogic is EclipseLink (buggy).
- Weblogic 10 is only JEE 5 compatible. JEE 6 support you have to wait till Weblogic 12 released.
- Agree, still need Weblogic does the application plumbing work as many as possible.
- Have to stick with Coherence. Our implementation of coherence in our project is inappropriate because this memory cache is used to hold data that is updated frequently. This caused performance downgrade especially when to deal with big data set in the production environment.
BTW, distributed object model in JEE, in a lot cases, is abused. The damage caused by the complexity and loss of performant is bigger than the gain of the distributed architecture. Give me an example of a successful distributed JEE solution.
Also, as you all know, I've become very disenchanted with ORM's over the last decade.
It is harder however to understand the state machine as a whole, so I think there's money to be made in a tool that can process the web of RESTful services and produce a pretty picture for the BAs :)
I had an interview with one of my previous employers the other day. I told two people on the panel that you should be very careful about if you use Hibernate as one-size-for-all ORM solution for large data set due to coming up performance issue hit in later stage.
They asked how to tune for a better performance. I said, partition database, using memory cache (db in memory) improve db I/O throughout, replacing Hibernate with JDBC.
Furthermore, I hated they asked my opinion about pair programming in their third question. As I said always having another pair of eyes on the codes (codes review) is also very beneficial and effective.
Not very happy with my "honest" replies, the interview was finished in just 20 minutes.
There's a an obvious difference between states and events. How important is it that the events change the state in realtime? In entity-speak this implies finding the current state, updating it then writing it back while taking care to prevent concurrent updates. This will always be slower than a simply persisting events which can be processed more optimally offline or out-of-band, allowing you to smooth out spikes in traffic.
Talking of traffic, a certain road tolling solution with which we are intimately familiar had the state-update design baked into the use cases leaving them with bugger all room to move when the inevitable scalability, concurrency and platform bugs surfaced. All of this to satisfy the rather questionable business requirement of "10 mins from roadside to account."
Coherence is used a generic database, and a lot read / write access between memory and hard disk. When switch on the production, with 50 millions messages in backend db, you can imagine what performance like.
suite" the trivial ("demoware"-class) problems are made really really easy, whereas more complex ones are made harder because one has to fight the constraints and the bugs of the "suite"...
except, being genuinely smart, wise and logical he doesn't bill anything as a 'silver' bullet
see "Advanced Distributed Systems Design" at http://www.udidahan.com/training/
you might of actually heard about him and his ideas, although due to historical reasons, he is much more known in .NET world - but the concepts and principles are applicable on any platform...
also, during the course many concept were illustrated using examples from Amazon, eBay etc so one could really see and start to realise how different those systems are...