|By Mahesh K Punjabi||
|October 11, 2011 12:00 PM EDT||
Object Relational Technologies form the backbone of most of the enterprise Java applications. Choosing the appropriate technology however is one of the most important decisions for an enterprise architect. More often than not, such a decision is either a hit or miss. Mistakes done in selecting the appropriate technology results in performance bottlenecks, lack of scalability, unreliable transaction handling etc.
More than the problem with the specific ORM technology, it's the suitability of that technology to the underlying business needs and non-functional requirements. This article aims to establish an objective architecture evaluation framework for evaluating which ORM technology best fits your project needs. Based on the requirements, one or the other technology may be appropriate.
For an ORM framework to be flexible, the following considerations are important
- Do multiple options exist to access and manipulate data
Should the project need multiple ways to access data. This would include object based way of querying data, using native SQL, using ORM specific natural query language. The architect must decide the importance of each of these methods and evaluate this parameter.
- Does the ORM tool supports extending the various default data types, with user defined data types
Project needs change and so there are requirements to add custom data types. The ORM tool must support this feature, should you envisage the changing needs of your project.
- Ability to invoke interceptors on the data before it is saved, accessed or deleted
Enterprise projects often need to add additional business validations or business logic over a period of time. Many of these changes need to be cross-functional. The ORM tool must have mechanism to intercept requests and inject such validations. This is an important factor if you foresee changes happening after the production deployment.
- Programmatic and Declarative Configurations
The ORM framework must provide multiple ways for it to be configured. This is important again from the perspective of how flexible the tool needs to be.
Ease of Development
- Ability to create domain model from the database tables
This is an important consideration if you already have database tables and you need to create domain model out of it through automatic code generation. The ORM framework must provide the appropriate utility for doing that.
- Ability to generate database tables from the domain model
This is an important factor when the domain model has already been created as part of MDD and database needs to be created. This would ensure that there are minimal errors during generation of database schema
- Ability to specify natural query language for retrieval
Typically ORM tools provide a criteria API to fire object oriented queries. However based on development experience, it is understood that this is not the best way of visualizing large and complex queries. If this is a criteria important for your project, you must ensure the availability of natural query language with the ORM tool. Support for native SQL is also important under this consideration
- Support for JTA transactions
An enterprise ORM framework must support JTA transactions. This support should be both declarative as well as programmatic. This is the most important consideration for evaluating the reliability of the platform as incorrect transaction handling would be catastrophic
- Support for Batch Processing
Looping through individual transactions for batch processing is a perfect way to crash your system. The ORM tool must support JDBC Batch updates for batch processing.
- Support for Caching
Caching is important both from scalability as well as reliability perspective. Support for integrating third party cache should be an important consideration for all enterprise projects. The cache support must be distributable across the cluster as well
Scalability and Performance
- Ability to use container or third party connection pools
Connection pools should provide ability to scale up to increased load
- Ability to support legacy code
If you need support for legacy code, the ORM tool must support native invocation of stored procedures
- Ability to optimize queries for performance
It is very difficult to optimize a two page query written using criteria API. Infact for many complex scenarios for an enterprise application, there is a need to fire native SQL queries. These queries are also easy to optimize especially by the DBAs. If performance is a critical requirement, this factor must be considered
- Ability to cache queries and query results
This is an important criterion for scalability
- Ability to modify domain model or DB model with minimal changes to underlying code
This is an important factor if you foresee such changes
- Ability to log the framework internals
During development as well as during production failures, there is an urgent need to debug to identify the issue. Many a times the issue may lie with the ORM framework itself. This is an important consideration for any enterprise application.
- Integration with JMX for runtime statistics
If instrumenting the application during production under consideration, this is a must have feature for your ORM tool.
- Ability to support multiple relationships
These would include one-to-many, many-to-many and many-to-one relationships
- Ability to support lazy loading
This is important when you need to eagerly load a chain of nested objects. This feature is useful when underlying data store is not huge.
- Ability to support sorting and pagination
These features are a must for search based applications
- Declarative security
Authorizing different users to execute different queries can easily be achieved using this framework.
- Support for Dynamic SQL
For any non-trivial application dynamic SQL is a must
An enterprise architect can use the above criteria to evaluate the most suitable ORM framework for his application. Each of the criteria should be judged with respect to the application requirements. A scoring model which gives weightage to respective parameters and computes the final scores for each of the applicable ORM tools is the right procedure to use the above architectural framework.
Internet of @ThingsExpo, taking place November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 19th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal and enterprise IT since the creation of the Worldwide Web more than 20 years ago. All major researchers estimate there will be tens of billions devices - comp...
Aug. 29, 2016 02:15 PM EDT Reads: 3,727
[session] Architecting for the Cloud By @RagsS | @CloudExpo @IBMBluemix #Cloud #Docker #Microservices
As the world moves toward more DevOps and Microservices, application deployment to the cloud ought to become a lot simpler. The Microservices architecture, which is the basis of many new age distributed systems such as OpenStack, NetFlix and so on, is at the heart of Cloud Foundry - a complete developer-oriented Platform as a Service (PaaS) that is IaaS agnostic and supports vCloud, OpenStack and AWS. Serverless computing is revolutionizing computing. In his session at 19th Cloud Expo, Raghav...
Aug. 29, 2016 02:00 PM EDT Reads: 946
DevOps at Cloud Expo, taking place Nov 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 19th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long dev...
Aug. 29, 2016 02:00 PM EDT Reads: 2,474
This complete kit provides a proven process and customizable documents that will help you evaluate rapid application delivery platforms and select the ideal partner for building mobile and web apps for your organization.
Aug. 29, 2016 12:00 PM EDT Reads: 2,996
19th Cloud Expo, taking place November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterpri...
Aug. 29, 2016 12:00 PM EDT Reads: 3,185
The following fictional case study is a composite of actual horror stories I’ve heard over the years. Unfortunately, this scenario often occurs when in-house integration teams take on the complexities of DevOps and ALM integration with an enterprise service bus (ESB) or custom integration. It is written from the perspective of an enterprise architect tasked with leading an organization’s effort to adopt Agile to become more competitive. The company has turned to Scaled Agile Framework (SAFe) as ...
Aug. 29, 2016 12:00 PM EDT Reads: 948
Let's just nip the conflation of these terms in the bud, shall we?
"MIcro" is big these days. Both microservices and microsegmentation are having and will continue to have an impact on data center architecture, but not necessarily for the same reasons. There's a growing trend in which folks - particularly those with a network background - conflate the two and use them to mean the same thing.
They are not.
One is about the application. The other, the network. T...
Aug. 29, 2016 09:30 AM EDT Reads: 4,726
If you are within a stones throw of the DevOps marketplace you have undoubtably noticed the growing trend in Microservices. Whether you have been staying up to date with the latest articles and blogs or you just read the definition for the first time, these 5 Microservices Resources You Need In Your Life will guide you through the ins and outs of Microservices in today’s world.
Aug. 29, 2016 08:30 AM EDT Reads: 5,205
This is a no-hype, pragmatic post about why I think you should consider architecting your next project the way SOA and/or microservices suggest. No matter if it’s a greenfield approach or if you’re in dire need of refactoring. Please note: considering still keeps open the option of not taking that approach. After reading this, you will have a better idea about whether building multiple small components instead of a single, large component makes sense for your project. This post assumes that you...
Aug. 29, 2016 08:15 AM EDT Reads: 5,295
SYS-CON Events announced today that eCube Systems, a leading provider of middleware modernization, integration, and management solutions, will exhibit at @DevOpsSummit at 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. eCube Systems offers a family of middleware evolution products and services that maximize return on technology investment by leveraging existing technical equity to meet evolving business needs. ...
Aug. 29, 2016 08:00 AM EDT Reads: 847
Before becoming a developer, I was in the high school band. I played several brass instruments - including French horn and cornet - as well as keyboards in the jazz stage band. A musician and a nerd, what can I say? I even dabbled in writing music for the band. Okay, mostly I wrote arrangements of pop music, so the band could keep the crowd entertained during Friday night football games. What struck me then was that, to write parts for all the instruments - brass, woodwind, percussion, even k...
Aug. 29, 2016 06:45 AM EDT Reads: 3,194
Sharding has become a popular means of achieving scalability in application architectures in which read/write data separation is not only possible, but desirable to achieve new heights of concurrency. The premise is that by splitting up read and write duties, it is possible to get better overall performance at the cost of a slight delay in consistency. That is, it takes a bit of time to replicate changes initiated by a "write" to the read-only master database. It's eventually consistent, and it'...
Aug. 29, 2016 05:15 AM EDT Reads: 3,232
SYS-CON Events announced today that Isomorphic Software will exhibit at DevOps Summit at 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Isomorphic Software provides the SmartClient HTML5/AJAX platform, the most advanced technology for building rich, cutting-edge enterprise web applications for desktop and mobile. SmartClient combines the productivity and performance of traditional desktop software with the simp...
Aug. 29, 2016 03:00 AM EDT Reads: 2,428
With so much going on in this space you could be forgiven for thinking you were always working with yesterday’s technologies. So much change, so quickly. What do you do if you have to build a solution from the ground up that is expected to live in the field for at least 5-10 years? This is the challenge we faced when we looked to refresh our existing 10-year-old custom hardware stack to measure the fullness of trash cans and compactors.
Aug. 29, 2016 02:15 AM EDT Reads: 1,837
The emerging Internet of Everything creates tremendous new opportunities for customer engagement and business model innovation. However, enterprises must overcome a number of critical challenges to bring these new solutions to market. In his session at @ThingsExpo, Michael Martin, CTO/CIO at nfrastructure, outlined these key challenges and recommended approaches for overcoming them to achieve speed and agility in the design, development and implementation of Internet of Everything solutions wi...
Aug. 29, 2016 01:45 AM EDT Reads: 2,201
This digest provides an overview of good resources that are well worth reading. We’ll be updating this page as new content becomes available, so I suggest you bookmark it. Also, expect more digests to come on different topics that make all of our IT-hearts go boom!
Aug. 29, 2016 01:30 AM EDT Reads: 4,852
It's been a busy time for tech's ongoing infatuation with containers. Amazon just announced EC2 Container Registry to simply container management. The new Azure container service taps into Microsoft's partnership with Docker and Mesosphere. You know when there's a standard for containers on the table there's money on the table, too. Everyone is talking containers because they reduce a ton of development-related challenges and make it much easier to move across production and testing environm...
Aug. 28, 2016 10:30 PM EDT Reads: 5,248
The 19th International Cloud Expo has announced that its Call for Papers is open. Cloud Expo, to be held November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, Big Data, Internet of Things, DevOps, Digital Transformation, Microservices and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportuni...
Aug. 28, 2016 10:30 PM EDT Reads: 4,076
Aug. 28, 2016 10:30 PM EDT Reads: 4,899
Deploying applications in hybrid cloud environments is hard work. Your team spends most of the time maintaining your infrastructure, configuring dev/test and production environments, and deploying applications across environments – which can be both time consuming and error prone. But what if you could automate provisioning and deployment to deliver error free environments faster? What could you do with your free time?
Aug. 28, 2016 08:15 PM EDT Reads: 1,973