Significant risks for the project we managed this week:

  • Integration between the MIDI tracker program and the Django web application: Restful APIs/TCP channel setup/Database model design/Ajax calls
    • We handle the pre-population of database because of the absence of the actual Raspberry pi hardware that should be communicating with our web application. We tried out both methods and found that using a custom migration files and migrate every time is prone to crash the migration process and results in inconsistent states between the database and the Django server. Thus, We decided to stick with the fixture approach.
    • In order to achieve the communication of the title of the sheet music between the web server and the midiTracker program, we established a TCP channel, where the web server is the client and the midiTracker is the server. They are both hosted on the localhost for now. Before user logs in, the midiTracker has already been served on the localhost and waiting for connections. Once the users done uploading the sheet music, and the image matching algorithm is run to figure out the title of the sheet music, the web server establishes a connection between itself and the midiTracker and sends the title over, and the connection is closed after a reply of SUCCESS is received and the web server end.
    • We used RestAPI to handle the flip page signal. Once the MIDI tracker program runs to the point where it thinks the page should be flipped, it sends the flip page signal as a POST request to the webserver. The webserver then updates the Score model with the new page number and image path.
    • To ensure that the user gets a consistent view of the webpage, we decide not to let the whole display page refresh. Instead, I used ajax to fulfill the task of updating the sheet music shown on website. An ajax GET request is sent every 500 ms to see if a flip point is detected. Once detected, the Django views sends the updated information related to the sheet music in JSON format, which then gets rendered on the webpage without refreshing the whole page.

Changes made to the existing design of the system:

  • N/A

An updated schedule if changes have occurred:

  • N/A

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *