• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in ePratice Exam Question

 
Rahul Mishra
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,

I came across the following question on ePractice exam [Form 1] and it stumped me..

Your organization is interested in building an application that will allow users to query and read volumes of statistical data for analysis. They anticipate high volumes of traffic and want the most scalable solution. This application will be distributed in a cluster and deployed as an enterprise archive. Components should be designed so that they can be accessed remotely by other Java applications.

What Java EE component type and remote access technology is correct for this architecture?

  • Servlet accessed using HTTP.
  • Message-driven bean accessed using JMS.
  • Stateless session bean accessed using RMI.
  • Stored procedures and DAO's.(Correct Answer as mentioned in the exam)


  • I fail to understand how can a DAO and stored procedure be used remotely by other java applications (as mentioned in the question)...is the answer incorrect? insights please...
     
    Cameron Wallace McKenzie
    author and cow tipper
    Saloon Keeper
    Posts: 4968
    1
    Hibernate Spring Tomcat Server
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I agree. That's a bad answer.

    -Cameron McKenzie
     
    Nikhil Jain
    Ranch Hand
    Posts: 392
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    The correct answer is (c)
     
    Rahul Mishra
    Ranch Hand
    Posts: 211
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    That's what i marked..
     
    peter cooke
    Ranch Hand
    Posts: 317
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    because it is primarily read.
    I would expect a rest based servlet webservice using a DAO to talk to the DB would out perform a SLSB to one or more enties.

    Scaling handled by adding another tomcat server.
     
    Bigwood Liu
    Ranch Hand
    Posts: 240
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Stored procedure might have better performance, but it is part of solution in C, and it is bad on scalability and remote access.

    I prefer C
     
    peter cooke
    Ranch Hand
    Posts: 317
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Bigwood Liu wrote:Stored procedure might have better performance, but it is part of solution in C, and it is bad on scalability and remote access.

    I prefer C


    cool preferece your preference of c

    I just got my cup of coffee and want to debate. so let's debate merrits and problems with solution. I don't mean any offense.

    Performance: (transactions/second)
    Can we both agree that a tomcat webcontainer will out perform a full blown comercial EE containter (weblogics, websphere, oracle app server)? It has been a long time since I used tomcat, but tomcat was only a web container, but may have added on. I also have not used weblogics since 8 but the commericial servers above always started both servlet and ejb container. It is my understanding that when EE6 rolls out that the server can decide what not to launch. So if we use option C- there is no need for the web container. Then why spend the cpu cycles to spin up and maintain the web container when those cycles can be used to handle requests.


    Vertical Scaling:
    remains the same in either case. throw faster cpu's, more memory, faster disk, a seperate ethernet for the servers to communicate to the DB on.

    Horizontal scaling:
    1) adding multiple instances: once again add another tomcat or weblogics container. In my opinion the same thing.

    2) It has been a long time since I read the spec. but containers must appear to be running 1 instance of SLSB's or servlets. They can choose to run multiple copies of SLSB's to handle requests. Ok you may have me on servlets. Servlets there is only 1 instance, SLSB's can spin up multiple instances if the container vendor has implemented that feature, problem it is an optional feature


    Remote Access:
    A http request to a servlet is a remote request by it's nature. I have rarely seen any firewall that blocks port 80. So A servlet webservice provides remote access.

    So the remote issues we are trying to decide is, " which is faster to serialize an object graph. Use a servlet with JSON or XML, OR a SLSB serializing with XML or standard java serialization." If both are serializing with XML it should be equal. If the SLSB is serializing useing "RMI-IIOP" still probably equal to convert to corba format. I would think that serializtion would be faster if serialization was "RMI" only.

    I until you get to 100+ requests a second serializing large graphs. I doubt serialization time would play much of a factor in your decision, and then at that point you should be writing custom serialization objects



    Well I am looking forward to response. Perhapse there is some aspect I have not considered. sleep time
     
    ForLuck Yang
    Greenhorn
    Posts: 10
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    as far as i am concerned, i'd prefer C.
     
    Chaminda Amarasinghe
    Ranch Hand
    Posts: 413
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    I prefer to C. B and A are also bit closer.

    Anyway I can't agree on D

    Thanks
     
    Gopinath Kondapally
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I prefer c too. Nowhere in the question it is mentioned that the client is a web based client and mentioned "enterprise archive" does this mean to use ear?
    Coming to servlets and RMI. My experience says RMI's binary objects will be faster over network than huge HTML text.
    We can make many assumptions about using combination of technologies to solve. But with a bare eye c looks correct .


    D is not the answer for sure. as it says "What Java EE component type and remote access technology is correct for this architecture? "
    Neither Stored procedures nor DAO are enterprise components . DAO is a pattern.

    Please correct me if I am wrong

    Gopi
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic