SlideShare une entreprise Scribd logo
1  sur  32
Virtual Classroom


Integrated Learning
environment over internet

               Anshu Veda
               Prajakta Kalekar
               Shruti Mahambre
The Client
   This project has been sponsored by
    Intel

   IIT B point of contact
    Prof. Umesh Bellur
Problem Definition

 This project aims at putting together an
 integrated e-Learning environment for a
 university student.
 This will also be used by distance education
 programs offered by institutes, in order to enable
 students to avail of the academic facilities from
 any computer connected to the internet.
Basic terminology
   RMI (Remote Method Invocation)
    Server application creates remote objects, makes references to them available and allows clients
     to invoke methods on these remote objects.

   RMI tunneling over HTTP
    Combines the benefits of HTTP tunneling and RMI over internet

   EJB
         Session Beans (verb)
          Model business processes. They represent actions
         Entity Beans (noun)
          Model Business data – They are data object, java objects that cache database
          information

   EJB Container
         House enterprise beans and make them available for clients to invoke remotely
         Provide an environment in which enterprise beans can run
         “Invisible middlemen”
EJB Architecture
Basic Terminology
   CMP – Container Managed Persistence
       EJB container takes care of making sure the
        entity bean object stays around.

   BMP – Bean Managed Persistence
       You as the bean programmer can take over the
        responsibility of managing the "persistence" of
        the data -- of where the data stays when the
        server is not running or when the bean is not
        in memory.
Requirement Specs
   The system will be having 3 roles:
       Instructor
       Student
       Admin
   Admin
       Managing user accounts, course registration approval
   Instructor
       Login,Create / Modify course details, set Quizzes, assign
        grades
   Student
       Login, Register / Unregister for courses, take
        quizzes, view lectures in offline mode
   Non-Functional Requirements
       Open-Source and Freeware
       Support over Internet and Intranet
Technology Decisions
                  Client
   Client         •Integrated Environment



                 Communication Protocol

  Internet       •Cross firewall
                 •Intranet and Internet support


                  Server
                  •Transaction
 Server
                  •Persistence
                  •Security
                  •Caching
Thin v/s Thick Client
Feature   Thin Client              Thick Client

Web         Different Browsers      Gives integrated look
Browser   may require different    and feel. The client
          plug-ins to support      executable, installable
Vs        features such as Video   from web, can bundle all
Java      streaming.               prerequisites.
           Look and feel varies    Java Swing client gives
Client
          from browser to          same look and feel across
          browser.                 all the platforms (as
                                   compared to web
                                   browser).
Speed     Slow. Everything must    Fast. Can instantly scroll
          wait for the server to   since the client can cache
          process and transmit     and process data locally.
          the next screen of
          information.
Initial Architecture Diagram

     Swing Client
                       Specs
                          Client- Swing

                          Servlet Container-
                           Tomcat3.2
        Servlet
                          DB Server-
                           Postgres8.0

   Request Processor




     DB Manager                Database
Pros and Cons
Pros
 Simple
        Simple and Intuitive. Uses HTTP over the internet
         and simple JDBC to communicate with the
         database server.

   Light
        As compared with J2EE server

Cons
 Plain Http protocol – No type safety


   No caching Support

   No Transaction Management Support.

   Absence of Distributed Objects.
WebServices ???
   RMI offers an order of magnitude better
    performance than other alternatives, being at
    least 8.5 times faster than Web Services

   HTTP-to-servlet is more than 4 times slower than
    web services.


   Reference: “Java RMI, RMI Tunneling and Web
    Services Comparison and Performance Analysis” - Matjaz
    B. Juric, Bostjan Kezmah, Marjan Hericko, Ivan Rozman,
    Ivan Vezocnik
Why EJBs?
   Container inherently provides
    features such as
     Security

     Transaction   Management
     Persistence

     DistributedObject Support that goes
      well with RMI.
CMP vs BMP
              BMP                CMP

Avoid         Done using dirty   CMP engine
unnecessary   flags, but it      handles this
stores        requires more
              coding and is
              error-prone
Coding        JDBC sql queries   Lesser Coding
              have to be code.
Architecture Diagram
         (The chosen approach)


            SessionBean
             Session bean
                             EntityBean


             SessionBean     EntityBean
                                          Database
             SessionBean
                             EntityBean
client

             SessionBean     EntityBean
Session Facade

   Performance
      An Entity bean is equivalent to a row in the database. If
       the Entity beans were to be accessed directly, a network
       call would result for each row access.

        On the other hand, a Session bean is equivalent to a
         stored procedure. Accessing a session bean that is co-
         located with an entity bean emulates accessing a row
         through a stored procedure.
Session Facade
   Reusability
      The session bean layer is powerful because it
       externalizes all business logic from the entity beans.
       This means the entity beans contain data and data-
       related logic only.
      This promotes high re-use of entity beans.


   Data abstraction layer
      The session bean layer is a facade. The particular way
       the session bean persists (via JDBC directly or via entity
       beans) is an implementation detail of the session bean.
       The decision about whether to use JDBC or entity beans
       can be deferred until a later date.
E-R Diagram
Object Model
Collaboration Diagram - Login
Collaboration Diagram - Registration
Sequence Diagram - Registration
Collaboration Diagram – Set Quiz
Class Diagram
Class Diagram (old & new)
Lessons learnt / Challenges faced
   1. Familiarity with J2EE
     Studying  EJB Architecture (session
      bean, entity bean concepts)
     BMP vs CMP

     Concept of CMR

     Configuring JBoss 4.0

     Configuring Postgres 8.0 on JBoss

     Serial – Primary Key

     Writing Deployment Descriptors
Challenge
 Tryingto synchronize the Intel
 deadlines with the syslab
 deadlines throughout this
 course 
Deployment Descriptor
<entity>
   <ejb-name>course</ejb-name>
   <local-home>vclassroom.course.ejb.CourseLocalHome</local-
  home>
   <local>vclassroom.course.ejb.CourseLocal</local>
   <ejb-class>vclassroom.course.ejb.CourseBean</ejb-class>
   <persistence-type>Container</persistence-type>
   <reentrant>False</reentrant>
   <cmp-version>2.x</cmp-version>

   <abstract-schema-name>course</abstract-schema-name>
   <prim-key-class>java.lang.Integer</prim-key-class>
   <primkey-field>courseId</primkey-field>

   <cmp-field>
     <field-name>courseId</field-name>
   </cmp-field>
Deployment Descriptor
<query>
    <query-method>
          <method-name>ejbSelectprerequisites</method-name>
          <method-params>
              <method-param>java.lang.Integer</method-
  param>
          </method-params>
    </query-method>
    <ejb-ql><![CDATA[SELECT OBJECT(p) FROM course as c,
  IN(c.prereqCourses) p
     WHERE c.courseId = ?1]]>
    </ejb-ql>
 </query>
 </entity>
Technologies / Tools / Methodologies
Learnt
   J2EE Architecture
     Enterprise   Java Beans
   JBoss 4.0
   Postgres 8.0
   EJB-QL
   Swing (work in progress)
   Patterns – Session Façade,
    Recursive Meta pattern, Chain of
    responsibility
The Timeline
   Before MidSem
       Overview of the system requirements from Intel
       Requirement Specification Document – prepared and presented to
        Intel
       Architecture + Design Documentation
       Prototype : Demo – with the old architecture – Login,
        Registration, Quiz
       Deliverable – Client + Server implementation of modules
   After Midsem
       Change in architecture – Protocol + Server Side
       Learning Curve for new technology – EJBs, J2EE architecture
       Technology survey - Exploring options like JDO, Web Services
       Configurations – JBoss 4.0, Postgres 8.0
       Design of new architecture – Presentation to Intel
       Detailed Design specification documentation
       Deliverable – Server Side coding + documentation – Login,
        Registration, Quiz
Thank you !!!!

Contenu connexe

Tendances (20)

Session 1 Tp1
Session 1 Tp1Session 1 Tp1
Session 1 Tp1
 
Introduction to EJB
Introduction to EJBIntroduction to EJB
Introduction to EJB
 
Java unit 4_cs_notes
Java unit 4_cs_notesJava unit 4_cs_notes
Java unit 4_cs_notes
 
J2 ee tutorial ejb
J2 ee tutorial ejbJ2 ee tutorial ejb
J2 ee tutorial ejb
 
Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)
 
Java j2eeTutorial
Java j2eeTutorialJava j2eeTutorial
Java j2eeTutorial
 
J2EE and layered architecture
J2EE and layered architectureJ2EE and layered architecture
J2EE and layered architecture
 
Enterprise Java Beans - EJB
Enterprise Java Beans - EJBEnterprise Java Beans - EJB
Enterprise Java Beans - EJB
 
Spring
SpringSpring
Spring
 
EJB 3.0 and J2EE
EJB 3.0 and J2EEEJB 3.0 and J2EE
EJB 3.0 and J2EE
 
J2 ee architecture
J2 ee architectureJ2 ee architecture
J2 ee architecture
 
Ejb notes
Ejb notesEjb notes
Ejb notes
 
enterprise java bean
enterprise java beanenterprise java bean
enterprise java bean
 
Free EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggetsFree EJB Tutorial | VirtualNuggets
Free EJB Tutorial | VirtualNuggets
 
J2ee architecture
J2ee architectureJ2ee architecture
J2ee architecture
 
Java J2EE
Java J2EEJava J2EE
Java J2EE
 
Java EE EJB Applications
Java EE EJB ApplicationsJava EE EJB Applications
Java EE EJB Applications
 
Session bean
Session beanSession bean
Session bean
 
Ch4 ejb
Ch4 ejbCh4 ejb
Ch4 ejb
 
Entity beans in java
Entity beans in javaEntity beans in java
Entity beans in java
 

Similaire à Virtual classroom

Real world java_ee_patterns
Real world java_ee_patternsReal world java_ee_patterns
Real world java_ee_patternsAlassane Diallo
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts frameworks4al_com
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to strutsAnup72
 
Ejb course in-mumbai
Ejb course in-mumbaiEjb course in-mumbai
Ejb course in-mumbaivibrantuser
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch ProcessingChris Adkin
 
Summer training java
Summer training javaSummer training java
Summer training javaArshit Rai
 
Summer training java
Summer training javaSummer training java
Summer training javaArshit Rai
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationIMC Institute
 
Intro in JavaEE world (TU Olomouc)
Intro in JavaEE world (TU Olomouc)Intro in JavaEE world (TU Olomouc)
Intro in JavaEE world (TU Olomouc)blahap
 
Aravind vinnakota ejb_architecture
Aravind vinnakota ejb_architectureAravind vinnakota ejb_architecture
Aravind vinnakota ejb_architecturetayab4687
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionKelum Senanayake
 
Enterprise application developement
Enterprise application developementEnterprise application developement
Enterprise application developementArchana Jha
 
Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts weili_at_slideshare
 
J2ee connector architecture
J2ee connector architectureJ2ee connector architecture
J2ee connector architectureSubhasis Nayak
 
Ejb - september 2006
Ejb  - september 2006Ejb  - september 2006
Ejb - september 2006achraf_ing
 
Java EE 與 雲端運算的展望
Java EE 與 雲端運算的展望 Java EE 與 雲端運算的展望
Java EE 與 雲端運算的展望 javatwo2011
 
Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352sflynn073
 

Similaire à Virtual classroom (20)

Real world java_ee_patterns
Real world java_ee_patternsReal world java_ee_patterns
Real world java_ee_patterns
 
P20CSP105-AdvJavaProg.pptx
P20CSP105-AdvJavaProg.pptxP20CSP105-AdvJavaProg.pptx
P20CSP105-AdvJavaProg.pptx
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to struts
 
Ejb course in-mumbai
Ejb course in-mumbaiEjb course in-mumbai
Ejb course in-mumbai
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch Processing
 
Summer training java
Summer training javaSummer training java
Summer training java
 
Summer training java
Summer training javaSummer training java
Summer training java
 
Java Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web ApplicationJava Web Programming [1/9] : Introduction to Web Application
Java Web Programming [1/9] : Introduction to Web Application
 
Intro in JavaEE world (TU Olomouc)
Intro in JavaEE world (TU Olomouc)Intro in JavaEE world (TU Olomouc)
Intro in JavaEE world (TU Olomouc)
 
Aravind vinnakota ejb_architecture
Aravind vinnakota ejb_architectureAravind vinnakota ejb_architecture
Aravind vinnakota ejb_architecture
 
EJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another IntroductionEJB 3.0 - Yet Another Introduction
EJB 3.0 - Yet Another Introduction
 
Enterprise application developement
Enterprise application developementEnterprise application developement
Enterprise application developement
 
Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts Build Java Web Application Using Apache Struts
Build Java Web Application Using Apache Struts
 
J2ee connector architecture
J2ee connector architectureJ2ee connector architecture
J2ee connector architecture
 
4. J2EE.pptx
4. J2EE.pptx4. J2EE.pptx
4. J2EE.pptx
 
Ejb - september 2006
Ejb  - september 2006Ejb  - september 2006
Ejb - september 2006
 
Java EE 與 雲端運算的展望
Java EE 與 雲端運算的展望 Java EE 與 雲端運算的展望
Java EE 與 雲端運算的展望
 
Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352Was l iberty for java batch and jsr352
Was l iberty for java batch and jsr352
 
Summer training seminar
Summer training seminarSummer training seminar
Summer training seminar
 

Virtual classroom

  • 1. Virtual Classroom Integrated Learning environment over internet Anshu Veda Prajakta Kalekar Shruti Mahambre
  • 2. The Client  This project has been sponsored by Intel  IIT B point of contact Prof. Umesh Bellur
  • 3. Problem Definition This project aims at putting together an integrated e-Learning environment for a university student. This will also be used by distance education programs offered by institutes, in order to enable students to avail of the academic facilities from any computer connected to the internet.
  • 4. Basic terminology  RMI (Remote Method Invocation) Server application creates remote objects, makes references to them available and allows clients to invoke methods on these remote objects.  RMI tunneling over HTTP Combines the benefits of HTTP tunneling and RMI over internet  EJB  Session Beans (verb) Model business processes. They represent actions  Entity Beans (noun) Model Business data – They are data object, java objects that cache database information  EJB Container  House enterprise beans and make them available for clients to invoke remotely  Provide an environment in which enterprise beans can run  “Invisible middlemen”
  • 6. Basic Terminology  CMP – Container Managed Persistence  EJB container takes care of making sure the entity bean object stays around.  BMP – Bean Managed Persistence  You as the bean programmer can take over the responsibility of managing the "persistence" of the data -- of where the data stays when the server is not running or when the bean is not in memory.
  • 7. Requirement Specs  The system will be having 3 roles:  Instructor  Student  Admin  Admin  Managing user accounts, course registration approval  Instructor  Login,Create / Modify course details, set Quizzes, assign grades  Student  Login, Register / Unregister for courses, take quizzes, view lectures in offline mode  Non-Functional Requirements  Open-Source and Freeware  Support over Internet and Intranet
  • 8. Technology Decisions Client Client •Integrated Environment Communication Protocol Internet •Cross firewall •Intranet and Internet support Server •Transaction Server •Persistence •Security •Caching
  • 9. Thin v/s Thick Client Feature Thin Client Thick Client Web  Different Browsers  Gives integrated look Browser may require different and feel. The client plug-ins to support executable, installable Vs features such as Video from web, can bundle all Java streaming. prerequisites.  Look and feel varies  Java Swing client gives Client from browser to same look and feel across browser. all the platforms (as compared to web browser). Speed Slow. Everything must Fast. Can instantly scroll wait for the server to since the client can cache process and transmit and process data locally. the next screen of information.
  • 10. Initial Architecture Diagram Swing Client Specs  Client- Swing  Servlet Container- Tomcat3.2 Servlet  DB Server- Postgres8.0 Request Processor DB Manager Database
  • 11. Pros and Cons Pros  Simple  Simple and Intuitive. Uses HTTP over the internet and simple JDBC to communicate with the database server.  Light  As compared with J2EE server Cons  Plain Http protocol – No type safety  No caching Support  No Transaction Management Support.  Absence of Distributed Objects.
  • 12. WebServices ???  RMI offers an order of magnitude better performance than other alternatives, being at least 8.5 times faster than Web Services  HTTP-to-servlet is more than 4 times slower than web services.  Reference: “Java RMI, RMI Tunneling and Web Services Comparison and Performance Analysis” - Matjaz B. Juric, Bostjan Kezmah, Marjan Hericko, Ivan Rozman, Ivan Vezocnik
  • 13. Why EJBs?  Container inherently provides features such as  Security  Transaction Management  Persistence  DistributedObject Support that goes well with RMI.
  • 14. CMP vs BMP BMP CMP Avoid Done using dirty CMP engine unnecessary flags, but it handles this stores requires more coding and is error-prone Coding JDBC sql queries Lesser Coding have to be code.
  • 15. Architecture Diagram (The chosen approach) SessionBean Session bean EntityBean SessionBean EntityBean Database SessionBean EntityBean client SessionBean EntityBean
  • 16. Session Facade  Performance  An Entity bean is equivalent to a row in the database. If the Entity beans were to be accessed directly, a network call would result for each row access.  On the other hand, a Session bean is equivalent to a stored procedure. Accessing a session bean that is co- located with an entity bean emulates accessing a row through a stored procedure.
  • 17. Session Facade  Reusability  The session bean layer is powerful because it externalizes all business logic from the entity beans. This means the entity beans contain data and data- related logic only.  This promotes high re-use of entity beans.  Data abstraction layer  The session bean layer is a facade. The particular way the session bean persists (via JDBC directly or via entity beans) is an implementation detail of the session bean. The decision about whether to use JDBC or entity beans can be deferred until a later date.
  • 21. Collaboration Diagram - Registration
  • 22. Sequence Diagram - Registration
  • 26. Lessons learnt / Challenges faced  1. Familiarity with J2EE  Studying EJB Architecture (session bean, entity bean concepts)  BMP vs CMP  Concept of CMR  Configuring JBoss 4.0  Configuring Postgres 8.0 on JBoss  Serial – Primary Key  Writing Deployment Descriptors
  • 27. Challenge  Tryingto synchronize the Intel deadlines with the syslab deadlines throughout this course 
  • 28. Deployment Descriptor <entity> <ejb-name>course</ejb-name> <local-home>vclassroom.course.ejb.CourseLocalHome</local- home> <local>vclassroom.course.ejb.CourseLocal</local> <ejb-class>vclassroom.course.ejb.CourseBean</ejb-class> <persistence-type>Container</persistence-type> <reentrant>False</reentrant> <cmp-version>2.x</cmp-version> <abstract-schema-name>course</abstract-schema-name> <prim-key-class>java.lang.Integer</prim-key-class> <primkey-field>courseId</primkey-field> <cmp-field> <field-name>courseId</field-name> </cmp-field>
  • 29. Deployment Descriptor <query> <query-method> <method-name>ejbSelectprerequisites</method-name> <method-params> <method-param>java.lang.Integer</method- param> </method-params> </query-method> <ejb-ql><![CDATA[SELECT OBJECT(p) FROM course as c, IN(c.prereqCourses) p WHERE c.courseId = ?1]]> </ejb-ql> </query> </entity>
  • 30. Technologies / Tools / Methodologies Learnt  J2EE Architecture  Enterprise Java Beans  JBoss 4.0  Postgres 8.0  EJB-QL  Swing (work in progress)  Patterns – Session Façade, Recursive Meta pattern, Chain of responsibility
  • 31. The Timeline  Before MidSem  Overview of the system requirements from Intel  Requirement Specification Document – prepared and presented to Intel  Architecture + Design Documentation  Prototype : Demo – with the old architecture – Login, Registration, Quiz  Deliverable – Client + Server implementation of modules  After Midsem  Change in architecture – Protocol + Server Side  Learning Curve for new technology – EJBs, J2EE architecture  Technology survey - Exploring options like JDO, Web Services  Configurations – JBoss 4.0, Postgres 8.0  Design of new architecture – Presentation to Intel  Detailed Design specification documentation  Deliverable – Server Side coding + documentation – Login, Registration, Quiz