Distributed Systems & J2EE Architecture

Ratings:
(4.4)
Views:1738
Banner-Img
  • Share this blog:

At the end of this module you will be able to:

  • Explain the motivation behind distributed systems
  • List the major components of the J2EE specification
  • Know the terminology used throughout the course

Distributed Architecture

 Distributed Systems:

  • Distributed systems divide the work amongst several independent modules.
  • Failure of a single module has less impact on the overall system which makes them more:
    • Available
    • Scalable
    • Maintainable

A distributed system consists of multiple autonomous computers that communicate through a computer network. The computers interact with each other in order to achieve a common goal. A computer program that runs in a distributed system is called a distributed program.

To be truly reliable, a distributed system must have the following characteristics:

  • Fault-Tolerant: It can recover from component failures without performing incorrect actions.
  • Highly Available: It can restore operations, permitting it to resume providing services even when some components have failed.
  • Recoverable: Failed components can restart themselves and rejoin the system after the cause of failure has been repaired.
  • Consistent: The system can coordinate actions by multiple components often in the presence of concurrency and failure. This underlies the ability of a distributed system to act like a non-distributed system.
  • Scalable: It can operate correctly even as some aspect of the system is scaled to a larger size. For example, we might increase the size of the network on which the system is running. This increases the frequency of network outages and could degrade a "non-scalable" system. Similarly, we might increase the number of users or servers or overall load on the system. In a scalable system, this should not have a significant effect.
  • Predictable Performance: The ability to provide desired responsiveness in a timely manner.
  • Secure: The system authenticates access to data and services.

How Standards Help:

  • Many of the advantages of distributed systems come from standards.
  • Standards:
    • Provide separation of difficult problems to separate platforms
    • Allow modularization of complex hardware and software
    • Allow a larger portion of project costs to go toward solving business software needs.

The J2EE Standard:

  • Java Platform 2 Enterprise Edition (J2EE) helps to overcome distribution liabilities.
  • Applications deployed with J2EE technologies are:
    • Standardized
    • Adherent to specification guidelines
    • Written in Java
    • Deployable in any compliant application server

The J2EE Architecture

J2EE Containers

Containers are the interface between a component and the low-level platform-specific functionality that supports the component. Before a Web, enterprise bean, or application client component can be executed, it must be assembled into a J2EE application and deployed into its container.

The assembly process involves specifying container settings for each component in the J2EE application and for the J2EE application itself. Container settings customize the underlying support provided by the J2EE server, which includes services such as security, transaction management, Java Naming and Directory Interface (JNDI) lookups, and remote connectivity. Here are some of the highlights:

The J2EE security model lets you configure a Web component or enterprise bean, so that system resources are accessed only by authorized users.

The J2EE transaction model lets you specify relationships among methods that make up a single transaction so that all methods in one transaction are treated as a single unit.

JNDI lookup services provide a unified interface to multiple naming and directory services in the enterprise so that application components can access naming and directory services.

The fact that the J2EE architecture provides configurable services means that application components within the same J2EE application can behave differently based on where they are deployed. For example, an enterprise bean can have security settings that allow it a certain level of access to database data in one production environment and another level of database access in another production environment.

J2EE Container Types

The deployment process installs J2EE application components in the J2EE containers….

4

J2EE server

The runtime portion of a J2EE product. A J2EE server provides EJB and Web containers.

Enterprise JavaBeans (EJB) container

Manages the execution of enterprise beans for J2EE applications. Enterprise beans and their container run on the J2EE server.

Web container

Manages the execution of JSP page and servlets components for J2EE applications. Web components and their container run on the J2EE server.

Application client container

Manages the execution of application client components. Application clients and their container run on the client.

Applet container

Manages the execution of applets. Consists of a Web browser and Java Plug-in running on the client together.

J2EE Architecture

5

Java Servlets:

  • A Servlet is a Java "program" that executes on the server, accepting client requests and generating dynamic responses.
  • The most prevalent type of Servlet is an HttpServlet that accepts HTTP requests and generates HTTP responses.
  • Servlets:
    • Do not just generate HTML
    • Can also be used to generate other MIME types, such as images

JavaServer Pages (JSPs)

  • JavaServer Pages are HTML documents interweaved with Java.
  • JSPs:
  • Provide a dynamic response that is based on the client's request
  • Provide for the separation of responsibilities between Web presentation and dynamic content
  • Are portable (write once, run anywhere)
  • Compile and run as servlets

Enterprise JavaBeans (EJBs)

  • EJBs have distributed components written in the Java Programming language.
  • EJBs:
    • Provide distributable and deployable business services (logic) to clients
    • Have well-defined interfaces
    • Are reusable across application servers
    • Execute within a container that provides management and control services
  • WebLogic Server 9.X supports the EJB 2.1 specification.

JDBC (Java Database Connectivity)

  • JDBC is:
    • A standard Java interface for accessing heterogeneous databases.
    • A specification that defines four different driver types for connecting to databases.

6

Java Naming & Directory Interface (JNDI)

  • JNDI is:
    • A Java API for accessing naming and directory servers
    • Built as a layer over DNS, LDAP, etc.

7

Java Transaction API (JTA):

  • JTA is a standard Java API for demarcating transactions within a program.
  • WebLogic Server supports local and distributed transactions.

8

Java Message Service (JMS)

  • JMS is a Java API for accessing message-oriented middleware.
  • The interface supports:
    • The Point-to-Point domain
    • The Publish/Subscribe domain
    • Guaranteed message delivery
    • Transactional participation
    • Dynamically configurable services
    • Application- or system-scoped resources
    • Interoperability with other messaging systems

9

Java Authentication and Authorization

  • Java Authentication and Authorization Service (JAAS) is a Java-based security management framework.
  • JAAS supports:
    • Single sign-on
    • A Pluggable Authentication Module (PAM)
  • JAAS enables flexible control over authorization whether it is based on:
    • Users
    • Groups
    • Roles

JMX

  • The Java Management Extensions (JMX):
    • Defines a standard infrastructure to manage a device from Java programs
    • Decouples the managed device from the management tools

The specification describes MBeans, which are the building blocks of JMX

10

Summary:

  • Covered Distributed Architecture and the Standards
  • J2EE Container Types, Architecture and Technologies.

Check out our Related Courses

Introduction to Clustering Weblogic

Oralce Taleo Training In Hyderabad

Oracle Weblogic Server Installation

You liked the article?

Like : 0

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses

1/15

About Author
Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.


Stay Updated


Get stories of change makers and innovators from the startup ecosystem in your inbox