White Paper

Document Sample
White Paper Powered By Docstoc
					                                           White Paper

      Java in the Enterprise:
The Journey to Reliable Distributed

                                           May 14, 2011

                                       Client: Symantec Corp.

                                  Upstream Analyst: John R. Rymer

Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 Ph: 510-596-0660 Fx: 510-596-0661
Java in the Enterprise                                                                                           2

                                           Executive Summary

       The real potential of Sun's Java technology lies in creation of server-based applications for the
        enterprise and the World Wide Web, not in programming of modular user interfaces (applets)
        running on so-called thin clients that fueled the technology's first phase of evolution. Sun's partners
        will extend the current Java technology to bring Java to the enterprise during the next 18 months.
        The extensions will add sophisticated compilers and platform services designed to support
        performance, reliability, and scalability.

       Java is the first widely used commercial language that incorporates distributed systems concepts.
        As a result, Java will be more productive than C++, Visual Basic, and proprietary 4GLs in the
        creation of distributed applications. Still, developers will need distributed debuggers, application
        partitioning and version management, design aids and similar tools to put the inherent power of
        Java in distributed systems to work.

       In enterprise systems, Java's primary benefits will be high developer productivity (particularly when
        compared to C++) and support for dynamic applications. Early enterprise users report that in
        server-side applications, Java's portability is of secondary importance.

       Java's point of entry into enterprise systems will be on middle-tier application servers that extend,
        integrate, and repair existing core business applications. These middle-tier Java applications will
        mediate user requests for services from the Web and from private networks and manage on-the-fly
        integration of data and application functions to satisfy those requests. Java's ability to load
        dynamically classes and program modules to respond to requests will support the high flexibility
        enterprises need to respond to unpredictable and changing user requirements.

       Java is the first language to garner support of all participants in enterprise applications. IBM,
        Oracle, Sun, BEA Systems, and other vendors support the effort to define these Java APIs that
        give developers access to a wide range of enterprise functions. This wide industry support will
        ensure that Java will be bigger than Sun Microsystems, owner of the technology. If Sun fails to
        guide Java into the enterprise, other experienced, well-equipped vendors will take on the effort.

       The Java language is linked to its underlying platform, including the Java Virtual Machine that Sun
        owns and licenses. As Java moves into the enterprise, its underlying platform will have to expand
        into transaction and data management, application management, operational management,
        directories, security, and other services crucial to fast, reliable applications. Sun's enterprise
        partners will play the central role in building enterprise platforms for Java.

       Java performance is not well understood, particularly in the context of enterprise applications. Raw
        Java performance is improving as JVMs get faster, but new compilers and optimizing techniques
        will contribute still further gains.

       Organizations adopting Java for enterprise systems must upgrade their skills and their ways of
        organizing development projects to be successful. Java requires skills in object-oriented design
        and programming, multithreaded systems design, and distributed systems design. Systems
        integrators and consultants will help IT development organizations fill the skills gap, but IT
        organizations must also invest in acquiring the skills they need to obtain the full benefit of Java in
        the enterprise.

         1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
Java in the Enterprise                                                                                3

                  Java: The Focal Point for Commercial Distributed Systems

Java is no longer just a language to make                       is applications that can respond to
eye candy for Web browsers. Java has                            changeable conditions.
become the focal point for construction of
applications that break down the limits of                     Java simplifies programming by
today's business automation, making                             eliminating pointers and automating
applications that directly represent business                   memory management. These
activities. We now take for granted the                         features make Java easier to learn
ability to tap databases that run somewhere                     than C++, a widely used language
across a network. We also assume the                            for serious programming.
Internet's worldwide reach into a growing
number of homes and business                                   Java employs object-oriented
establishments. However, these advances are                     concepts to support reuse of
just the beginning of a broader movement to                     software modules, which promises
network-based applications that make                            to reduce the costs of application
possible direct interactions with customers                     development.
and suppliers. Coming are distributed
applications that are flexible enough to adapt         In addition, Java is becoming the preferred
to changing business requirements. The real            language among vendors of enterprise
potential of Java in the enterprise is to              applications, tools, and platforms for
balance the cost-efficiencies of electronic            expressing application programming
commerce with the personal and flexible                interfaces (APIs). Sun has been working
services customers demand.                             with a variety of partners to make many
                                                       APIs vendor-neutral standards. IBM, for
Java occupies a central position in the                example, hopes to use Java APIs to provide
movement to widespread distributed                     a unified programming model for its diverse
systems. The term distributed systems                  platforms and middleware. Most of these
includes Web-enabled (HTML) applications,              vendors are threatened by Microsoft's steady
Web-based (IIOP, etc.) applications,                   movement into enterprise systems, and rely
multitier client/server applications, and new          on Java as a counterweight to Microsoft's
agent-based applications. Java on the middle           market power. However, even Microsoft
tier is being used to support each of these            acknowledges Java's utility as a language,
twists on distributed systems. Java offers             and has begun to expose its extensive
several features that are essential to creation        Windows APIs to Java developers.
of any and all of these distributed
architectures.                                         Java began its move into enterprise systems
                                                       during 1998, as early adopters began
       Java was designed from the ground              building server-side code with the language.
        up to build applications that run on           Still, there are many factors that could
        networks. The language's semantics             impede Java's path into enterprise systems.
        address network behavior and                   At the top of this list is the uncertainty
        multithreaded execution, a first               created by Sun's battles with Microsoft over
        among widely used programming                  the definition of a Java platform. Will Java
        languages.                                     be just a language, as Microsoft insists it
                                                       will be? Or will Java be a broad language
       Java's runtime environment can load            and platform to support portable, distributed
        new software modules on the fly                applications, as Sun insists it will be? The
        into a live environment. The result            most likely outcome is that there will be a
                                                       single Java language and many Java

         1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
Java in the Enterprise                                                                                                              4

platforms. Users will have a choice among                                The result could be slower progress of the
deployment platforms for their Java                                      language in creation of serious applications.
applications. The only unknown is how
portable and interoperable these platforms                               These uncertainties will determine only how
will be.                                                                 and when Java becomes a tool for enterprise
                                                                         development. Java's future in the enterprise
Java's performance is another perceived                                  is assured by the groundswell of interest in
reason to delay adopting the technology. In                              the language among developers of all
fact, the Java language and the tools that                               stripes--and the demonstrable benefits of the
support it are maturing as the basis for                                 language in distributed applications. Java's
enterprise applications. Still, Java might not                           role is becoming clear as the first intrepid
advance quickly enough on all fronts to                                  users push beyond Java applets and build
support the scalable performance and                                     business logic that runs on servers.
reliability required in enterprise computing.

                                 Java's Point of Entry: Middle Tier Applications

Pundits who portray Java as a replacement                                As illustrated in Figure 1, Java application
for the flawed technologies of the past are                              logic deployed on a middle-tier application
selling religion, not solutions. Neither the                             server can extend and integrate core
Java language nor the nascent Java                                       business applications, databases, and other
platforms are ready to replace CICS,                                     "back-end" systems. Java middle tier servers
Tuxedo, SQL, and other the other war-                                    will eliminate two sources of pain in
horses of enterprise business systems. Java's                            enterprise systems today. First, most
point of entry into enterprise systems will be                           organizations are struggling to overcome the
as a technology that extends and integrates                              barriers between their accounting, customer
existing applications, not as a replacement.                             records, inventory, sales, and other

      User                                                                                                          DB
    Interface                                    Application Server
                           Requests                    Java Logic                        Integrate
                            Content                    Packaged                            Repair
                                                       Java Logic

Figure 1: The Role of Java Servers in Enterprise Applications. Java will be employed to extend, integrate,
and even repair existing applications. The Java server will also be the primary request-handling service in the architecture.
Java's dynamic nature makes it ideal for servicing a wide variety of unpredictable requests from users. Java's ability to support
a wide variety of user interfaces will also be a benefit..

           1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
core business systems. The barriers between            Role #1: Brokering user requests for
these systems exist because the applications           services received via Internet protocols
were built at separate times by separate               (often from the Internet itself). In most
teams and often with different technologies.           cases, the user requests are simple, but
                                                       satisfying those requests is not. In the Giga
Second, organizations are struggling to use            Information Group example, requests are
the Internet's worldwide reach to speed                expressed as search criteria, some of which
interactions with business partners and                is provided by the user and some of which is
streamline transactions with customers. The            part of a predefined profile. Giga supports a
struggle is marrying the Web's stateless               wide range of content searching and
pages with record-oriented, secure business            categorization options. The combination of
systems. Java will address both of these               application functions required to satisfy each
issues. The early users of Java in the                 request is unpredictable. The Java server
enterprise have already taken this approach.           parses the requests and invokes the required
      Home Depot is completing an
      application that allows customer                 Role #2: Managing the invocation of
      service representatives to check                 application functions and the retrieval of
      inventory and customer databases                 information in response to user requests.
      from kiosks and hand-held computers.             Simple user requests require complex
      A Java server provides the value-                actions by databases and other back-end
      added link to the inventory and                  systems. In the case of Fidelity's new
      customer databases in this application.          customer account application, a customer
                                                       might have to tap a half-dozen mainframe
      Fidelity Investments has employed a             applications to obtain the desired
      Java server to allow users to obtain             information. The Java server in the Fidelity
      account information stored in multiple           application runs a set of rules that mask this
      mainframe databases simply and                   complexity from the user, while maintaining
      easily.                                          security and data integrity.

      Giga Information Group, an IT                   Role #3: Running business logic that either
      research organization, relies on a Java          performs calculations, integrates
      server to broker highly individualized           information, or executes business rules and
      customer requests for information,               policies. The scope of this logic is much
      employing Lotus Notes, a SQL                     more limited than, say, the logic in an
      database, and the Verity search engine           accounting application.
      in dynamic combinations to satisfy
      those requests.                                  These examples contain many familiar
                                                       concepts. Middle-tier logic is the hallmark
      Sony's Web site is based on a Java              of three-tier architectures. Many companies
      server that links visitors to a variety of       use the Internet to access business systems.
      back-end services.                               Java in the enterprise embraces these
                                                       concepts, but adds new wrinkles, as well.
In these examples, Java application servers            First, Java's ability to load classes and
are not used to process transactions and               components on the fly makes it flexible
manage big pools of data. Those functions              enough to cope with fluid application
are left to non-Java back-end systems.                 demands. At the same time, Java tools and
Instead, in these examples, Java servers play          IDEs will give developers the option of
three roles.                                           compiling static elements of their
                                                       applications to obtain faster performance.

 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 Ph: 510-596-0660 Fx: 510-596-0661
Java in the Enterprise                                                                             6

Second, Java is simpler than the other major           specialists, each of which works with a
languages used to build middle-tier                    different language or tool. Most
application logic. Java's automatic memory             development shops build client code with
management and simplified structure (no                one language (often Microsoft Visual
pointers) have made it twice as productive             Basic), build databases and database
as C++ in many shops. Still, Java has                  procedures using a second language (usually
semantic power that rivals C++.                        a SQL variant), and build middle-tier logic
                                                       using a third tool (often C++). Maintaining
Where does Java go from its beachhead on               these three separate skill categories is more
middle tier servers? Java will adopt a central         expensive than it is to develop a staff with
role in corporate information processing.              one set of language skills that is applicable
First, developers will use Java to build larger        to all tiers in an enterprise architecture.
and more complex middle-tier applications
than is typical today. Next, developers will           The Enterprise Java Beans APIs will key
begin to use Java to manage data on the                Java's evolution as a language for both
middle tier, in coordination with production           middle tier logic and for database
databases. Finally, database developers will           processing. This evolution will unfold
begin to use Java to write stored procedures.          during the next two years, but corporate
                                                       development shops will get started when the
The availability of Java for creation of logic         first products supporting middle tier logic
on all tiers of an enterprise environment will         creation appear during 1998.
give development shops leverage of their
skills that they don't enjoy today. Today,
most shops have at least three groups of

                     The Java Technology Supports Dynamic, Distributed Systems

Java's journey into all tiers of enterprise            that is a contract to perform a given set of
computing will take time because the                   operations on its variables when called upon
technology carries so many new concepts                to do so. This interface hides the class's
with it. Java incorporates the ideas about             implementation, meaning that clients can
modular software components and                        use a class without having knowledge of
distributed systems of the last 10 years. Java         how that class is implemented. Strong
anticipates systems and applications based             interfaces promote what Meilir Page-Jones
on software components distributed across              called low coupling, or interdependence of
networks working in constantly changing                classes (The Practical Guide to Structured
relationships.                                         Systems Design, Prentice-Hall Inc., 1988).
                                                       Systems with low coupling will operate
These concepts are evident in the Java                 more efficiently and promote reuse to a
language itself. The Java language is based            greater extent than systems with highly
on objects and interfaces, classes and                 interdependent classes or modules.
inheritance, and incorporates memory
management features to support dynamic,                Classes and Inheritance. A Java class is a
object-oriented systems. (See Figure 2.)               template for instances created by
                                                       applications to perform work. The class
Objects and Interfaces. The core structure             definition lays out the variables and methods
in the Java language is the object, which              all instances of that class will have. In
encapsulates data, or variables, and methods,          addition, Java allows developers to create a
or procedures that perform operations on or            new (child) class by inheriting the definition
with that data. Java objects are called                of one other (parent) class, and adding either
classes. A class has a well-defined interface          methods or variables to the parent class's

         1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
Java in the Enterprise                                                                                                         7

definition. The result is consistency and                            Java language has several features that make
productivity.                                                        dynamic, distributed object systems more

Dynamic Object System Features. The

                             Language Comparison
                                                                 Java                   C++                   Basic
              Root Syntax                                           C++                       C                 Basic

              Root Paradigm                                    Distributed                Object              Events &
                                                                objects                   hybrid             procedures
              Interpreted or compiled                             Both                                          Both
                                                               supported                Compiled             supported
              Memory management                                Automatic                 Manual              Automatic
              Inheritance                                         Single                 Single &                None
              Multithreading syntax                                 Yes                      No                   No

              Distribution syntax                                   Yes                      No                   No

              Dynamic class loading                                 Yes                      No                   No

                                                                                               Source: Upstream Consulting

Figure 2: Language Comparison. The Java language is designed to support distributed dynamic object systems. The language's
heritage shows in this comparison with the C++ language and Microsoft's Visual Basic language. The roots of each of these languages are
also important to understand. Java was designed originally for interactive television systems, and then adapted to the World Wide Web.
C++ is an object-oriented extension of the C language, and used primarily for systems programming. Visual Basic was designed to ease
the creation of forms-based Windows desktop applications, and has been extended to address network resources. Each language has its
primary purpose, and is most valuable when used for that purpose.

practical to build than they have been using                                  classes that have outlived their
C++ and other languages. The central                                          usefulness. The result is improved
problem in distributed systems is that the                                    reliability.
development team doesn't control all of the
system resources (memory, etc.), and may                                     Second, the Java language's checks
not control all of the classes used in a given                                classes for type consistency both
application.                                                                  when generating bytecodes and
                                                                              during execution. The result is that
       First, developers don't have to                                       developers are less likely to use two
        program their own memory                                              classes together inappropriately.
        management scheme; Java's garbage
        collector keeps track of object                                      Third, the Java language does not
        references and reclaims memory from                                   incorporate pointers, which cuts the

           1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
Java in the Enterprise                                                                                    8

      number of unresolved references                       be made of many Java classes, wrapped
      developers can create.                                up inside a higher-level structure,
                                                            accessible through an object-oriented
     Fourth, the Java language allows                      interface.
      developers to load classes into a
      running system on the fly, allowing              2. Developers can customize Java Beans
      dynamic changes to existing systems.                without having access to their source
                                                          code; the same is not true of Java
As Figure 2 shows, Java's features are not                classes. The developer of a Java
available in other languages. The figure                  component designs properties that users
compares Java to C++ and Visual Basic, two                can manipulate to modify the behavior
popular languages.                                        of the component. In the discounting
                                                          component, for example, the discount
The Java technology also includes a                       rates that apply to particular products
component model that extends its benefits in              might be exposed as a property.
the enterprise. Java components that run on
clients are called JavaBeans, and are exactly          3. The Enterprise Java Beans APIs expose
like Microsoft's ActiveX Controls. Server-                information about platform requirements
side Java components are called Enterprise                and usage policies, to ensure
Java Beans.                                               interoperability and portability. Java
                                                          classes don't expose this information.
Java Beans (components) are different from
Java objects (classes) in three primary ways.          Java Beans are analogous to the standard
                                                       mechanical parts used long ago to reduce the
1. JavaBeans are a way to package Java                 cost and raise the reliability of manufactured
   software, while classes are a way to                goods. Like standard mechanical parts, Java
   build software. A Java Bean will usually

                  Components and Interfaces
                                                Get        Set                     Services
          Discount                              Rate       Rate

            Get Rate                                                Calculate
            Set Rate                                                Discount
                                                 Discount ID
       Calculate Discount                       Discount Rate
                                                Discount Info
           Get Policy                Set                            Get Policy
         Set Program ID
         Get Program ID                        Get
         Methods                                                                      Variables

                                                                            Source: Upstream Consulting

         1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
Java in the Enterprise                                                                                               9

Figure 3: Components and Interfaces. The illustration describes the variables and the methods of a component that calculates
discounts. The interface, made from the methods of the component, is shown at the right of the illustration.

components have interfaces, and these                                   link components only in semantically
interfaces make it possible to use the                                  consistent ways, eliminating many bugs.
components in a number of different                                     (For instance, the discounting component is
applications. Take, for example, a Java                                 irrelevant to a component that manages
component that calculates the discounts,                                personnel records.) The Java Beans
based on the company's policies. An order-                              architecture, thus, promotes low coupling
processing client would call upon the                                   and high cohesion in software designs. This
discounting component to calculate the                                  makes it practical for skilled programmers to
discount available to a customer for a given                            build components for use by business
order. A marketing client would call upon                               domain experts.
the discounting component to help in
creating new promotional programs. A                                    JavaBeans allows development shops to
production planning client would call upon                              reduce costs in three ways. First, JavaBeans
the discounting component to help forecast                              designed for reuse will cut the amount of
demand. (See Figure 3.)                                                 code that developers must write to build an
                                                                        application. Visualize a Java enterprise
The discounting component addresses a                                   component as an engine that performs work
single set of closely related tasks, rather than                        when called upon to do so. The engine can
a collection of diverse tasks. Page-Jones                               be used and reused to build a number of
calls this characteristic of software modules                           applications, eliminating the need for each
cohesion (in this case, functional cohesion).                           project team to build the equivalent
Strong cohesion between Java Beans                                      functionality. Customization of components
promotes low coupling, contributing to                                  using properties will make components
efficient design and strong reuse. Good                                 useful in a number of applications.
cohesion also ensures that developers will

           1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
        How JavaBeans Aid Maintenance

                                Order                     New                      New
                                 V2                      Engine                  Discount

                                Order                   Pricing

                             Execution Environment
                                                                                  Source: Upstream Consulting

Figure 4: Dynamic Components Aid Maintenance. The figure shows the three primary ways that JavaBeans can
reduce the cost and complexity of maintenance. 1. A developer installs a new version of an existing component to expand the
order management functions. The execution environment allows both versions to run if required to support applications
dependent on the first version of the order component. 2. A developer installs a new, faster implementation of the pricing
component. The interface to the component remains the same. 3. A developer adds a new discount-calculating component to the

 Second, JavaBeans will reduce the need for                          components on the fly supports this
 expensive skilled programmers to build                              approach, but JavaBeans make it practical.
 some applications. Developers will be given
 a palette of components, and simple                                 Java's dynamic processing model is well
 scripting tools to link together components                         suited to this vision of distributed
 to obtain the desired behavior. This                                applications. Java allows classes and
 technique will be applicable to both user                           components to be loaded on the fly in
 interfaces and to server-side functions.                            response to requests. Java applets, which are
 Enterprise Java Beans will help to deliver                          dynamically downloaded clients, were the
 this vision by providing conventions for                            first manifestation of this design. However,
 server-side components from many vendors.                           the same principle will allow developers to
                                                                     design Java servers that select from a range
 Third, Java Beans will reduce the costs of                          of functions and behaviors to respond to
 changing applications to meet new business                          requests for service. In enterprise Java,
 requirements. Today, much of the business                           requests, responses, and components can be
 logic in an application runs on the client.                         put in motion as needed to support the user
 Developers must update and recompile all                            requirements.
 clients to make changes to the business
 logic. By concentrating business logic on                           For example, a client request for information
 servers, developers can reduce the cost and                         about the affect of recent discount policies
 complexity of making these changes. (See                            on sales might cause a special analysis tool
 Figure 4.) Java's ability to load classes and                       to be returned to that user, along with links

  Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 Ph: 510-596-0660 Fx: 510-596-0661
Java in the Enterprise                                                                            11

to the discount component to obtain the               discount data for trends and indicators. No
most recent status information. The user              other language supports behavior this
would then have the option to explore the             dynamic and responsive.

                           Platform Requirements for Java in the Enterprise

The emergence and evolution of Java                   for Java applications in the enterprise during
platforms incorporating these services will           the next several years. The Java platforms
be a crucial indicator of Java's readiness for        from Sun, IBM, Oracle, and Netscape are
many enterprises. Since Java burst on the             likely to be similar as a consequence of the
scene in 1995, much has been made about               cooperative work by these companies.
its readiness for use in enterprise                   However, IBM, Oracle, Sun, and Netscape
applications. Most of the discussion has              won't provide exactly the same platforms for
concerned the language itself. However,               Java applications. Microsoft will promote
without Java platforms, Java was impractical          Windows as a platform for Java
for all but the most skilled, most                    applications. BEA Systems, Persistence
adventuresome enterprises. Until 1998, Java           Software, WebLogic, Novera,
platforms were incomplete and immature.               NetDynamics, and many others will also
Sun's new Enterprise JavaBeans                        participate in this market with still different
specification provides the catalyst to remove         ideas about the functions that a Java
this limitation.                                      platform should offer.

The Java technology encompasses both a                The need for vendors to compete will
programming language for creating                     promote diversity in Java application
application code and a platform upon which            platforms. Given this expected diversity,
to run that code. The split between the Java          developers will face two questions:
language and the Java platforms is the
source of great and unnecessary confusion             1. What are the best Java platforms for my
about Java. There will be many platforms                 applications?

      Enterprise JavaBeans Essentials

                         EJB Container
    View of
                                                           Java Server
                                Bean                                    Server Provides
                               Content                                  Process & thread
                                                                        Network Services
                            Use         Env.                            Resource Management
                          Rules        Rules                            Application services:
                                                                         Transaction
                                                                         SQL operations
                                                                         ERP access
                         Container Provides                              Work routing
                       Life cycle services
                       Security                                          Rules processing
                       Transaction Coordination                          Security
         1998 UpstreamNaming Context Harlan St. Suite #110 Emeryville,  Others 510-596-0660
                        Consulting 4053
                       State management
                                                                        CA 94608
Upstream Consulting
Java in the Enterprise                                                                                                           12

Figure 5: Enterprise Java Beans Life Essentials. EJB breaks the server environment into three parts. First, the
Java Server (the dark gray box) provides runtime and application services, including the context for each EJB. Second, the EJB
Container provides component life cycle services, security, and transaction management, primarily. Third, the EJB itself
provides application "content," or functionality. Note that each EJB's use policies and environment requirements are stored in
externally accessible structures to improve interoperability and portability.

2. How can I ensure that Java code built to                                    an application service is not an issue
   run on one platform will be                                                 to developers. EJB provides uniform
   interoperable with code running on a                                        access and interoperability.
   different platform?
                                                                              operational management services,
Sun's recently released Enterprise JavaBeans                                   which are required to monitor,
APIs will help to answer both of these                                         control, and optimize running
questions. First, EJB defines a minimum                                        environments.
function set for Java platforms. Figure 5
shows the platform services that EJB                                          component management services,
requires. Enterprise Java Beans separates                                      including installation, version
platform services into two categories: Those                                   management, and optimization for
provided by the server and those provided                                      performance and scalability.
by the container for a Java Bean. The Java
Platform, as specified in EJB, looks a lot                            EJBs are components designed to make
like a transaction monitor, providing the                             databases, transaction monitors, and other
following services to Java Beans:                                     system services accessible to developers
                                                                      with varying levels of skill -- not just to
       process and thread dispatching and                            skilled Java programmers. Components are
        scheduling, which are required to                             ideally suited to visual development tools,
        execute a JavaBean's operations,                              and EJBs will be no exception.

       resource management, which is                                 The EJB APIs separate the creation of
        required for reliability and scalability,                     component content from the platform
                                                                      services required to support components,
       naming and directory services, which                          stripping away a great deal of systems
        are required for location independent                         programming that otherwise would be
        service invocations,                                          required. Java platforms will automate the
                                                                      low-level system details, freeing application
       network transport services,                                   developers to call the services needed to
                                                                      accomplish their business purpose.
       application services, including
        transaction management, object                                EJBs will also foster interoperability
        storage and retrieval, rules                                  between different systems. The rich range of
        processing, security services, and                            Java platforms available ensures that most
        access to databases and enterprise                            corporations will install more than one
        applications. These services may or                           platform to support their applications. The
        may not be written in Java. In many                           EJB interfaces will provide a single set of
        cases during the next three years, the                        programming semantics and messaging
        application services for enterprise                           conventions to link these diverse systems.
        applications will be built in C++ and                         Indeed, by wrapping non-Java systems to
        made accessible through Java.                                 look like EJBs, organizations can include
        However, many of these services will                          their legacy systems in their Java enterprise
        eventually be written in Java as well.                        frameworks, as well.
        One of the primary benefits of EJB is
        that the implementation language for

           1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
Java in the Enterprise                                                                            13

Microsoft is pursuing exactly the same goals           (MTS) and Microsoft Message Queues (MS
for Java as Sun (and the same profile of               MQ). Microsoft has begun to expose DNA
services) with its Distributed Network                 through Java APIs. The trend reinforces the
Architecture (DNA). DNA is based on 32-                conclusion that one way or another, the
bit Windows APIs and application services              vision of distributed components for
including the Microsoft Transaction Server             enterprise Java will come to pass.

                         Tools Requirements for Java in the Enterprise

Java has also been impractical for most                data-integration options to the picture,
enterprise development until now because               including the automatic synchronization of
the available development tools fell short.            Java objects with relational tables. Several
Symantec's Café, Microsoft's Visual J++,               vendors implement mapping today,
and other early tools were aimed at creating           including Persistence Software with its
applets to run inside browsers. These tools            PowerTier EJB, Sun with its Java Blend
provided few of the features that enterprise           technology, and Thought Inc. (CocoBase).
developers needed to build complete                    Oracle and IBM will also offer Java-to-
applications; features such as database                relational mapping approaches.
access, code partitioning, and source code
management. In addition, the first tools were          However, the tools also must evolve to
adaptations of products used to build                  support the unique requirements of the
client/server applications. This, too, is              distributed applications Java supports. When
changing, as vendors begin to address the              Java burst onto the scene, the two biggest
highly distributed and modular nature of               categories of programming tools were
Java applications.                                     client/server products (such as
                                                       PowerBuilder) and developer workbenches
To be fair, the tools vendors had to wait for          (such as Microsoft's Visual C++).
Sun and its Java allies to complete several            Client/server tools are used to build form-
key pieces of Java platform technologies.              based user interfaces and bind them to
The most important of these was the Java               databases. Workbenches are used to write all
Database Connectivity (JDBC) API, which                manner of code, much of it quite complex.
gave developers a way to read and write
records stored in relational databases. With           Java tools for the enterprise will follow
JDBC completed, tools vendors pushed                   these basic product profiles, but add several
ahead creating graphical tools that make               additional features. These include the
interaction with databases straightforward.            following.
Enterprise Java Beans will add still other

         1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
        Ideal Java Development Environment

                                                                                         Source: Upstream Consulting

Figure 6: Ideal Java Development Environment. The ideal Java development environment for the enterprise will
build on basic Java programming with graphical development and assembly tools, testing and deployment features, and
component management facilities. In addition, in this emerging field, no vendor has a monopoly on good ideas. Tools vendors
with extension APIs and partnership programs will ensure that developers will have the ability to employ third party products in
conjunction with their development environment of choice. Third party tools will contribute in modeling, component reuse, and
other disciplines.

Performance and Optimization. Java                                      the form of components. During the next 18
performance is complex because of the                                   months, most of the emphasis in Java tools
language's roots in interpreted systems. The                            will be on products that help programmers
Java Virtual Machine interpreter gives the                              build components. However, in the long run,
language its tremendous flexibility, but is                             tools that allow business analysts, systems
also slower by nature than compiled code.                               analysts, Web developers, and even skilled
Tools vendors have to rise to the challenge                             end users to assemble components to create
of making Java fast as well as flexible.                                applications will be just as important. There
Dynamic, or just-in-time, compilers such as                             are many more professionals capable of
those of Symantec that compile Java byte                                assembling business applications by linking
codes on the fly have proven an effective                               and scripting the behavior of prebuilt
technique for speeding Java performance.                                components than there are skilled
Native code compilers and optimizing                                    programmers capable of building
techniques will also play a big role in server-                         components. Only by moving to component
side Java, as developers seek to squeeze the                            assembly will organizations be able to meet
last nanosecond of speed from their code. In                            their escalating demands for new software.
addition, profilers and other utilities that                            (Figure 10 shows the division of labor made
help developers design fast code, will be                               possible by component software.)
                                                                        If the goal of component development and
Component Development. Java tools must                                  assembly is to be realized, organizations will
allow developers to deliver applications in                             need Java tools that help coordinate

  Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 Ph: 510-596-0660 Fx: 510-596-0661
Java in the Enterprise                                                                              15

component creation across separate                     Deployment frameworks automate the
developers or teams of developers with                 organization and installation of collections
source code and component repositories.                of components, and then help the developers
Experience indicates that components built             change those systems over time without
in isolation are difficult to lash together to         breaking existing applications.
create new applications. Also, organizations
will increasingly be able to buy software              Operational Management. Distributed
components such as the discounting server              applications have always been riskier than
discussed earlier on the open market.                  centralized applications because they have
Component software will have a big effect              more potential points of failure and because
on developer productivity and software costs           failures are difficult to fix. Java applications
if organizations can reuse components in               will be no exception. To mitigate these risks,
more than one application, whether those               development tools must make it possible for
components were built by internal staff or             developers to generate code that is
purchased from a vendor.                               "instrumented" for operational management.
                                                       Instrumented code can be monitored and
The heart of component management and                  even controlled by external management
reuse is repository technology. Repositories           agents, which is a requirement in enterprise
store the critical information about the               systems. The previously discussed
designs, interfaces, and uses of components.           repository technology will provide an
This is the crucial information required to            essential foundation for these functions.
support component reuse.                               Operational management tools will rely on
                                                       repositories for basic information about
Distributed Debugging. Enterprise Java                 components, as well as readings on their
applications will demand distributed                   status.
debugging to account for their heavy use of
networks. Distributed debugging will allow             The first Java development tools were
developers to test and debug their                     primarily designed to allow text coding and
applications in either simulated or live               basic debugging. However, enterprise Java
conditions. The debugger must give the                 developers won't be able to live by coding
developer fine control over the scope of               tools alone. The ideal Java tool for the
debugging and provide features like                    enterprise will provide a Java development
breakpoints and augmented identification of            environment, but also graphical tools to
errors.                                                raise productivity, testing and deployment
                                                       tools, and component management features.
Java provides the basic technical features for         The ideal tool will also be open, via
dynamic systems. However, tools vendors                extension APIs and partnerships with
will have to build deployment frameworks               vendors of complementary tools. (See
that make dynamic systems practical.                   Figure 6.).

                          Java Performance in Enterprise Applications

Much has been written about the                        clearer. Java performance will be
performance (or lack thereof) of Java                  determined by several factors, including but
applets, but these analyses do not indicate            not limited to them the efficiency of Java
how well Java will perform in the database             Virtual Machines and compilers. Indeed,
applications used by enterprises. As the               performance will often be a function of the
pioneering enterprise Java developers report           developer's application design. The
their findings, the picture of Java                    performance of Java applications will be
performance in the enterprise is becoming              determined by five factors

         1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
                    Interpretive vs. Compiled Code
Figure 7: Compiled vs. Interpreted Code. A key determinant of performance in Java applications is the use of interpreted code.

                                                                                                 Source: Upstream Consulting

Interpreted code runs more slowly than compiled code, but it is much more flexible and portable than compiled code. Developers must
manage this tradeoff to build fast applications. Fortunately, dynamic compilers ease the tradeoff by preserving most of the flexibility of
interpreted code while improving execution speeds to equal compiled code.

Factor #1: Inefficient Designs and                                       simultaneously, improving throughput.
Implementations. First, no language                                      However, developers must carefully test
ensures that developers will design and write                            multithreaded code to detect and eliminate
fast performing application code, and Java is                            locking deadlocks, which will kill an
no exception. Developers can write slow                                  application performance.
Java code just as easily as they can write
plodding C++ code. A common problem is                                   Factor #3: Tradeoff Between Interpreted
dead code, or functions that run but are                                 and Compiled Java. Java performance will
never used in an application. Dead code                                  be a function of how the developer manages
slows overall performance. In addition, Java                             the choice between the flexibility of
applications can be slowed by overuse of                                 interpreted code and the speed of compiled
network and disk input-output operations.                                code. A completely interpreted application
                                                                         will pose performance challenges. A
Factor #2: Multithreading. Java's integral                               completely compiled application will
multithreading can improve performance.                                  sacrifice the complete flexibility of Java's
Multithreaded code will allow developers to                              dynamic
accomplish more than one task

  Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 Ph: 510-596-0660 Fx: 510-596-0661
                          Performance: Java vs. C++

Figure 8: Performance of Java vs. Performance of C++. NC World's tests of Java and C++ illuminate the real
differences between Java and C++ performance by comparing not only compiled C++ to interpreted Java, but also compiled
C++ to dynamically compiled Java (Java/JIT). The authors of the tests pronounced dynamically compiled Java and compiled
C++ equal or equivalent on most operations.

processing model. Ultimately, most                                  Java byte codes as needed to speed
enterprise applications will employ both                            performance. A recent set of tests published
compiled Java and interpreted Java. (See                            in NC World showed that Java with a just-
Figure 7.)                                                          in-time compiler ran as fast as compiled
                                                                    C++ on most of a series of operations. In the
The need to manage the divide between                               one dynamic operation tested (virtual
interpreted and compiled code in Java has                           member method call with runtime type
given rise to a variety of new compilers and                        identification), Java with a JIT was much
other optimizing utilities. Dynamic, or "just-                      faster than C++. In these tests, interpreted
in-time," compilers have allowed Java                               Java was three times or more slow than
programmers to make great strides toward                            C++. (See Figure 8.) The tests employed
eliminating the distinction between                                 Symantec's JIT compiler.
interpreted and compiled code by compiling

  Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 Ph: 510-596-0660 Fx: 510-596-0661
Java in the Enterprise                                                                            18

Factor #4: Java Automatic Memory                       difference was 0.7 seconds, a price most
Management. The overhead of Java's                     developers with C++ experience are willing
automatic memory management, also known                to pay to eliminate dreaded memory leaks.
as "garbage collection," will inevitably slow
performance. NC World gauged the impact                Factor #5: Java Virtual Machine
on performance of garbage collection by                Performance. The performance of the
allocating and freeing 10 million 32-bit               JVMs themselves is a prime determinant of
integers first in C++ and then in Java. The            an application's speed. The newest JVMs are
operations required twice as much time in              much faster than the first JVMs available.
Java as in C++ during the test. The                    These improvements will continue.

                            The Impact of EJB and Internet Standards

Enterprise Java Beans is the latest in a series        Java applications. Oracle's Java
of Java standards that are both far ranging            implementations will add proprietary
and diverse. Sun Microsystems, from Java's             content to achieve this goal. IBM and BEA
beginnings, has tried to design standards for          Systems are battling over transactional
Java development that will ensure the                  systems and middleware for Java, and each
absolute portability of Java code. Sun has             will create extensions to the EJB standards
created these standards with the cooperation           to showcase its distinctive product features.
and support of IBM, Oracle, Symantec,                  And so on. (See Figure 9.)
Netscape, Sybase, BEA Systems, and many
other companies.                                       The result of industry competition has been
                                                       and will be variations on Sun's Java
Understandably, Sun and its partners have              standards that compromise portability. The
expended a great deal of effort seeking to             question is: Must Java be absolutely portable
keep the promise that Java code written once           for the technology to succeed? The answer
will run anywhere even as the Java                     is, "No." There are two reasons. First, Java
technology changes and expands. As the                 may never be absolutely portable, but it is
range of standards for Java systems grows,             and will be highly portable. In addition, Java
absolute portability becomes difficult to              technology implementations will be highly
maintain, and will require creativity and              interoperable. Object-oriented interfaces are
single-mindedness of Sun. These difficulties           at the core of the Java technology, and this
will be compounded by divergence in                    foundation will make possible the
HTML and other World Wide Web                          interworking of different Java technology
standards that are an essential part of many           implementations. In enterprise systems,
Java applications.                                     interoperability (interworking) between the
                                                       products of different vendors and among
The primary reason for this state of affairs is        different applications is more important than
natural industry competition. Java                     code portability. Every major survey of
technology is evolving toward the vision of            corporate IT requirements highlights the
dynamic cooperating components. However,               need to weave disparate systems and
a variety of vendors have different ideas              applications together to integrate business
about how this vision should be                        functions for market efficiency and
implemented. The competitive battles over              effectiveness. The Java technology is in the
systems architecture between Sun and                   right place at the right time in this regard.
Microsoft are the tip of the iceberg. In
addition, Oracle is fighting to maintain a
central position for its database servers in

         1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
                       Emerging Java Domains

Upstream Consulting

Figure 9: Emerging Vendor Java Domains. IBM, Sun, and Microsoft are creating their own Java platforms and
interfaces, each of which will be different enough to impede absolute portability of application code. The figure shows at the
bottom the major product categories that compose a complete system architecture. IBM and Microsoft have complete coverage
of these categories today, and will use Java to enhance their respective market positions. Sun lacks only a DBMS and
applications. At the right of the figure are the major computing platforms. IBM has coverage of its own platforms, of Windows
NT, and Sun's Java Platform. Sun covers Solaris and the Java Platform. Microsoft covers Windows only. This picture is the
inevitable result of competition. However, Java's object-oriented features will ensure strong interoperability, which is more
important in enterprise systems than pure portability.

The historical analog for Java is the SQL                              Second, standards like EJB will help bring
language. All relational database vendors                              into focus crucial middle tier platform
add proprietary extensions to standard SQL.                            technology that today is in a state of
However, developers can achieve a high                                 anarchy. Developers have a wide variety of
degree of portability by avoiding those                                middleware and application server
extensions. Certainly, SQL is much more                                technologies and products to choose from
portable than the proprietary data definition                          today, many from small companies that
and manipulation languages that preceded it.                           enterprise user view as being more risky
In addition, developers have strong                                    than IBM, Oracle, Microsoft, BEA and other
mechanisms now to integrate their                                      established vendors. EJB, JDBC, and related
application code with various SQL                                      enterprise standards will provide a common
databases.                                                             set of architectural concepts for the industry
                                                                       to rally around, just as SQL did during the
                                                                       early 1980s. The result during SQL's

  Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 Ph: 510-596-0660 Fx: 510-596-0661
Java in the Enterprise                                                                            20

evolution during the '80s was to provide a             client/server tools shielded developers from
dominant architecture for data management              differences between SQL implementations,
accessible to clients. The result with the Java        enterprise Java development environments
technology will be to provide a dominant               will make it possible for developers to target
architecture for distributed application logic         different Java server platforms with a single
and services.                                          source code base or even the same
Vendors of enterprise Java tools will play a
pivotal role in the maturation of these
standards. In the same way that the first

                             Organizational and Skills Prerequisites

Like any other information technology, Java                   Java's multithreading features
alone won't guarantee a successful                            incorrectly, they can create
application. Most development                                 performance and quality problems.
organizations must learn new skills and
adopt new procedures to get the most benefit                 Java is an inherently distributed
from the technology.                                          language. Java Remote Method
                                                              Invocation (RMI) allows developers
Successful Java development requires three                    to invoke methods or call services
design skills in three areas: object-oriented                 across network links. However,
code, multithreaded code, and distributed                     network traversal exacts a price in
programs.                                                     performance and reliability. "Chatty"
                                                              code that makes frequent calls across
     Java is an object-oriented language,                    a network will be slower and more
      employing classes, methods, and                         prone to errors than code that makes
      inheritance. To gain the full benefit of                sparing use of network links.
      the language, most development
      teams must learn the essentials of               As development environments and platforms
      object-oriented design and                       mature, object-oriented and "thread-safe"
      programming. One of the goals of                 designs will become easier. Tools vendors
      object-oriented design embraced by               will provide visual development aids to hide
      Java is creation of reusable designs             the details of object-oriented and threaded
      and code. Designing reusable code                development, and platform vendors will
      requires practice and discipline,                help, too. However, it will pay to have the
      values that were lost during the                 basic skills on your development team.
      client/server era. Java makes it
      difficult to design code using                   Appropriate development procedures and
      procedural techniques, but it is still           organizations are related to skills. The early
      possible to do so. Early users of Java           users of Java have found that the technology
      for server-side code report that the             is well suited to a modular approach to
      discipline of object design is essential         development. The most expert developers
      for fast, robust applications.                   can create software components that less-
                                                       skilled professionals can then "wire
     Java is also a multithreaded language.           together" to build applications. The
      Threading is an important aid to Java            discounting component that was cited earlier
      performance on the server. However,              in this paper is an example. The developer
      most development shops have little               that builds the component can expose key
      experience in designing multithreaded            "properties," or parameters governing its
      code. They find that if developers use           use. The rate of discount to be applied to a

         1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
Java in the Enterprise                                                                                                       21

given operation might be one. By exposing                             a component without having access to that
this property, the developer makes it                                 component's source code. This characteristic
possible to modify the discount rates to meet                         of Java components makes it possible for the
new needs through a simple form, called a                             source code of an application to evolve
                                                                      independently of the customization and
property sheet.                                                       configuration of that source code. The result
Furthermore, the developer of Java
components can make it possible to modify

                           Java Component Hierarchy

                                                                             Source: Upstream Consulting

Figure 10: Java Component Hierarchy. Java, with its component interfaces, allows development organizations to
specialize, putting programmers to work building a hierarchy of software modules from which applications can then be made.
Applications require many levels of components, ranging from those that provide access to database operations, messaging
and other systems facilities to those that govern a user interface. The figure describes one scheme for organizing this
specialization. A small number of systems programmers build core systems components. Systems and business analysts
create components that perform business domain functions, and skilled users employ scripting to assemble and tailor these
components to particular application needs.

will be a big win for maintenance. Every                              The Java component interfaces ensure that
time an organization installs a new version                           Java and scripting languages will be
of an application, it will not have to                                complementary. Java is best for building
reimplement all of its customization code for                         rigorous programmatic structures, while
that application. Rather, the externally                              scripts are best for building simple structures
managed properties will be applied to the                             and for wiring together components using
new source code (provided the interfaces                              their exposed properties.
remain stable).

           1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660
Java in the Enterprise                                                                            22

The modularity that Java encourages                           components to accomplish their
specialization within development                             business tasks.
organizations. (See Figure 10.)
                                                       The component hierarchy scheme requires
     Systems programmers create core                  disciplined development practices.
      components, which provide access to              Component design methods that build in
      database services, transaction                   feedback from users are essential. The
      management, messaging, and other                 scheme assumes that development and
      system-level services.                           deployment are separated. However, open
                                                       communication between development and
     Systems and business analysts build              deployment staffs is essential. In addition,
      "domain" components, which provide               testing must become comprehensive and
      the services required for business               inimical to development. During its
      applications. The discounting                    pioneering work on component systems
      example used earlier is an example of            during the early '90s, Andersen Consulting
      a domain component. Domain                       found that to create broadly useful
      components will often call upon the              components, developers had to test their
      services of core components to                   work against 40 different use cases.
      complete their work.                             Andersen's goals were more ambitious than
                                                       those of corporate development shops, but
     Skilled, or power, users employ                  the company's experience proved that
      scripts and property sheets to provide           successful component design requires a
      the critical last 20% of customization           culture of testing and continual
      required to use core and domain                  improvement.

                                              Next Steps

Most corporate development shops have                  Some organizations have the experience to
begun the move from so-called two-tier                 put Java to work building substantial
client/server systems to more aggressive               distributed applications right now. However,
distributed designs. There are and will be             most should move more slowly, starting by
many struggles in this evolution, as                   assessing their skills and architectures,
organizations seek a balance between their             launching pilots that use Java to extend
existing skills and systems and the                    internal Web sites, and then applying what
promising new business opportunities                   they learn to make more aggressive use of
afforded by the Internet. One way or                   the technology. Mastery comes with
another, Java will be a foundation of these            experience and experience with Java should
new systems.                                           start now.

         1998 Upstream Consulting 4053 Harlan St. Suite #110 Emeryville, CA 94608 510-596-0660

Shared By: