TeleStax OpenSource Playbook
TeleStax OpenSource Playbook
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwww⁷… ģkkţpĺĺķĺĺĺpôóģģg
Jean Deruelle,
CTO
TeleStax, Inc
350 Cambridge Ave, Suite 250
Palo Alto, CA
2
1 Overview
4 Development Process
4.1 Everything starts with an issue
4.2 Design
4.3 Implementation
4.3.1 Code Quality
4.3.2 Code Best Practices
4.3.3 Create your own Fork
4.3.4 Create your own Feature or Fix Branch
4.4 Tests
4.4.1 Non Regression Tests
4.4.2 Manual Tests
4.4.3 Performance Tests
4.5 Documentation
4.5.1 Source Documentation
4.5.2 Editing the Documentation
4.5.3 Inserting UML Diagrams
4.5.4 Outputting the Documentation
4.5.5 Theming
4.5.6 Hosting
4.5.7 Continuous Documentation
4.5.8 Process
4.6 Committing code
4.7 Pushing changes to your online clone
3
5 Q&A Process
5.1 Continuous Integration
Test Stability and Categories
CI and FeatureBranch approach
5.2 Continuous Delivery
6 Release Process
6.1 Creating a release on github
6.2 Make a Release Announcement
6.3 Market your release
6.4 Blog about your work
7 Hiring Process
7.1 R&D Hiring Process & Criteria
1 Overview
Open Source is at the core of everything we do and is the foundation of our history and company
culture. Although we have mentioned our office address, it is mainly for reference as the entire
company and contributors are working in an open and distributed manner from day one (similar to
many others nowadays with very good reasons for doing it), now across more than 30 countries at
the time of writing.
This Playbook contains Best Practices on evolving your open source project and growing an active
community around it based on our 13 years of building the biggest Open Source Communications
Platform : Mobicents which has just been rebranded to RestComm.
The community has just reached a very impressive growth milestone.
The independent WebSite OpenHub shows at the time of this writing that the codebase tripled
since TeleStax was created and that it would take 81 Million Dollars to rebuild the project for an
average salary per year of $55K.
5
In a Nutshell, RestComm… has had 22,150 commits made by 117 contributors representing
3,240,672 lines of code, mostly written in Java with an average number of source code comments
has a well established, mature codebase maintained by a very large development team with
increasing Y-O-Y commits took an estimated 938 years of effort (COCOMO model) starting with
its first commit in June, 2003 ending with its most recent commit about 24 hours ago
TeleStax leads and maintains the following Open Source projects that constitute the RestComm
Open-Core family. Telestax offers a carrier grade, commercial quality product under the brand
TelScale which is based on the RestComm open core. See our Open Source or Enterprise Grade
page for more.
6
See below for the full list of open source projects, TeleStax is driving
7
e. It’s good to make extensive use of GitHub Labels. We have created a number of
specific labels that help us filter better the milestones and associated issues. There
is two specific ones that are worth spending some time on.
i. Help Wanted Label: This label tags all issues that contributors can take to
help the project. Ideally, new labels with difficulty for each issue should be
added so new contributors can take the easy ones and as they get more
advanced they can pick harder issues and eventually get hired.
ii. Technical Debt Label: No matter what you do, there is always technical
debt accumulating for any project for various reasons. Instead of denying it
and having quality issues, we label clearly those issues and enforce that
they will be scheduled and taken care of in roadmap planning. For more
information on technical debt, please read this great technical debt article
from Scott Barstow
3. 2.3 Create Great Documentation
a. Even if it’s a higher initial investment to document the project it is mandatory.
(Team members can help by creating issues for missing docs.) R&D team members
should always have a draft of docs that can be tested and polished by
documentation team.
b. Any feature that is worked on need to be documented and usually documented
with examples.
c. The better the project is documented the more people can find their way around by
themselves. This also means less community and customer support questions there
will be, thus freeing up time to move forward on the roadmaps faster
4. 2.4 Ship! - Release Cycles
a. Aim for 1 to 1.5 months release to stay agile and keep the community engaged with
fixes to bugs reported and new features. One feature and one technical debt issue
per person working on the project per release is good practice. The rest of the time
is spent on bug fixing and improving some areas, which may have been left behind
because of customer support overload, travelling or other factors.
b. It is very important to follow the release early, release often strategy to keep the
community engaged and allow for small fast incremental improvements instead of
big monolithic releases with big impact on stability or changes.
5. 2.5 Versioning
If you’re a project lead, we are following the Apache Conventions for Versioning i.e.,
Major.Minor.Patch. So usually your Maven pom file will have a version similar to
Major.Minor.Patch-SNAPSHOT. However, our Continuous Delivery will be responsible for
continuously releasing every time there is change in the master branch of the project. As a
result, the final version will be Major.Minor.Patch.BuildNumber.
9
7. 2.7 Marketing
Be prepared to spend time on not developing your project, and evangelizing the project
instead, which includes;
a. Publish on social networks (Tweets, FB, LinkedIn, …) at least weekly or when
working on a new feature.
b. Always do a blog post and publish it on social networks for every release you make.
8. 2.8 Contributors
10
From our experience on Mobicents and RestComm, TeleStax team noticed three kinds of
users:
a. Regular users : who use your product and ask questions and after being
comfortable also answer questions
b. Contributors : who use your product, ask questions, answer questions and
contribute code
c. Certified Partners: At Telestax, our partners are essential to the success and
growth of our business. As our business grows, we are more and more focused on
building strong partnerships that strive to execute on a shared vision and strategy
that is based on trust and transparency. The Certified Partner commits experts
from their own team to be Contributors so that the partnership is built on the
foundation of openness, community and competencies. This enables our partners
to ensure they have insight and input on our product roadmap, access to sales,
marketing, and technical resources from the Telestax core team. This also allows
TeleStax to recommend to its customers, certified partners that are deeply
involved and recognized experts. Read More on the TeleStax Certified Partnership
Program
There is also multiple types of possible contributions, not necessarily code only :
a. Using it in your product or project and providing feedback.
b. Code & Algorithms: Core Projects, Incubator projects, Frameworks
c. Use cases, feature requests: Roadmap influence
d. Community Support, bug fixes, forum posts: Help to be helped
e. Documentation: Everyone needs good docs, Code is a moving target.
f. Testing (Perf, load, security, unit tests, interop, ...) / CI
For b, e and f it’s mandatory that the Contributor signs the TeleStax Contributor
Agreement. When a contributor contributes to the project, acknowledge him on a
public Acknowledgments page
As the Contributors ratio grows, you now become the leader of the project who gives the
direction, the goals and works on keeping everything coherent and aligned.
Contributors are usually naturally attracted if the project lead executes correctly on doing
all of the above i.e., great product with regular updates and bug fixes, great documentation,
marketing and keeping the community and contributors engaged. But remember,
contributors are a very small percentage of the user base usually and it takes time and
effort to attract them but it’s key to engage them as the best of them become part of the
team as the company grows as it is our only Hiring process.
11
9. 2.9 Licensing
RestComm is licensed under AGPL : See community obligations on AGPL Code
http://info.protecode.com/bid/40416/AGPL-and-the-cloud-what-are-your-obligations
Use the below AGPL license header for source code
/*
* TeleStax, Open Source Cloud Communications
* Copyright 2011-2017, Telestax Inc and individual contributors
* by the @authors tag.
*
* This program is free software: you can redistribute it and/or modify
* under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation; either version 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
Modern IDE can automatically add license header for every new file you add to the project, check
the links below:
● https://wiki.eclipse.org/Development_Resources/How_to_Use_Eclipse_Copyright_Tool
● https://www.jetbrains.com/help/idea/15.0/generating-and-updating-copyright-
notice.html
i4 Development Process
Contributor is used as term below to describe either a team member or community contributor
The model we've chosen for developing RestComm is somewhat akin to this one
http://nvie.com/posts/a-successful-git-branching-model/ where each contributor will create their
own branch to work on an issue and do a Pull Request so it can be merged to master.
Here is a visual view of it
2. 4.2 Design
i. Any new feature should go first through a design round which includes producing a
mix of architecture documents, diagrams and supportive documents which should
13
3. 4.3 Implementation
i. 4.3.1 Code Quality
Each contributor should write good code that is well tested and documented.
The maven process guarantees that the code is indented correctly as per our conventions.
The contributor must make sure that the project license header is present in all files
contributed.
The contributor shouldn’t in general commit code that is tied to multiple issues at the same
time. 1 commit == 1 issue, it makes it easier to understand, review, break down and
potentially backport a commit.
4. 4.4 Tests
i. 4.4.1 Non Regression Tests
Every feature or bug fix needs to have at least one meaningful automated non regression
test along with the code that is committed. If there is no tests, then the contribution will
not be accepted. This is to guarantee the quality of the project as the codebase evolves.
5. 4.5 Documentation
At TeleStax, we treat Documentation like any other piece of code and it follows the same
processes and rules. We currently use the great AsciiDoc and AsciiDoctor to write, theme,
publish and version our documentation.
Our source documentation (the raw content) is hosted on github itself which means
anyone can actually contribute to it as well.
Our Source Documentation is bundled with every project at the same location ie
docs/sources-asciidoc. By example,
https://github.com/RestComm/sip-servlets/tree/master/docs/sources-asciidoc/src/
main/asciidoc.
15
As we can version control the diagram independently from referenced document, and we
prevent duplications in case we want to insert the diagram in different documents.
Another advantage, is that the document will be “automatically” updated when you change
the target diagram (that is, on next document generation the same URL will deliver the
new diagram). You may insert the diagram directly/embeddedCode or
indirectly/encodedURL:
● Direct access: As described in Loading Diagram From External Files you may insert
a diagram from external file (using relative path to actual file location). Following
snippet shows an example:
“plantuml::uml/replication-confirmed-seq-diagram.plantuml[format="png", align="center"]”
16
If the diagram needs to be included as part of any Restcomm documentation, you may
tweak the diagram style to be inline with Restcomm branding by adding this into your
Plantuml code:
“!includeurl https://raw.githubusercontent.com/RestComm/design/master/telestax-
style.plantuml!0”
v. 4.5.6 Hosting
We are currently hosting our documentation at github on
https://github.com/RestComm/restcomm.github.io. This is using Github Pages so the
documentation is available at restcomm.github.io and
http://documentation.telestax.com/core/sip_servlets/SIP_Servlets_Server_User_Guide.ht
ml which is a CNAME to Github Pages.
Contributor design documentation is usually done in Design and can be written in AsciiDoc
too and people can comment on it through github. A Google document can be created too
to be reviewed and commented upon during the review and then later on migrated to
AsciiDoc
(https://chrome.google.com/webstore/detail/asciidoc-processor/eghlmnhjljbjodpeehjjcgf
cjegcfbhk)
1. Everyone (public and team members) should open an issue for missing docs. This
also goes for questions that are asked in forums or on Zendesk. This also includes
flagging old and outdated information.
2. Developers/support team members should write a draft
3. Doc team (now PLG) will test and polish
4. Continuous Documentation will build and theme the documentation
It’s important to reference the Issue number created in Everything starts with an issue as
Github automatically link that commit to the relevant issue. That allows for one issue to
have the track of all relevant commits associated to it.
It's highly helpful when coming back to it later if an issue is detected or when backporting a
particular issue to a different branch. (Important for Productization of the code base). See
https://github.com/blog/957-introducing-issue-mentions and
https://help.github.com/articles/closing-issues-via-commit-messages/.
As we use the excellent Waffle.io for visualization and maintaining of the current
roadmaps for our open source projects (by example
https://waffle.io/RestComm/RestComm-Connect), it is recommended to follow their
naming convention and workflow at https://help.waffle.io/automatic-work-tracking/auto-
work-tracking-basics/recommended-workflow-using-pull-requests-automatic-work-
tracking.
First pull in all of the latest changes from upstream, apply them to your master branch,
then rebase your feature branch against master before merging it into master and pushing
it upstream. (Note: Please see Git Useful Commands if you’re not familiar on how this works in
Git)
Go to your online clone repo and navigate to the page with details on the branch to be
reviewed. By example,
https://github.com/your_github_account/RestComm-Connect/tree/development and click
the green Pull Request button.
or a project plugin that adds new functionality. Those patches can be disabled at
any time and project will run fine.
● Critical: Critical level patches are those that affects project’s core functionality and
are of a critical importance. Patches of that level, changes the way project handles
core or important features and those patches can turn project unstable if there is a
problem. For example, patches that handle API requests or message parsing etc.
The pull request review process of section 9 is still valid but according to the level of
importance of the patch, the pull request can be handled as following:
● Minor level patches: For minor level patches a team member can directly commit
to master branch. It is still required for a contributor to create a Pull Request for
minor level patches and any team member can review and merge the patch but not
necessarily the project lead maintainer
● Major level patches: For major level patches a Pull Request is required. The review
must be done by at least another team members but not necessarily the project
lead maintainer. Important here is to have 2 pair of eyes to check and test the
patch, the owner of the patch and one more team member. Important also is to
merge the patch to master in a disabled state (for a new feature or plugin), this way
the patch will not affect project’s core functionality and can be tested in isolation.
● Critical level patches: For critical level patches a Pull Request is required and the
review must be done by at least two team members similar to Major level patches,
first will be the owner of the patch and then one more team member, but this time
the second team member must be the project lead maintainer. The project lead
maintainer will do the final review and accept the patch.
In any case, project lead maintainer should be notified for all Major level patches and for
those Minor patches that could have some impact in the project.
The level of importance of each patch should be indicated in the equivalent issue.
In the case where the level of importance is ambiguous, it should be discussed with the
team members and maybe update the documentation here to provide more clear view of
the level of importance and more examples.
5 Q&A Process
RestComm Continuous Integration runs for every project regularly when code is
committed to the master branch. It ensures the code compiles correctly and all the
automated tests are run and there is no regression of the code base then it proceeds to the
next stage of releasing the software through the Continuous Delivery .
● bug-<githubIssueId>
● hotfix-<githubIssueId>
CI system will automatically detect the new branch, and will trigger a new CI job run for
every commit. Developer should be aware the actual trigger will only happen during Push
time, and apply to the set of commits included in the Push. Developer should try to find a
trade-off of pushing changes, between CI cost and regular branch updating. Is expected at
least one push every day, so CI may provide updated status of testsuite for the branch. In
the other hand, pushing more than one time every hour is considered costly for CI
environment. These are only hints, and developer needs to find its proper Push frequency.
During WorkingOnFeature state, the CI environment may apply Categories to lighten the
job execution time.
Once the developer considers the work done, a PR will be filed using the dev branch. At
this point, WaitingPRReview state, the CI system will run the full Testsuite providing test
results for the PR/Branch. The PR will not be merged until all tests passed, or agreement
on applying Unstable or Broken categories to existing test cases is reached between PR
Author and Reviewer..
6 Release Process
Since we are using Continuous Delivery, every build on the Continuous Integration services is
potentially a release that can be used to formally create a stable release after the necessary smoke
manual testing has been completed.
It’s a good practice to blog regularly about your work on a personal blog such as medium on the
work you’re performing. Usually blogging after an important milestone is reached and before a
new dev cycle begins makes sense as you have things to talk about that you introduced in the past
release and as it is usually time consuming as not to impact the roadmap schedule.
25
It’s important to blog about your work for multiple reasons : if you don’t write about it, nobody will
know about it, to share knowledge and help others in the open source spirit, to get feedback from
the outside world on your work and stay honest, to be recognized more and more as an expert in
your domain and create a network of like minded people. It also helps attract people to your open
source project and grow the community and ecosystem around potentially leading to attract new
contributors or future hires.
7 Hiring Process
Even though, TeleStax has a traditional jobs board, for any of those jobs to be awarded the
candidate has to go through the same process that everyone in the company went through (even
the TeleStax co-founders), i.e., contribute to the community in one way or another.
Again contributions take various forms, it’s not only about code contributions. Let’s break it down
into a couple examples :
● R&D Position : Obviously this one is one of the most technical one, requires design, testing,
documentation, code contributions, community support on the Google Group or
StackOverflow and spent a sensible amount of time participating.
● L1 Support Position: This one requires mainly to provide community support for usability
type of questions. Pointing the users to the right piece of documentation mainly
● L2 Support Position: This one requires to provide the same as L1 Support + some
contributions in terms of simple or more elaborate code fixes, documentation and testing
as well.
● Solution Architect Position: This one requires similar contributions as L2 Support Position
and an ability to see the bigger picture and help on roadmap ideas, and new feature design
discussions.
● Management/Sales/Marketing Positions: This one requires that the candidate creates a
RestComm Application through the RestComm Visual Designer or through the RestComm
API that will improve existing processes or could be relevant in the market. Those
applications would ultimately be available on the RestComm Application Store. We and
the community provide a number of applications ideas in the open to be developed that
can potentially be sold to the operators we are working with. They can also contribute blog
posts on TeleStax blog post as guests.
This is actually the best hiring process we ever stumbled upon as this contribution period allows
both sides to understand if they like to/are comfortable:
● Working with the team - people first
● In a distributed manner - home office.
● Across so many timezones
● And so many languages and cultures - English is the common language.
● Understand our open source platform value proposition and model
26
○ considerate (especially for time. If unplanned issues come up, or priorities change,
and require suspension of planned work)
○ ability to set a deadline and meet it
● Ability to spot tech debts
● Ability to propose improvements
● Ability to support community
● Ability to self-manage
28
IMPORTANT: Please use the Github integration to use the commit message to tie the commits to
the Issue you're working on. More information on that can be found at
https://help.github.com/articles/closing-issues-via-commit-messages
IMPORTANT: When your change is pulled into the main RestComm source, the change
description that you entered here will show up as changes in the main RestComm source, so
please use a meaningful description - fixing bug, making changes, etc. are not ok, please instead
use something like fixing transform bug caused by NPE, etc. so that it makes sense in the context
of RestComm as a whole, not just your clone.
IMPORTANT: Your SSH key might need to be added to github to fetch latest Restcomm
repository. You can add the key by following this.
If you have any new files, make sure to use the following command before committing
git add <file or directory>
You need to add a remote via which you will identify the upstream repository:
git remote add upstream [email protected]:RestComm/RestComm-
Connect.git
Now whenever you want to merge upstream changes into your clone, do the following:
git fetch upstream
git merge upstream/master