Chapter 8. Addressing Architecture

In this chapter, we will discuss how to address architectural constraints for an enterprise application using Hibernate. Every enterprise application follows an architecture, which specifies the software components, such as data models, process models, user interface, and data persistence; and system components such as web servers, application servers, and database management systems. Here, we will see how Hibernate can, in fact, address some architectural requirements and constraints. The following points will be covered in detail:

  • Architecture matters
  • Transaction management:
    • Local transaction
    • JTA
    • Compensating transaction
  • Concurrency:
    • Isolation level
    • Locking
    • Application lock
  • Scalability:
    • Clustering
    • Database shards
  • Performance
  • Legacy application
  • Cloud strategy:
    • License
  • Multi-tenancy

Architecture matters

You may be able to write a simple command-line application, a utility, or perhaps even a simple desktop application without formally defining your application architecture. But enterprise applications must start with architecture, as there are many moving parts, systems, and enterprise constraints. The job of an enterprise architect is to align business goals and objectives with an IT strategy. And this doesn't only mean implementing functional capabilities, business logic, or a user interface. Enterprise architects are also concerned with non-functional business goals, such as reducing business cost and minimizing risks. Besides implementing business capabilities, application architects are also responsible for implementing the governing policies defined by the enterprise architects.

For architecture, you can use transactions to minimize data loss or to ensure data integrity, or you can scale your application to accommodate higher number of users or business transactions. There are other considerations that you need to keep in mind that are related to cost reduction. So, let's discuss some of those here and how Hibernate can address those concerns.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.104.124