Blog 10 – Milestone Three

As I had hoped the front-loading I did for this project payed off. I connected my app to a remote MongoDB database and switching the app form using local data storage to using the database was a breeze thanks to the fact that I have been using Mongo already in one of my other courses this semester.

The hardest part hear was actually getting a multi-thread solution running for my chat so that I could simultaneously update the chat and have the window checking for events from the user.

Unfortunately due to the nature of PySimpleGUI the only way to update the chat was to constantly query the database in the background. This is because the windows that PySimpleGUI creates are not dynamic, the code stops every time a window is rendered and waits for a user to trigger an event.
This ultimately makes this app very resource intensive and very inefficient but there isn’t much I can do about that considering the requirements of the assessment.
I tried to mitigate this problem somewhat by having the chat be retrieve only once every five seconds but this is far from an ideal solution for a chat system.

00