Internship (Week 5): Refining synchronisation workflows

Starting the first day, I have a detail discussion with my colleague about best practices for clean and effective testing strategies. It was insightful and gave me some fresh perspectives on structuring tests efficiently as these conversations and learning from others’ experiences, leaving me inspired.

Moreover, I pull the repository and merge the develop branch for both user and retail contexts. I spend time to understand about RabbitMQ’s management interface when running. I also update the MessageQueueService to include new exchanges, queues and Dead Letter Queues (DLQs) for better user synchronisation. Meanwhile, I also ensure that all related tests, controllers and commands in the retail context are updated as well which relate to the new UserInfoDto. However, I also encounter some errors during testing and spend time for debugging after the updates, but then I found out that there some typo errors and some missing part to update. I also try to update the RabbitMQ for the consumer and listener for user synchronisation. Feedback from Mr. Peter on my manual synchronisation efforts was particularly helpful, he suggested me to use hardcoded practice for some cases.

Additionally, I also discuss with my colleague in order to understand RabbitMQ’s publish and listen processes more thoroughly. This discussion help to gain clarity on transaction workflows, especially for creating and publishing messages. We try to publish a message first to the queue before consuming the message. We have try for multiple times to register a new user from the page. However, we failed to and consider that it might be a connection issues. I continue my progress on manual sync in the user context by adding relevant call API that similar in retail context. Although I encounter roadblocks in registering new retail users. Mr.Peter answered me to refer on the register file instead of the commands. I found that file, and try to continue to register new user tomorrow.

Besides that, Mr.Peter assigned me some new tasks in the progress tracker such as manual synchronisation and creating default users for both systems, while ensuring both systems will subscribes the respective events for create, update and delete operations. Handling MongoDB synchronisation for item states and transfer order logs was another critical task. Then, Mr. Peter also raised a critical question about whether our synchronisation process was unnecessarily complex. His suggestion to consider MongoDB as a shared database sparked new ideas. So, I start to explore and search about the MongoDB’s synchronisation features like change streams and note potential approaches. Also, we discussion about the approach and understand about the shared database.

In addition, I also try to continue about my manual sync for main system. I successfully call the API to compare, but stuck in registering new user for retail user, I will try to finish by tomorrow. Apart from that, I also pull the latest develop branch and merge updates from Mr.Peter. I also spend time understanding new files about MongoDB, so that I could refine the user creation and synchronisation process. I then create some files for user synchronisation on MongoDB by referring the store files. Meanwhile, I continue refining the manual synchronisation for the user context and successfully achieve a sync between the systems, it was a satisfying milestone. However, the satisfaction of reaching this point was slightly dampen by new issues reveal during testing.

Conclusion

This week was a blend of deep learning, collaboration and problem-solving while debugging errors and tackling testing challenges tested my patience. The experiences of syncing systems and brainstorming innovative approaches with Mr. Peter made it worthwhile. I am getting my knowledge in understanding of RabbitMQ and MongoDB.