papatutuwawa.pages.polynom.me/posts/2023-08-20-Moxxy-MUC-GSoC-Final-Report.html
2024-01-01 01:10:28 +01:00

571 lines
20 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="/assets/css/index.css" rel="stylesheet" />
<link rel="shortcut icon" href="/assets/img/favicon.ico" sizes="32x32" />
<link href="/feed.xml" type="application/atom+xml" rel="alternate" title="Moxxy Blog" />
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>GSoC report - Moxxy MUC implementation | Moxxy</title>
<meta name="generator" content="Jekyll v4.3.1" />
<meta property="og:title" content="GSoC report - Moxxy MUC implementation" />
<meta name="author" content="Ikjot Singh Dhody" />
<meta property="og:locale" content="en_GB" />
<meta name="description" content="GSoC Final Report: XMPP Standards Foundation - Moxxy: Implement Group Chats" />
<meta property="og:description" content="GSoC Final Report: XMPP Standards Foundation - Moxxy: Implement Group Chats" />
<link rel="canonical" href="https://moxxy.org/posts/2023-08-20-Moxxy-MUC-GSoC-Final-Report.html" />
<meta property="og:url" content="https://moxxy.org/posts/2023-08-20-Moxxy-MUC-GSoC-Final-Report.html" />
<meta property="og:site_name" content="Moxxy" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2023-08-20T00:00:00+02:00" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="GSoC report - Moxxy MUC implementation" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"Ikjot Singh Dhody"},"dateModified":"2023-08-20T00:00:00+02:00","datePublished":"2023-08-20T00:00:00+02:00","description":"GSoC Final Report: XMPP Standards Foundation - Moxxy: Implement Group Chats","headline":"GSoC report - Moxxy MUC implementation","mainEntityOfPage":{"@type":"WebPage","@id":"https://moxxy.org/posts/2023-08-20-Moxxy-MUC-GSoC-Final-Report.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://moxxy.org/assets/img/logo.png"},"name":"Ikjot Singh Dhody"},"url":"https://moxxy.org/posts/2023-08-20-Moxxy-MUC-GSoC-Final-Report.html"}</script>
<!-- End Jekyll SEO tag -->
</head>
<body>
<div class="flex flex-col">
<div class="relative h-16 inset-x-0 inset-y-0 px-4 shadow-md grid place-items-center">
<div class="flex flex-row items-center w-full">
<!-- The Moxxy logo -->
<a href="/index.html">
<img src="/assets/img/logo.png" class="w-12 h-12 p-2" />
</a>
<a href="/index.html">
<span class="font-bold">Moxxy</span>
</a>
<!-- Spacer -->
<div class="grow"></div>
<a href="/posts.html" class="px-2 text-sky-400">Blog</a>
<a href="/developers.html" class="px-2 text-sky-400">Developers</a>
<a href="https://codeberg.org/moxxy/moxxy" class="px-2 text-sky-400">Source</a>
</div>
</div>
<div class="w-full md:max-w-prose mt-2 mx-auto">
<div class="px-8">
<h1 class="text-3xl">GSoC report - Moxxy MUC implementation</h1>
<span>Posted by <span class="italic">Ikjot Singh Dhody</span> on 20.08.2023</span>
<article class="mt-5 prose lg:prose-lg">
<h1 id="gsoc-final-report-xmpp-standards-foundation---moxxy-implement-group-chats">GSoC Final Report: XMPP Standards Foundation - Moxxy: Implement Group Chats</h1>
<p><strong>Project:</strong> Moxxy - Implement Group Chats<br />
<strong>Organization:</strong> XMPP Standards Foundation<br />
<strong>Duration:</strong> March 2023 - August 2023<br />
<strong>Student:</strong> Ikjot Singh Dhody<br />
<strong>Mentor:</strong> Alexander</p>
<h2 id="introduction">Introduction</h2>
<p>This report presents the culmination of my work on the GSoC project “Moxxy: Implement Group Chats” under the mentorship of Alexander at the XMPP Standards Foundation. Over the course of this project, I have been engaged in implementing a group chat feature for the Moxxy application, aiming to enhance its functionality and user experience.</p>
<h2 id="about-me">About Me</h2>
<h3 id="personal-and-socialcontact-details">Personal and Social/Contact Details</h3>
<ul>
<li><strong>Name:</strong> Ikjot Singh Dhody</li>
<li><strong>Jabber ID:</strong> ikjot-2605[at]jabber.fr</li>
<li><strong>Email:</strong> ikjotsd[at]gmail.com</li>
<li><strong>GitHub:</strong> <a href="https://github.com/ikjot-2605">ikjot-2605</a></li>
<li><strong>LinkedIn:</strong> <a href="https://www.linkedin.com/in/ikjotsd/">LinkedIn Profile</a></li>
</ul>
<h3 id="educational-background">Educational Background</h3>
<ul>
<li><strong>University:</strong> National Institute of Technology Karnataka, Surathkal</li>
<li><strong>Major:</strong> Computer Science and Engineering</li>
<li><strong>Year:</strong> Senior Year</li>
<li><strong>Degree:</strong> Bachelor of Technology (B. Tech)</li>
</ul>
<h2 id="the-project">The Project</h2>
<p>Before getting into the details of the actual project - here is a demo screencast for the implementation:</p>
<p><img src="../assets/img/moxxy-muc-demo.gif" alt="" /></p>
<p>I have outlined the features I implemented through the GSoC period below.</p>
<h3 id="prs-merged">PRs merged</h3>
<ul>
<li>moxxmpp
<ol>
<li><a href="https://codeberg.org/moxxy/moxxmpp/pulls/45">Add support for XEP-0421</a></li>
<li><a href="https://codeberg.org/moxxy/moxxmpp/pulls/46">Implement XEP-0045 support in moxxmpp</a></li>
</ol>
</li>
<li>Moxxy
<ol>
<li><a href="https://codeberg.org/moxxy/moxxy/pulls/300">Add groupchat support for Moxxy</a></li>
</ol>
</li>
<li>website (blog)
<ol>
<li><a href="https://codeberg.org/moxxy/website/pulls/2">Add blog for GSoC MUC project introduction.</a></li>
<li><a href="https://codeberg.org/moxxy/website/pulls/3">Blog for XEP 0045 support in Moxxmpp</a></li>
<li><a href="https://codeberg.org/moxxy/website/pulls/4"> New blog - Join an MUC with Moxxy!</a></li>
<li><a href="https://codeberg.org/moxxy/website/pulls/5">Final GSoC Report Blog</a>
<h3 id="feature-use-cases">Feature Use-Cases</h3>
</li>
</ol>
</li>
</ul>
<p>The group chat feature required changes to the Moxxy codebase, as well as the moxxmpp codebase. Moxxmpp is the data worker that sends and maintains all the request requirements of the Moxxy frontend. These are the list of contributions across both projects:</p>
<ul>
<li>Joining rooms and getting disco info for the room.</li>
<li>Sending messages to a group chat and receiving messages from the group chat.</li>
<li>Leaving the group chat.</li>
<li>Displaying a UI for joining a group chat and providing a nickname.</li>
<li>Handling group chat details and database support.</li>
<li>Handling group chat errors and basic error handling.</li>
<li>Adding a GroupchatDetails model.</li>
<li>Adding UI elements for group chat, such as title and nickname fields.</li>
<li>Adding documentation to group chat service methods.</li>
<li>Minor code refactoring and naming enhancements.</li>
<li>Enhancing enums for conversation types.</li>
<li>Removing unnecessary translation strings.</li>
<li>Improving UI and formatting.</li>
</ul>
<p>Outlined below are commits made across both codebases throughout the GSoC period.</p>
<h4 id="moxxmpp">Moxxmpp</h4>
<p>There were 2 PRs merged for this codebase.</p>
<ul>
<li>XEP-0421 support for occupant ID support.</li>
</ul>
<table>
<thead>
<tr>
<th>Serial Number</th>
<th>Commit Hash</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>255d0f88e0</td>
<td>feat(xep): Use cascading operation to return state</td>
</tr>
<tr>
<td>2</td>
<td>fa11a3a384</td>
<td>feat(xep): Checked for the occupant-id directly.</td>
</tr>
<tr>
<td>3</td>
<td>ac5bb9e461</td>
<td>feat(xep): Implement XEP 0421 in Moxxmpp.</td>
</tr>
</tbody>
</table>
<ul>
<li>XEP-0045 support for MUC support.</li>
</ul>
<table>
<thead>
<tr>
<th>Serial Number</th>
<th>Commit Hash</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>b2724aba0c</td>
<td>Merge branch master into xep_0045</td>
</tr>
<tr>
<td>2</td>
<td>d3742ea156</td>
<td>feat(xep): Small fixes - MUC Example.</td>
</tr>
<tr>
<td>3</td>
<td>8b00e85167</td>
<td>feat(xep): Add example for XEP 0045 Moxxmpp.</td>
</tr>
<tr>
<td>4</td>
<td>04dfc6d2ac</td>
<td>feat(xep): Replace DiscoError with StanzaError.</td>
</tr>
<tr>
<td>5</td>
<td>9e70e802ef</td>
<td>Merge branch master into xep_0045</td>
</tr>
<tr>
<td>6</td>
<td>3ebd9b86ec</td>
<td>feat(xep): Fix lint issues and use moxlib for result.</td>
</tr>
<tr>
<td>7</td>
<td>a873edb9ec</td>
<td>feat(xep): Check for null nick before leaveRoom.</td>
</tr>
<tr>
<td>8</td>
<td>e6bd6d05cd</td>
<td>feat(xep): Remove NOOP cache access.</td>
</tr>
<tr>
<td>9</td>
<td>b7d53b8f47</td>
<td>feat(xep): Add docstings for the XEP-0045 routines</td>
</tr>
<tr>
<td>10</td>
<td>217c3ac236</td>
<td>feat(xep): Fix cache issue with join/leaveRoom.</td>
</tr>
<tr>
<td>11</td>
<td>51bca6c25d</td>
<td>feat(xep): XEP-0045 cache fixes.</td>
</tr>
<tr>
<td>12</td>
<td>8728166a4d</td>
<td>feat(xep): Add cache and roomstate to MUC implementation.</td>
</tr>
<tr>
<td>13</td>
<td>1f1321b269</td>
<td>feat(xep): Small fixes - review cycle 1.</td>
</tr>
<tr>
<td>14</td>
<td>66195f66fa</td>
<td>Merge branch master into xep_0045</td>
</tr>
<tr>
<td>15</td>
<td>70fdfaf16d</td>
<td>feat(xep): Fix imports for xep_0045 files.</td>
</tr>
<tr>
<td>16</td>
<td>cd73f89e63</td>
<td>feat(xep): Remove duplicate manager string</td>
</tr>
<tr>
<td>17</td>
<td>05c41d3185</td>
<td>feat(xep): Refactor sendMessage to allow groupchat</td>
</tr>
<tr>
<td>18</td>
<td>64a8de6caa</td>
<td>feat(xep): Set base for XEP 0045 implementation</td>
</tr>
<tr>
<td>19</td>
<td>68809469f6</td>
<td>feat(xep): Add joinRoom, leaveRoom routines.</td>
</tr>
<tr>
<td>20</td>
<td>762cf1c77a</td>
<td>feat(xep): Set base for XEP 0045 implementation</td>
</tr>
</tbody>
</table>
<h4 id="moxxy">Moxxy</h4>
<ul>
<li>Implement MUCs in Moxxy</li>
</ul>
<table>
<thead>
<tr>
<th>Serial Number</th>
<th>Commit Hash</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>549e61a168</td>
<td>feat(all): Fix linter issues.</td>
</tr>
<tr>
<td>2</td>
<td>26bcaccd81</td>
<td>Merge branch master into feat/groupchat</td>
</tr>
<tr>
<td>3</td>
<td>df5810a347</td>
<td>feat(all): Formatting change, lock file update</td>
</tr>
<tr>
<td>4</td>
<td>ef931c566f</td>
<td>feat(all): Send messages/chat state from Moxxy to MUC.</td>
</tr>
<tr>
<td>5</td>
<td>a3d4883406</td>
<td>feat(all): Remove unnecessary buttons/options for MUC.</td>
</tr>
<tr>
<td>6</td>
<td>532f0b1bb2</td>
<td>feat(all): Formatting fix, and navigation fix.</td>
</tr>
<tr>
<td>7</td>
<td>a98fe0d9f3</td>
<td>feat(all): Minor fixes - strings, formatting.</td>
</tr>
<tr>
<td>8</td>
<td>a7c3bd507f</td>
<td>Merge branch master of https://codeberg.org/moxxy/moxxy into feat/groupchat</td>
</tr>
<tr>
<td>9</td>
<td>fba2cf86ae</td>
<td>feat(all): Minor formatting changes.</td>
</tr>
<tr>
<td>10</td>
<td>af481bf465</td>
<td>feat(all): remove unnecessary comparator override.</td>
</tr>
<tr>
<td>11</td>
<td>e6ae8182c2</td>
<td>feat(all): Organize import in main.dart.</td>
</tr>
<tr>
<td>12</td>
<td>de7b9adfa6</td>
<td>feat(all): Fix user flow for joining MUC.</td>
</tr>
<tr>
<td>13</td>
<td>e4f98bb82f</td>
<td>feat(all): Add label to nick text field.</td>
</tr>
<tr>
<td>14</td>
<td>56d6f97168</td>
<td>feat(all): Minor changes, fixes.</td>
</tr>
<tr>
<td>15</td>
<td>b0067f055f</td>
<td>feat(all): Move away from exception type design.</td>
</tr>
<tr>
<td>16</td>
<td>bd094dfc9a</td>
<td>feat(all): Remove unnecessary function.</td>
</tr>
<tr>
<td>17</td>
<td>7e9d7d6281</td>
<td>feat(all): Check if Groupchat exists before method.</td>
</tr>
<tr>
<td>18</td>
<td>2cf781459d</td>
<td>feat(all): Debug mode and translatable string</td>
</tr>
<tr>
<td>19</td>
<td>4ff9e3c81e</td>
<td>feat(all): Remove title from GroupchatDetails.</td>
</tr>
<tr>
<td>20</td>
<td>e337f1c579</td>
<td>feat(all): Minor refactors - naming.</td>
</tr>
<tr>
<td>21</td>
<td>7c840334e1</td>
<td>feat(all): Add docs to groupchat service methods.</td>
</tr>
<tr>
<td>22</td>
<td>06eab1d6f5</td>
<td>feat(all): Make ConversationType an enhanced enum.</td>
</tr>
<tr>
<td>23</td>
<td>008e816d70</td>
<td>feat(all): Rename JoinGroupchatResultEvent.</td>
</tr>
<tr>
<td>24</td>
<td>2bbbc164b5</td>
<td>feat(all): Remove incorrect translations.</td>
</tr>
<tr>
<td>25</td>
<td>11f4fd9932</td>
<td>feat(all): Add title to GroupchatDetails.</td>
</tr>
<tr>
<td>26</td>
<td>a1451c6fbf</td>
<td>feat(all): Refactor groupchat to new object in db.</td>
</tr>
<tr>
<td>27</td>
<td>993da40297</td>
<td>feat(all): Complete join groupchat flow.</td>
</tr>
<tr>
<td>28</td>
<td>09684b1268</td>
<td>feat(all): Fix fromDatabaseJson for MUC details.</td>
</tr>
<tr>
<td>29</td>
<td>0abb89cf38</td>
<td>feat(all): Fix database issues with nick.</td>
</tr>
<tr>
<td>30</td>
<td>7880f51b76</td>
<td>feat(all): Add db support for GroupchatDetails.</td>
</tr>
<tr>
<td>31</td>
<td>f0a79ca0e0</td>
<td>feat(all): Add GroupchatDetails model.</td>
</tr>
<tr>
<td>32</td>
<td>06dcd5491b</td>
<td>feat(all): Basic groupchat error handling set up.</td>
</tr>
<tr>
<td>33</td>
<td>3641be4f56</td>
<td>feat(all): Join room functionality complete.</td>
</tr>
<tr>
<td>34</td>
<td>18e28c3bbf</td>
<td>feat(all): Groupchat service/bloc updated.</td>
</tr>
<tr>
<td>35</td>
<td>62e39bf066</td>
<td>feat(all): Set base for groupchat implementation.</td>
</tr>
</tbody>
</table>
<h2 id="accomplishments">Accomplishments</h2>
<ul>
<li>
<p>Was able to produce a working model of groupchats in Moxxy.</p>
</li>
<li>
<p>Started the design approach from scratch and pretty much stuck to it till the end gave me confidence in my design capability.</p>
</li>
<li>
<p>Fruitful discussions and review cycles were conducted that allowed for a smooth GSoC experience.</p>
</li>
</ul>
<h2 id="challenges-faced">Challenges Faced</h2>
<ul>
<li>
<p>Needed to understand 2 different codebases, and the architecture of the project. This was a pretty interesting, albeit challenging task that took me a while to master.</p>
</li>
<li>
<p>Managing the busy schedule with GSoC work, family, college among other things was difficult. Also, managing a job in the latter parts was also challenging but a rewarding experience.</p>
</li>
<li>
<p>The complete virtual approach was slightly difficult, and although not practical - it might have been slightly better with inter-GSoC meetings.</p>
</li>
</ul>
<h2 id="learningstakeaways">Learnings/Takeaways</h2>
<ul>
<li>Implemented group chat (Multi-User Chat or MUC) support in the Moxxy project.</li>
<li>Successfully added features for joining a group chat room, sending messages to the room, and receiving messages from the room.</li>
<li>Learned to handle various aspects of XMPP communication, including sending and receiving messages, and interacting with group chat services.</li>
<li>Gained insights into implementing complex functionality in a Flutter application, involving UI components, service classes, and database interactions.</li>
<li>Collaborated with experienced developers through code reviews to improve code quality and ensure adherence to best practices.</li>
<li>Acquired knowledge of working with the XMPP protocol, understanding its intricacies and how it relates to group chat interactions.</li>
<li>Learned to manage and address feedback from code reviewers, making necessary adjustments to improve code readability and functionality.</li>
<li>Discovered the importance of proper error handling in real-time communication scenarios, such as handling different types of group chat errors.</li>
<li>Gained experience in integrating new features while maintaining the overall architecture and user experience of the application.</li>
<li>Understood the complexities of XMPP server behavior, including handling discussion history and preventing message loops.</li>
<li>Explored techniques for optimizing communication performance, such as preventing redundant message processing.</li>
<li>Improved skills in project management, including version control practices, managing branches, and resolving merge conflicts.</li>
<li>Gained familiarity with the process of creating, testing, and merging pull requests in a collaborative development environment.</li>
<li>Developed a better understanding of Flutters state management, navigation, and widget composition for creating feature-rich user interfaces.</li>
<li>Learned to balance feature development with code quality, addressing both functional and non-functional aspects of the implementation.</li>
<li>Explored advanced Flutter topics, such as handling asynchronous operations, managing state, and integrating with external libraries.</li>
<li>Gained a deeper understanding of how group chat and real-time communication play a significant role in modern applications.</li>
<li>Developed the ability to diagnose and troubleshoot issues related to communication and user interface interactions.</li>
<li>Strengthened communication skills by participating in technical discussions and effectively conveying ideas and solutions.</li>
</ul>
<h2 id="future-work">Future Work</h2>
<p>The future remaining work has been enlisted in this issue by my mentor <a href="https://codeberg.org/moxxy/moxxy/issues/315">here</a>.</p>
<p>This includes a list of improvements, bug fixes and general future requirements that will be needed to make the groupchat experience pleasurable for the users of Moxxy.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Participating in GSoC has been an enriching experience. Ive learned valuable skills, collaborated with mentors and the open-source community, and contributed to the Moxxy project. Im grateful to XMPP Standards Foundation for this opportunity and look forward to continuing my journey in the world of open-source software development.</p>
<h2 id="acknowledgments">Acknowledgments</h2>
<p>I would like to express my gratitude to my mentor Alexander for their guidance and support throughout this project. His guidance and understanding is what allowed me to pull through and complete the GSoC with a happy mind. I also want to thank the XMPP Standards Foundation community for their encouragement and feedback.</p>
</article>
</div>
</div>
</div>
<footer class="h-8 w-full flex flex-row justify-center">
<span class="text-sm text-center">
Made with &lt;3 by
<a class="text-sky-400" href="https://polynom.me" target="_blank" rel="noopener noreferrer">PapaTutuWawa</a>
using <a class="text-sky-400" href="https://tailwindcss.com/" target="_blank" rel="noopener noreferrer">TailwindCSS</a>,
<a class="text-sky-400" href="https://jekyllrb.com/" target="_blank" rel="noopener noreferrer">Jekyll</a> and
<a class="text-sky-400" href="https://heroicons.com/">heroicons</a>.
</span>
</footer>
</body>
</html>