How the Cowboy web server and the Kato messenger help each other: A little about Erlang and open source

    image

    Most of the services and products that we all use every day were built using open source technologies.

    For example, Facebook employees created “open” initiatives of Cassandra and React , and recently even such “closed” apologists like Microsoft, who previously tried to destroy the open source movement, have begun to open up their designs (the Redmond corporation made the .NET platform open ) .

    When creating the Kato messenger, an open tool for processing requests with very high intensity was used - the programming language and the Erlang virtual machine. This platform is used by many popular projects and companies (examples are Amazon, Goldman Sachs, RabbitMQ, WhatsApp, Whisper). There is a large community of developers writing Erlang libraries. With the help of one of them, the Cowboy web server, the Kato messenger was created - today we will tell you more about the history of this open source project.

    A little background


    The first version of the Erlang platform was developed by Ericsson employees Joe Armstrong, Robert Wirding and Mike Williams in 1986. Initially, the language was closed and was used exclusively in the company's internal projects (for example, with the help of it the AXD301 switch was created, which achieved a nine-nine fault tolerance indicator of 99.9999999%), but later Ericsson management refused to support the internal programming language (it was decided focus on Java and other open platforms). As a result, in 1998 the use of Erlang in Ericsson's projects was banned (this was the reason for leaving Armstrong, as well as other language creators and developers who used it), but subsequently the platform code was unexpectedly opened under the Erlang Public License.

    Erlang developers who left Ericsson after the discovery of the language continued to develop it (created startups, consulting companies, wrote books). Over time, Ericsson's management lifted the ban on using Erlang in their own projects, and in 2004, Joe Armstrong and some other representatives of the "old guard" returned to the company. There is currently a powerful global community of developers creating products on the Erlang platform.

    The right web server on Erlang and creating a Kato startup


    One such development is Loic Hougen (Loïc Hoguin). A few years ago, he decided to create a web server on the Erlang platform, which would be devoid of the disadvantages of other similar products. So the magnificent Cowboy web server was born (there was already an article about working with it on Habré ).

    image

    Illustration for the description of the Cowboy web server from the project website

    Thanks to this library, we managed to launch a working version of the messenger in a few weeks. This, in particular, allowed us to get into the well-known Techstars startup accelerator and attract investments - in many respects, the project took place precisely thanks to the existence of such a tool as Cowboy.

    There are many projects that Loik Hogen helped with their development, but in our world this fact alone does not guarantee a decent life for its author.

    What to live for an open source developer


    In January 2014, Loic published a post on his blog in which he talked about an important, but rarely raised topic - the development of open (and free) projects when it is necessary to pay for an apartment and buy food. Loic, a talented developer who could continue to bring tremendous benefits to the entire Erlang community, was forced to engage in consulting and custom coding in order to earn a living.

    An illogical situation arose - with the help of Loic's open projects, dozens of companies around the world can create products (including commercial ones), but the developer is forced not to do things that could be useful to all members of the community, but to work on closed commercial projects.

    image

    Speech by Loic Hogen at the Erlang DC conference in February 2013.

    As a result, the issue was resolved by introducing a sponsorship mechanism for the work of the creator of Cowboy. The sponsorship scheme for open source projects is extremely simple - interested companies (or individual teams within the company) transfer certain amounts of money to the developer, and in return receive a better product, because he has more time to work on it (in addition, the company has the right to rely on a personal approach when you have questions about the introduction of technology into your products).

    The first project to provide such support to Loic was LeoFS.whose team is working on distributed file storage. After reading Loick's post, we also decided to help - since February 2014, Kato.im has been providing financial support to the creator of Cowboy every month.

    This step allows you to kill two birds with one stone - the developer gets the opportunity to develop a useful project, and sponsors (in addition to moral satisfaction) get priority in eliminating the errors they find, and their names and links to sites are located on the Cowboy home page and in the project’s README file.

    Why sponsor open source projects


    At Kato, we don’t have a lot of resources that could be used to support open source projects, but we always share with the open source community our code changes and solutions to problems that we have discovered. Without the efforts of the creators of Erlang and Cowboy, our startup would not have been, therefore, we will always help open projects and encourage other companies to support projects like Cowboy and their creators.

    image

    The power of open source is to combine the efforts of large companies and independent developers. Ericsson has invested tens and hundreds of millions of dollars in creating the Erlang platform, but without the efforts of developers who create libraries and various tools on this platform, it would not have been so widely used.

    This cumulative effect makes possible the emergence of many projects that improve the lives of millions of people. Thus, each member of an open community is an investor in projects around the world - the success of each of them can equally depend on the work of thousands of employees of a giant corporation and on the efforts of one person.

    Also popular now: