To EJB or not to EJB

Discussion in 'Java' started by Jeremy Haile, Sep 3, 2003.

  1. Jeremy Haile

    Jeremy Haile Guest

    I have worked on a variety of web-based software projects and typically
    employ a combination of JSP, Servlets, Struts, Postgresql, etc. However, I
    am about to start on a project that needs to potentially scale to the size
    of a large e-commerce site. In the past, I have always written database
    interface classes that use straight SQL (via JDBC) to extract objects from a
    database. However, due to the scalability issues involved in a large
    e-commerce site, I am considering using EJBs.

    Does anyone have any comments or suggestions on the use of EJBs, especially
    in regards to large e-commerce sites? Can anyone point me to a good
    resource for designing an e-commerce-like site using J2EE?

    Thanks,
    Jeremy Haile
     
    Jeremy Haile, Sep 3, 2003
    #1
    1. Advertising

  2. Jeremy Haile

    Kevin Hooke Guest

    The book "Mastering Enterprise JavaBeans 2nd ed" published by Wiley has a
    couple of good chapters on EJB best practices and issues to consider when
    starting an EJB based project.

    You could also read around on the www.theserverside.com site for good
    practices, and read through some of the J2EE design patterns and usage
    discussions they have there.

    Theres also a few other books that may be worth taking a look at that cover
    J2EE Design Patterns - "Core J2EE Patterns" published by Prentice Hall is a
    good one, and there are others.

    Hope that gives you some info to start with,

    --
    Kevin Hooke
    MindBeans Software Consulting
    http://www.mindbeans.net


    "Jeremy Haile" <> wrote in message
    news:bj387d$9it$...
    > I have worked on a variety of web-based software projects and typically
    > employ a combination of JSP, Servlets, Struts, Postgresql, etc. However,

    I
    > am about to start on a project that needs to potentially scale to the size
    > of a large e-commerce site. In the past, I have always written database
    > interface classes that use straight SQL (via JDBC) to extract objects from

    a
    > database. However, due to the scalability issues involved in a large
    > e-commerce site, I am considering using EJBs.
    >
    > Does anyone have any comments or suggestions on the use of EJBs,

    especially
    > in regards to large e-commerce sites? Can anyone point me to a good
    > resource for designing an e-commerce-like site using J2EE?
    >
    > Thanks,
    > Jeremy Haile
    >
    >
    >
     
    Kevin Hooke, Sep 3, 2003
    #2
    1. Advertising

  3. Jeremy Haile

    Joe Guest

    In article <bj387d$9it$>, says...
    > I have worked on a variety of web-based software projects and typically
    > employ a combination of JSP, Servlets, Struts, Postgresql, etc. However, I
    > am about to start on a project that needs to potentially scale to the size
    > of a large e-commerce site. In the past, I have always written database
    > interface classes that use straight SQL (via JDBC) to extract objects from a
    > database. However, due to the scalability issues involved in a large
    > e-commerce site, I am considering using EJBs.
    >
    > Does anyone have any comments or suggestions on the use of EJBs, especially
    > in regards to large e-commerce sites? Can anyone point me to a good
    > resource for designing an e-commerce-like site using J2EE?
    >



    There is an O'Reilly book, "Building Java Enterprise Applications" that I
    feel is outstanding.
     
    Joe, Sep 3, 2003
    #3
  4. Jeremy Haile

    Roedy Green Guest

    On Wed, 3 Sep 2003 10:15:17 -0700, Joe <> wrote or
    quoted :

    >There is an O'Reilly book, "Building Java Enterprise Applications" that I
    >feel is outstanding.


    Here are several books with similar titles:

    J2EE(tm) Technology in Practice: Building Business Applications with
    the Java(tm) 2 Platform, Enterprise Edition
    by R. G. G. Cattell, et al (Paperback)

    Building Java Enterprise Applications, Vol. 1: Architecture (O'Reilly
    Java)
    by Brett McLaughlin (Paperback - March 2002)

    Building Java Enterprise Applications Vol. II: Web Applications
    by Brett McLaughlin, Robert Eckstein (Paperback)

    Enterprise Java 2 Security: Building Secure and Robust J2EE
    Applications
    by Marco Pistoia, et al (Paperback)

    Which is the one you recommend?

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Sep 3, 2003
    #4
  5. Jeremy Haile

    Joe Guest

    In article <>,
    says...
    > On Wed, 3 Sep 2003 10:15:17 -0700, Joe <> wrote or
    > quoted :
    >
    > >There is an O'Reilly book, "Building Java Enterprise Applications" that I
    > >feel is outstanding.

    >
    > Building Java Enterprise Applications, Vol. 1: Architecture (O'Reilly
    > Java)
    > by Brett McLaughlin (Paperback - March 2002)
    >
    > Which is the one you recommend?
    >





    --

    "The natural progress of things is for liberty to yield and government to
    gain ground"
    -- Thomas Jefferson
     
    Joe, Sep 4, 2003
    #5
  6. On Tue, 02 Sep 2003 19:17:22 -0400, Jeremy Haile wrote:

    > I have worked on a variety of web-based software projects and typically
    > employ a combination of JSP, Servlets, Struts, Postgresql, etc. However, I
    > am about to start on a project that needs to potentially scale to the size
    > of a large e-commerce site. In the past, I have always written database
    > interface classes that use straight SQL (via JDBC) to extract objects from a
    > database. However, due to the scalability issues involved in a large
    > e-commerce site, I am considering using EJBs.
    >
    > Does anyone have any comments or suggestions on the use of EJBs, especially
    > in regards to large e-commerce sites? Can anyone point me to a good
    > resource for designing an e-commerce-like site using J2EE?
    >


    Hi Jeremy-

    J2EE (specifically EJB) is a good enterprise level component architecture
    well suited for high volume e-commerce sites. It offers many benefits
    that make development easier (not simple, but easier) as well as very nice
    cache management (well, certain vendors do). For example ...

    Let's say that you plan on hosting a site that sells goods. There is a
    very hot item that many people are interested in. If you don't use EJB,
    and you don't write some cache management code in your database tier,
    you're going to overwhelm your database with read calls and you'll quickly
    burn up cycles unnecessarily. Writing cache management software is not
    difficult, but it's not trivial. There are several products out there
    that fit into EJB (TopLink comes to mind) that allow you to retrieve the
    hot item once, keep it in memory, and concurrently update it from multiple
    threads (requests). Commits are sent back to the database at appropriate
    times (as decided by the EJB container). The net result is that you have
    a faster overall site (reading from memory is several orders of magnitude
    faster than reading from a disk over the network), and you don't have to
    do much work.

    EJB is also a distributed component architecture, meaning that if
    necessary you could separate your JSP and servlet (presentation tier) onto
    a set of hardware load balanced via a http balancer (F5 and Cisco make
    them). Your front end presentation tier all peers over the network into
    your central core located on a set of clustered J2EE application servers.
    This puts you into a position where you can more intelligent scale your
    application depending upon user load. If you find that your entity
    cluster is struggling with managing connections, throw another server into
    the mix and let J2EE spread the load to another server. Alternatively, if
    you find your presentation tier to be sluggish, you can throw in another
    server tuned for http performance.

    Bottom line - J2EE provides for a lot, and makes it pretty easy to
    accomplish most tasks. If you're going to deploy a high volume site,
    seriously look into it.


    -c


    -c
     
    Christopher Blunck, Sep 10, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve
    Replies:
    1
    Views:
    732
    John C. Bollinger
    Jul 15, 2003
  2. Mumbai Joe
    Replies:
    0
    Views:
    632
    Mumbai Joe
    Jul 29, 2003
  3. Sriv Chakravarthy
    Replies:
    0
    Views:
    836
    Sriv Chakravarthy
    Sep 18, 2003
  4. Mark

    EJB 1PC errors with EJB's

    Mark, Oct 29, 2003, in forum: Java
    Replies:
    0
    Views:
    358
  5. Raymond Schanks
    Replies:
    0
    Views:
    702
    Raymond Schanks
    Aug 3, 2010
Loading...

Share This Page