[English Blog] Android core chat migration

[English Blog] Android core chat migration

1. Why is migration needed?

Legacy codebases are time-consuming and difficult to maintain, have many bugs, and make it difficult to expand with new features in the future.

Migration will take a lot of time at first to rebuild the codebase and apply new and more modern architectures to solve the above problems.
Move general features to Chat-SDK that can easily integrate with multiple apps.

2. Migration roadmap.

  • Rebuild from Codebase -> Core Data -> UI/UX -> Modularization.
    Only reuse codebase logic will be retained, old models will be rebuilt from scratch, outdated UI components will be replaced to make the UI/UX smoother and more modern.
  • Move logic related to chat API to Chat-SDK and integrate SDK into Chợ Tốt app, instead of leaving this logic in the app as currently.
    Moving the general logic of the chat feature to Chat-SDK helps us easily integrate into many different applications such as Cho Tot, Mudah. Separating this core logic makes it easier for us to expand features and fix bugs in the future.
  • Apply new architects.
    The architects recommended by Google are also applied to Chat-SDK and Chat Module such as: Kotlin, Live Data, MVVM pattern, Clean Architect.
    Separate the chat feature into a separate module from the Chợ Tốt app instead of keeping it all in one module. This helps us easily write Unit test and maintain and expand the module.
Clean architect flow.


3. Version changes.

V1:

  • Use  fully Chợ Tốt authentication.
  • Legacy chat feature with basic features: view conversation list, send text and image message, send template messages, action call and send SMS, block user, apply CV for jobs.
Basic version 1 features.

V2:

  • Use Chat-SDK for authentication via chat tokens.
  • Allows users to view channel list and offline message history.
  • Added new features such as: sending multiple images at the same time, sending location, allowing users to edit and add quick messages, mark spam messages, save draft messages, unsend message, and track order status, report user.
    Helps users be flexible and exchange information more easily.
Some version 2 features.

V3.1:

  • Use Firebase Authentication to authenticate users via Firebase token.
  • Set up automatic messages when users purchase the pro package.
  • Add ads from Google AdMod to increase revenue.
  • Allows users to filter the list of conversations by many criteria, allows users to search for conversations by message, title and user.
    Helps users manage and classify channel lists more effectively and quickly.
Some version 3.1 features.


4. Difficulties have been experienced.

  • The first difficulty I faced when taking on the project when I first started working was that the project had passed through many hands and now they had quit their jobs so there was no one to maintain it.
  • The features are the logic of chat with almost no specific documentation or requirements.
  • Lack of synchronization and unity from features between platforms such as iOS and web.
  • Another big problem when conducting migration is how to ensure that the old public versions still work well in parallel with the new version after migration.
  • Many old and new bugs arise during the migration process.
Try not to dwell on your mistakes, learn from them, and move on.


5. Conclusion.

Going through a process of nearly 2 years since I took over the project from November 2021 until now. The chat feature has changed significantly from the core and underlying logic to the UI/UX and features above. All for one goal is to bring convenient and useful experiences to users.

However, during the above process, there are always unexpected incidents and bugs that make users complain, but I and the entire chat team always try to improve every day and bring the best experiences for users, and indirectly contributes to helping the company gain more revenue and creating a channel to help buyers and sellers exchange information more quickly and easily.

No sacrifice, No victory.


*****
Last but not least, we cannot achieve our goals without the collective contribution of each member of my team!
Through this blog, I would like to thank all members of the chat team in particular and other workgroups in general, for contributing to building and giving suggestions to make the chat feature more and more perfect.

Good game, well played.




Loading comments...