Author: Yin Xiangkun, Tsinghua University, SETAA Open Source Summer Student Participant.
Seata is an open-source distributed transaction solution that provides high-performance and easy-to-use distributed transaction services under a microservices architecture. At this year's Open Source Summer, I joined the Apache Seata (Incubator) community and completed the Open Source Summer project, and have been actively involved in the community ever since. I had the pleasure of sharing my developer experience at the Apsara Conference-Developer Showcase. In this article, I'll share with you my journey as a developer in the Seata community, as well as the experiences and insights I've gained along the way. I hope that through my story, more people can embark on this challenging and inspiring path of open source and make their own contributions to the prosperity of the open source community.
Before I formally introduce my experience, I would like to provide some relevant background information to explain why and how I want to get involved in open source. Regarding the reasons for participating in open source, I believe that everyone has different motivations. Here are some of the main reasons I think:
Learn:Participating in open source gives us the opportunity to contribute to open source projects developed by different organizations, interact with industry experts, and provide an opportunity to learn. Skill Boost:In my case, I usually use j**a and python for backend development. But while working on the Seata project, I had the opportunity to learn the Go language, which broadened my backend tech stack. Also, as a student, I had a hard time getting my hands on production-grade frameworks or applications, and the open source community provided me with this opportunity. Interests:My friends are passionate about open source, they enjoy programming, and they are passionate about open source. Job Search:Participating in open source can enrich our portfolio and add weight to our resume. Job Requirements:Sometimes participating in open source is to solve problems encountered at work or to meet work needs. These are all reasons to get involved in open source, and for me, learning, upskilling, and interest are my main motivations for getting involved in open source. Whether you are a student or a working person, if you are willing to participate in open source, don't hesitate to contribute to an open source project. It doesn't matter age, gender, job, or location, it's your passion and curiosity about open source projects.
The opportunity for me to participate in open source was to participate in the open source summer event organized by the Institute of Software of the Chinese Academy of Sciences.
Open Source Summer is an open source activity for university developers, the community releases open source projects, student developers complete the development of the project under the guidance of their mentors, contribute the final project results to the community, merge into the community warehouse, and get project bonuses and certificates. The Open Source Summer was a great opportunity to step into the open source community, and it was also my first formal exposure to open source projects, and this experience opened a whole new door for me. Since then, I have deeply realized that it is very fun and meaningful to participate in the construction of open source projects, share your technical achievements, and let more developers use what you contribute.
The following ** is the official public data of the Open Source Summer, the number of communities and students participating since 2020 is increasing year by year, and the activities are getting better and better. This year, you can see that there are 133 community projects that you have participated in, and each community has several topics, and each student can only choose one project. It is a relatively complex task to find the community you want to participate in and the topic that suits you among so many communities.
Considering the level of community activity, the fit of the technology stack, and the orientation of newcomers, I finally chose to join the Seata community.
Seata is an open-source distributed transaction framework that provides a complete distributed transaction solution, including AT, TCC, SAGA, and XA transaction modes, and supports multiple programming languages and data storage schemes. It's been 19 years since it was open sourced until this yearOver the years, there have been more than in the communityMultiple contributors, the project has harvested24k+Star, is a very mature community. At the same time SETA-compatibleThe rest of the mainstream RPC frameworks and RDBMS, withThere is a relationship between integrating and being integrated in multiple communitiesThousandscustomers can be said to be the de facto standard for distributed transaction solutions.
On October 29, 2023, Seata officially donated to the Apache Software Association as an incubation project. Once incubated, Seata is expected to be the first Apache Software Distributed Transaction Framework top-level project. This donation will also promote the broader development of Seata, which will have a profound impact on the construction of the ecosystem, so that more developers will benefit. This important milestone also gives Seata a wider scope for growth.
Now that I've covered some basics, I'll share my development journey with the Seata community.
I did a lot of preparatory work before I started development in earnest. Because Seata has been in development for five years and has accumulated hundreds of thousands of lines**, it is costly to get started directly with the development. I've shared some of my preparation experiences and hope to provide some inspiration for you.
1.Documentation and blogs are first-hand material
Textual materials such as documents and blogs can help newcomers to the community quickly understand the background and structure of the project.
First of all, the official documentation is the main reference material, from which you can learn everything that the official thinks you need to know.
Blogs, second only to the materials of official documents, are generally written by developers or in-depth users, and the difference with documents is that blogs may be more in-depth to introduce a specific topic, such as the theoretical model of some projects, project structure, source code analysis of a module, etc.
Similar to blogs, they are generally technical articles, and another advantage is that you can subscribe to the push and use your fragmented time to read some technologies.
In addition, some of the slides shared by the open source community or made public by offline meetups are also very meaningful text materials.
In addition to the official materials, there are many third-party materials to learn, such as the use cases shared by users to learn about the specific implementation and practices of the projectUnderstand the ecology of the project through the integration documentation of the third-party community;There is also the ability to learn through third-party tutorials. But out of all these sources, I think the official documentation and blog are the most helpful.
2.Familiarity with working with frameworks
Of course, the texts just mentioned definitely don't need to be read thoroughly, and they will eventually feel shallow on paper, and you can practice them when you see and feel almost understood. You can follow the official documentation"get started"The chapters provide a step-by-step understanding of the basic flow of the project. Another approach is to look for officially provided examples or demos, build and run them, understand what the ** and configuration means, and understand the project's needs, goals, and existing features and architecture by using the project.
For example, Seata has a repository called seata-samples, which contains more than 20 use cases, such as seata and dubbo integration, and SCA and Nacos integration cases, which can basically cover all supported scenarios.
3.A cursory reading of the source ** grasps the main logic
In the preparation phase, it is also important to read the source cursory to grasp the main logic of the project. Knowing how to effectively grasp the main content of a project is a skill that needs to be built over time. First, it's helpful to understand the conceptual, interaction, and process model of the project through the preparation steps described above.
Taking Seata as an example, through official documentation and practical operations, you can understand the three roles in the transaction domain of Seata: TC (Transaction Coordinator), TM (Transaction Manager), and RM (Resource Manager). TC is used as an independently deployed server to maintain the state of global and branch transactions, which is the key to high availability of SeataTM is used to interact with TC to define the start, commit, or rollback of a global transactionRM is used to manage the resources of branch transactions, interacts with TC to register branch transactions and report on the status of branch transactions, and drives branch transaction commits or rollbacks. With a cursory understanding of the interactions between these roles, it's easier to grasp the main logic of the project.
With the impression of these models engraved in my mind, I am relatively handy at extracting the backbone of the source code. For example, the SEATA TC transaction coordinator, as a server, is a separate application independent of business deployment. In order to analyze the source code, you can directly pick up the server locally and start tracking through the startup class. Some initialization logic can be analyzed, such as service registration, global lock initialization, and so on. There are also cases where the interaction logic can be traced through RPC calls, such as how TC persists global transactions and branch transactions, and how it drives global transaction commits or rolls back.
However, the embedded client-side framework** does not have a startup class entry to start the analysis. You can actually start with a sample and find its reference to the framework ** to read it. For example, a very important annotation for Seata is globaltransaction, which is used to identify a global transaction. If you want to know how TM analyzes this annotation, then we can use the search function of the IDE to find the *** of globaltransaction to analyze the logic in it.
There is also a small tip to share with you, often speaking, the single test focuses on the function of a single module, you can understand the input and output of a module, the logical boundary can be understood by reading the single test, and you can also read along the call chain of the single test**, which is also a very important means to understand the source code.
After making adequate preparations, the next step is for the district to actively participate in the community.
There are many ways to get involved, the most common way to get involved is to look at the list of issues in the project, and the community usually flags issues with special labels for new contributors, such as "good-first-issue", "contributions-welcome", and "help-wanted". You can filter the tasks of interest by these tags.
In addition to issues, GitHub also provides a discussion feature to participate in some public discussions and get new ideas.
In addition, the community often holds regular meetings, such as weekly or bi-weekly meetings, which can be attended to keep abreast of the community's progress, ask questions, and communicate with other community members.
I first joined the Seata community through the Open Source Summer event. I've completed my project and implemented some new features for Seata Saga, as well as a series of optimizations. But I don't stop there, because I had one of the most valuable developer experiences of my student career during my open source experience at Seata, and I've continued to be active in the community through these ways of getting involved for the rest of my life. This is mainly due to the following aspects:
Communication & SocializationThe mentorship system has provided me with important support. During the development process, the close collaboration between me and my mentor Yixia was key to my adaptation to the community culture and workflow. He not only helped me adapt to the community, but also provided me with ideas for program design, and also shared some experiences and insights with me at work, which were very helpful for my development. In addition, Qing Ming, the founder of the Seata community, also provided a lot of help, including establishing connections with other classmates, helping me with code review, and also providing me with many opportunities. Positive feedbackDuring the development of Seata, I went through a virtuous cycle. Many details have provided me with a lot of positive feedback, such as my contribution being widely used and benefited by users, such as the recognition of the development by the community. This positive feedback reinforces my willingness to continue contributing to the Seata community. Skill Boost:Participating in the development of SEATA has also greatly improved my abilities. Here, I can learn production-level **, including performance optimization, interface design, and boundary judgment skills. You can directly participate in the operation of an open source project, including project planning, scheduling, communication, etc. And, of course, how a distributed transactional framework is designed and implemented. In addition to these valuable developer experiences, I also learned some personal experiences about participating in open source from this experience, and I have made a brief summary to motivate other students who are interested in participating in the open source community:
Learn about the culture and values of the communityEvery open source community has a different culture and values. Understanding the culture and values of the community is essential to successfully engaging in the community. Observing and understanding how other members of the community develop and communicate on a day-to-day basis is a great way to learn about the culture of the community. Respect the opinions of others and be tolerant of different perspectives in the community. Dare to take the first stepDon't be afraid to face the odds, taking the first step is key to getting involved in the open source community. It can be marked by pick-up"good-first-issue"and so on, write documentation, unit tests, etc. to get started. It's important to overcome your fear of difficulties, try and learn. Be confident in your workDon't doubt your abilities. Everyone starts from scratch, and no one is born an expert. Participating in the open source community is a process of learning and growth, which requires continuous practice and experience. Actively participate in discussions and continue to learn about different technologiesDon't be afraid to ask questions, whether it's about the specific technology of the project or the challenges in the development process. Don't limit yourself to one area. Experimenting with learning and mastering different programming languages, frameworks, and tools can broaden your technical horizons and provide valuable insights into your project. Through my open source journey, I have gained valuable experience and skills that have not only helped me grow as a more valuable developer, but also given me a deep understanding of the power of the open source community. However, I am not just an individual participant, I represent a part of the Seata community. As an open source project that is constantly growing and evolving, Seata has great potential and new challenges. Therefore, I would like to emphasize the importance and future potential of the Seata community, which has entered the incubation stage of the Apache Software Conference, and this important milestone will bring a broader development space for Seata. Seata welcomes more developers and contributors to join us, and let's work together to promote the development of this open source project and contribute to the advancement of the distributed transaction space.
Search for a DingTalk group number.
Join the seata group open source*** group number: 32033786).