Virtual Classroom


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Virtual Classroom

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