Progressive-Learning-Platform / PLPTool6

Prototype for PLPTool frontend interface overhaul
2 stars 4 forks source link

Publisher subscriber model for PLPTool6 using ActiveMQ #123

Open prashanthrk92 opened 6 years ago

prashanthrk92 commented 6 years ago

This feature involves:

  1. Design a basic publisher subscriber model connecting two services. For reference, I am using the Spring JMS - ActiveMQ tutorial, https://www.codenotfound.com/spring-jms-activemq-example.html.
  2. Decide on the message format used for storing data in JMS provider or the Queue. For reference, I am using the tutorial, https://www.codenotfound.com/jms-message-types-properties-overview.html.
  3. Creating PLP simulator instances for backend and decoupling all the instances.
  4. Integrating the GUI with the backend service via ActiveMQ message passing and thereby establishing asynchronous communication.
prashanthrk92 commented 6 years ago

Until Feb 2nd:

Had a session of talk with Xiangyu regarding the design and implementation of ActiveMQ for PLP Tool6. Based on the discussion, I had estimated the timeline of work for the upcoming weeks in conversation with Xiangyu. There was a total of 14 weeks for this semster. As we are into the 4th week, my timeline for the remaining weeks are as below:

Week 4 and Week 5 ( till Feb 12th):

  1. Design phase of ActiveMQ: Decide on:- The features that will be done along with ActiveMQ implementation, The classes to be added, The files that are going to be changed, Message format or the protocol that is used in ActiveMQ(to JSON format) Class diagrams and other design documents, Design review.

Week 6( till Feb 19th): Define the interfaces that are to be used in the ActiveMQ implementation.

Week 7(till Feb 26th): Write test cases for the functionality and do some unit or mock testing.

Week 8,9,10(till March 19th): Actual coding of the functionalities included during the design phase.

Week 11(till March 26th): Get done with the code review for the project.

Week 12, 13(till April 9th): Integrate all the modules and get done with the functional and Integration testing of the tool.

Week 13,14(till April 23rd): Resolving bugs if any, and get done with the final report and all other documentation for the project.

prashanthrk92 commented 6 years ago

Until Feb 14th:

Finished: Basic design document with the details including the features to be added along with ActiveMQ. Had completed the UML class diagram, design architecture, and sequence diagram for ActiveMQ. Spent a total of 7-8 hours for drawing the diagrams. Spent the remaining hours for reading and preparing.

ToDo: Analyze anymore design decisions that are left to be added in this design document, which were already discussed during the design planning. Get done with the design review. Start with a basic implementation of ActiveMQ.

prashanthrk92 commented 6 years ago

Until Feb 18th:

  1. Analyzed what classes and methods need to be added with the ActiveMQ implementation. I used the codebase of the WebPLP version alone, as the current integrated codebase had issues with assembling and simulating the code.
  2. Created a mockup of the Save functionality by printing some logs on the frontend and backend, when the Save button is clicked(just the interface), so that it can be used for ActiveMQ testing in the coming week.
  3. As of now, I tried to have the following classes and methods for the AMQ implementation.

Under the package edu/asu/plp/config/, implement a Java class for starting the AMQ broker, configuring the ConnectionFactory, which contains the following methods: 1.for initializing the connectionFactory for the queue, and 2.methods for serializing the objects to JSON using Jackson API.

  1. methods for JmsSender(used by publisher) and JmsListener(used by subscriber).

Under the package edu/asu/plp, create a package called jms, which will have the Publisher and the Subscriber classes.

ToDo: Identify the interfaces and other classes to be added in the corresponding location of WebPLP, and those discussed in the design document. Start with testing the AMQ server with a functionality of the WebPLP.