12 High-level JEE architecture overviews at 100 feet with diagrams

1. Model-View-Controller Architecture

Most web and stand-alone GUI applications follow this pattern. For example, Struts, Spring MVC are server side MVC and angularjs, react.js are client side MVC. The model represents the core business logic and state. The view renders the content of the model state by adding display logic. The controller translates the interaction with the view into action to be performed by the model. The actions performed by a model include executing the business logic and changing the state of the model. Based on the user interactions, the controller selects an appropriate view to render. The controller decouples the model from the view.

MVC Architecture

MVC Architecture

2. Service Oriented Architecture (SOA)

The business logic and application state are exposed as reusable services. An Enterprise Service Bus (ESB) is used as an orchestration and mediation layer to decouple the applications from the services.

SOA (Service Oriented Architecture)

SOA (Service Oriented Architecture)

The above architecture has 5 tiers. The application tier could be using a typical MVC architecture. The service orchestration tier could be using ESB products like Oracle Service Bus, TIBCO, etc and BPM products like Lombardi BPM, Pega BPM, etc. In the above diagram, the ESB integrates with the BPM via messaging queues. The service tier consists of individual services that can be accessed through SOAP or RESTful web services. The SOA implementation requires change agents to drive adoption of new approaches. The BPM, application integration, and real-time information all contribute to dynamically changing how business users do their jobs. So, it needs full support from the business, requiring restructuring and also it can take some time to realize the benefits of SOA. Cloud computing is at the leading edge of its hype and as a concept compliments SOA as an architectural style. Cloud computing is expected to provide a computing capability that can scale up (to massive proportions) or scale down dynamically based on demand. This implies a very large pool of computing resources either be within the enterprise intranet or on the Internet (i.e on the cloud).

3. Web Oriented Architecture (WOA)

Q. Differentiate between SOA (Service Oriented Architecture) versus WOA (Web Oriented Architecture)?
A. WOA extends SOA to be a light-weight architecture using technologies such as REST and POX (Plain Old XML). POX compliments REST. JSON is a variant for data returned by REST Web Services. It consumes less bandwidth and is easily handled by web developers mastering the Javascript language

SOA and WOA differ in terms of the layers of abstraction. SOA is a system-level architectural style that tries to expose business capabilities so that they can be consumed by many applications. WOA is an interface-level architectural style that focuses on the means by which these service capabilities are exposed to consumers. You can start out with a WOA and then grow into SOA.

4. Micro Services Architecture (MSA)

Q. Differentiate between SOA (Service Oriented Architecture) versus MSA(Micro Services Architecture)?
A. Microservices allow large systems to be built from a number of collaborating components. The collaborating components can be web services, messaging, event-driven APIs, Web Sockets, and non-HTTP backed RPC mechanisms. So, A web service can be a microservice, but microservice might not be a web service.

SOA (Service Oriented Architecture) MSA (MicroServices Architecture)
SOA is coarse-grained. MSA is fine-grained. Often behavior & data are encapsulated. Adheres to the Single Responsibility Principle(SRP).
SOA focuses more on re-usability. SOA has higher coupling, where services depend on other services to function. MSA focuses more on low coupling & high cohesion. It also emphasizes on autonomy, where services can be individually developed, deployed, scaled & monitored to provide business value on its own with both behavior & data. Lower coupling allows the service to operate independently and high cohesion increases it’s ability to add value on its own.

Micro Services focus more on “loose coupling & high cohesion” than reuse. The definition of a service is an individual execution unit, and the definition of “micro” is the size, so that the service can be autonomously developed, deployed, scaled & monitored. This means the service is full-stack and has control of all the components like UI, middleware, persistence, and transaction. The services can be invoked both synchronously and asynchronously.

Microservices deployed to multiple hosts (e.g. on the cloud)

Microservices deployed to multiple hosts (e.g. on the cloud)

Micro services require a service registration as multiple processes working together need to find each other. Spring Cloud is built on Spring Boot, and incorporates the registration service called “Eureka” built by Netflix.

5. User Interface (UI) Component Architecture

This architecture is driven by a user interface that is made up of a number of discrete components. Each component calls a service that encapsulates business logic and hides lower level details. Components can be combined to form new composite components allowing richer functionality. These components can also be shared across a number of applications. For example, JavaScript widgets, Java Server Faces (JSF) components, etc.

UI Component Architecture

UI Component Architecture

6. RESTful data composition Architecture

RESTful data composition

RESTful data composition

The user interface can be built by calling a number of underlying services that are each responsible for building part of a page. The user interface translates and combine the data in different formats like XML(translate to HTML using XSLT), JSON (Java Script Object Notation), ATOM (feed for mail messages and calendar applications), RSS (for generating RSS feeds), etc.

7. HTML composition Architecture

HTML composition architecture

HTML composition architecture

In this architecture, multiple applications output fragments of HTML that are combined to generate the final user interface. For example, Java portlets used inside a portal application server to aggregate individual content, server side or client side mashups.

8. Plug-in Architecture

plugin architecture

plugin architecture

In this architecture, a core application defines an interface, and the functionality will be implemented as a set of plug-ins that conform to that interface. For example, the the Eclipse RCP framework, Maven build tool, etc use this architecture.

9. Event Driven Architecture (EDA)

EDA

EDA

The EDA pattern decouples the interactions between the event publishers and the event consumers. Many to many communications are achieved via a topic, where one specific event can be consumed by many subscribers. The EDA also supports asynchronous operations and acknowledgments through event messaging. This architecture requires effective monitoring in place to track queue depth, exceptions, and other possible problems. The traceability, isolation, and debugging of an event can be difficult in some cases. This architecture is useful in scenarios where the business process is inherently asynchronous, multiple consumers are interested in an event(e.g. order status has changed to partially-filled ), no immediate acknowledgment is required (e.g. an email is sent with the booking details and itinerary), and real-time request/response is not required (e.g. a long running report can be generated asynchronously and made available later via online or via email).

10. Hybrid Architecture

Most conceptual architectures use a hybrid approach using a combination of different architectures discussed above on the benefits of each approach and its pertinence to your situation. Here is a sample hybrid approach depicting an online trading system.

Hybrid Architecture

Hybrid Architecture

11. OLAP (OnLine Analytical Processing) Architecture

for business intelligence (BI), data mining, and complex reporting. IBM Cognos, JasperSoft, Oracle Enterprise BI server, etc are OLAP systems. ETL (Extract Transform & Load) or ELT (Extract Load & Transform) operations are performed to move OLTP data from various source systems into data warehouse systems. ETLs can be performed with Spring batch or commercial tools like Data Stage from IBM, Pentaho and Informatica.

OLTP vs OLAP

OLTP vs OLAP

12. OLAP BigData Architecture

for business intelligence (BI), data mining, and complex reporting of BigData in peta bytes as opposed to tera bytes. Handles structured (e.g. RDBMS), unstructured (e.g. images, PDFs, etc), and semi structured (e.g. log files, XML files) data. As the volume and complexity of data grow, the time to process grows. The traditional ETL processes struggle to complete within the SLAs. Traditional ELT approach puts excessive loads into data warehouse (DWH). Hadoop can not only send some data to DWH, and also provides the infrastructure to be queried directly from the HDFS via HBase, Hive, Spark, Storm, etc. for the Big Data to be queried and analyzed.

Hadoop Architecture Overview

Hadoop Architecture Overview


300+ Enterprise Java Interview Q&As
Module 1 Describe the recent Java application that you had worked on from a 100 feet?-
Unit 1 12 High-level JEE architecture overviews at 100 feet with diagrams  - Preview
Unit 2 Describe a typical Java EE architecture?  - Preview
Unit 3 11 JEE application integration styles with diagrams  - Preview
Module 2 JEE Overview+
Unit 1 10 JEE overview interview Q&As
Unit 2 4 JEE bean validation, asynchronous processing & web fragments interview Q&As
Module 3 Web Basics+
Unit 1 4 Http methods, content types, headers, MIME types, cookies, etc Q&As
Unit 2 12 Web development basics interview Q&AS
Unit 3 8 Web development design patterns interview Q&As
Module 4 Java Servlets+
Unit 1 21 Java servlet interview Q&As
Unit 2 5 web.xml, ServletConfig, and ServletContext interview Q&As
Module 5 View Technologies in Java Web applications+
Unit 1 Client-side vs server side view technologies interview Q&As
Unit 2 13 AngularJs interview Q&As
Unit 3 7 JSP interview Q&As
Unit 4 9 JSF interview Q&As
Module 6 Java Web Services+
Unit 1 6 must know Java Web Services Interview Q&As
Unit 2 6 Micro & web services interview Q&As
Unit 3 6 RESTful web services interview Q&As
Unit 4 JAX-RS how to create a RESTFul Web Service in Java?
Unit 5 5 JAXB interview Questions & Answers
Unit 6 RESTful interview question on 12 rules to remember
Unit 7 REST constraints (i.e. design rules) interview Q&As
Unit 8 HATEOAS question on RESTful web service
Unit 9 HATEOAS RESTFul Service with Spring tutorial
Unit 10 11 SOAP web services interview Q&As
Unit 11 SOAP Web Service Styles Interview Q&As
Module 7 Java and Spring Microservices+
Unit 1 10+ Domain Driven Design (i.e. DDD) Interview Q&As
Unit 2 10+ Key Microservices Interview Questions Answered
Unit 3 7 Apache Kafka interview Q&As
Unit 4 DevOps, Kubernetes, Docker & Microservices Q&As
Module 8 Spring Core+
Unit 1 9 Spring framework overview interview Q&As
Unit 2 DIP, DI, Spring IoC and loose coupling in detail Q&As
Unit 3 4 Spring bean lifecycle interview Q&As
Unit 4 17 Spring bean scopes interview Q&As
Module 9 Spring MVC and Spring Boot+
Unit 1 11 Spring MVC interview Q&As
Unit 2 15 Spring boot Interview Q&As
Unit 3 Spring Cloud Microservices interview Q&As
Module 10 JPA and Hibernate+
Unit 1 8 JPA interview Q&As
Unit 2 8 Hibernate basics interview Q&As
Unit 3 8 Hibernate object states, lazy loading & optimistic locking Q&As
Module 11 JDBC, Transaction Management & JTA+
Unit 1 5 JDBC overview interview Q&As
Unit 2 12 JDBC basics interview Q&As
Unit 3 9 Java Transaction Management interview Q&As
Unit 4 8 JTA interview Q&As
Module 12 JMS, JNDI, and JMX+
Unit 1 16 JMS interview Q&As
Unit 2 9 JNDI & LDAP interview Q&As
Unit 3 5 JMX and MBean interview Q&As
Module 13 Database & SQL+
Unit 1 15 Database interview Q&As
Unit 2 15 SQL interview Q&As
Unit 3 3 SQL subqueries interview Q&As
Module 14 Unix & Regex+
Unit 1 14 Unix interview Q&As
Unit 2 Power of regex for string manipulation
Unit 3 9 Regular expressions (aka regex) in Java interview Q&As
Module 15 JSON, XML & XSD+
Unit 1 17 XML interview Q&As
Unit 2 11 XSD interview Q&As
Unit 3 7 Processing XML in Java interview Q&As
Unit 4 5 JAXB interview Q&As
Unit 5 6 JSON interview Q&As
Unit 6 Processing JSON in Java
Module 16 UML & ERD+
Unit 1 12 UML interview Q&As
Unit 2 10 ERD (i.e. Entity-Relationship Diagrams) interview Q&As
Module 17 Maven & Git+
Unit 1 12 Maven build tool interview Q&As
Unit 2 7 Maven, Nexus, and other build tools Q&As
Unit 3 8 Git Source control system interview Q&As
Unit 4 6 Git Q&As on pull requests, rebasing, merging, etc
Module 18 JavaScript+
Unit 1 3 Java Vs. JavaScript interview Q&As
Unit 2 10 JavaScript Interview Q&As on variable scopes & context
Unit 3 10 JavaScript interview Q&As on functions, prototypes, “this” variable, binding, etc
Unit 4 10 JavaScript interview Q&As on functions
Unit 5 7 JavaScript interview Q&As on closures
Module 19 SDLC+
Unit 1 5 SDLC interview Q&As for Java developers
Unit 2 18 Agile development methodology interview Q&As
Unit 3 30+ SDLC activities performed by developers
Module 20 Enterprise Code Quality+
Unit 1 3 Ensuring code quality in Java applications Q&As
Unit 2 6 Unit testing Spring boot applications Q&As
Unit 3 4 Q&As on unit testing the DAO layer
Unit 4 Unit testing Spring controller
Unit 5 BDD development in Java
Module 21 Judging Experience+
Unit 1 3 How would you go about ..." Q&As to judge experience
Unit 2 11 In your Java experience, what are ... Q&As
Unit 3 7 Interview Q&As on debugging skills
Unit 4 18 Java scenarios based interview Q&As
Unit 5 9 SQL scenarios Q&As judge experience
Unit 6 How would you go about designing Java apps with UML diagrams?
Learn by categories on the go...
Learn by categories such as FAQs – Core Java, Key Area – Low Latency, Core Java – Java 8, JEE – Microservices, Big Data – NoSQL, Architecture – Distributed, Big Data – Spark, etc. Some posts belong to multiple categories.
Top