Building a long lasting company around open-source - Dgraph Blog

Dgraph started with the idea that every startup should be able to have the same level of technology as run by big giants. We designed Dgraph from ground-up to allow data sharding, horizontal scalability, consistent replication, and a fast and distributed architecture.

We also dream that graph database would no longer run as a secondary database. By building a truly robust piece of technology, we can have our users run only one database, which allows arbitrarily complex queries while providing rock solid performance.

We have always thought of Dgraph as a company, where we can work for the next ten years. So, instead of hacking our way to market, we invest in good design, aggressive refactoring and a culture of logic and reasoning based decisions. But, running a company takes more than clean code and good culture. It requires a functioning business model, which can make a profit.

Profit allows providing highly competitive salaries. Competitive salaries make the company attractive to great engineers. Great engineers build and enhance great products.

To that extent, we’ve started working towards a closed-source enterprise version of Dgraph. This version would contain many features useful to companies, namely:

  • Cluster management and monitoring
  • User authentication
  • Access control lists
  • Data encryption, and more

Selling enterprise version and support would lead us to the path of revenue.

But, what about competition? How do we deal with the threat many big companies provide on a daily basis? The threat of duplicate commercial services and enterprise features built by them and others without paying anything back towards the development of the open source version. There is also the looming cautionary tale of RethinkDB ceasing to develop their database, due to lack of revenue.

We need to balance the benefits of open source to the community, against making the company building Dgraph profitable, while also keeping future competition at bay.

The change

One of the ideas was to move the distributed aspect of Dgraph to the enterprise version; like many others are doing. The argument goes that by making distributed aspect closed-source, the open source offering would have restricted usage for companies growing fast; and they’ll be forced to pay.

    But, it doesn’t feel right!
Many users love Dgraph because of it provides scalability without question. This goes against our inception idea that every startup should have the same level of technology run by big giants.

The “D” in Dgraph stands for distributed; we want to make sure that everyone gets it: big company, small company, pre-revenue, post-revenue, or one guy in a garage.

We don’t want companies to have to pay us just to deal with more query traffic. That should be free. Instead, we want to build features which are so useful to enterprises that they feel they can save a lot of expensive developer time by using our services. So, after talking to other open source vendors and top open source lawyers, we came to this solution:

Relicense the open-source version to GNU AGPLv3 (from Apache 2.0), while keeping the client libraries under Apache 2.0.

Known as the GPL of the web, GNU Affero General Public License mandates that any modifications made to the source code must be released under the same license. This applies not just to downloadable binaries, but also to code run in the cloud. You can read more about it here.

What does this mean for you?

Largely no change.

Most users of Dgraph would never need to modify the server code themselves anyway. We are going to keep the client libraries under Apache 2.0; which would allow users to continue using Dgraph (via client libraries) without any restrictions or mandates on their own codebase. In general terms, any work built on top of Dgraph wouldn’t be considered derivative work, as long as Dgraph server code wasn’t modified.

So, if you’re a user of Dgraph, nothing changes. If you modify Dgraph server code, you will have to release that modification back to the community under GNU AGPLv3. Thus, the entire Dgraph community would benefit from the contributions made to the server code by other individuals or companies.

This simple change ensures that only Dgraph Labs owns the rights to add proprietary features within Dgraph server code, which in turn allows us to charge for our services and make revenue.

Users of MongoDB would instantly recognize this licensing system. In fact, we were heavily influenced by them. MongoDB is one of the most successful databases and provided a great validation for this new direction we’re taking.

Living, breathing Open-source

While there is a talk of money, Dgraph still lives and breathes like an open-source company. In fact, by relicensing our code base under GNU AGPLv3, we can continue providing the distributed aspect of Dgraph under open source license; which gives us great pleasure.

Graph market is heating up. Every other day, we hear about products ranging from a graph plugin to a graph layer to a graph engine to a graph database. Given the desire to not only serve data but also understand it, there’s a need for graphs in companies; and people realize that.

With Dgraph, we think we’re in the right spot at the right time, ready to provide a graph database that scales with your business. And we’ll continue to do it in a way that benefits the entire community.

If you have any questions or concerns about this switch, please feel free to reach out to me at [email protected].

Top image: People landing on Mars via SpaceX


This is a companion discussion topic for the original entry at https://open.dgraph.io/post/licensing/
2 Likes

Thanks for writing that up.

What do you think of the points raised by bcantrill about the AGPL here The liberation of RethinkDB | Joyent ? It did not seem to be an issue for MongoDB obviously but he his raising it as an issue for RethinkDB.

I disagree with his assessment. In fact, his argument has confirmation bias. Joyent seems to feel strongly about Apache license; hence they consider licensing to be the reason why RethinkDB failed. If his argument was valid, MongoDB wouldn’t have climbed to become the top NoSQL DB while using AGPL.

coffeemug listed down the proposed reasons of RethinkDB failing based on HN comments here; none of which he identified with as the real reason of failure. His post mortem post lists the actual reasons for RethinkDB failure. One could argue that his assessment of his own company is flawed, but I’d take a founder’s assessment of failure over an outsider’s.

Google has popularly banned the use of AGPL within. That’s generally the most quoted argument against AGPL. Playing devil’s advocate, say a big company was using an open source software due to it being a more permissive license; does that actually translate to a profitable business model? I’d say no. In fact, they specifically didn’t want to pay for the entperprise version; using and integrating the software for free without paying back to the development of that software. That doesn’t really help the OS software that was used. It wouldn’t have helped RethinkDB.

Most open source projects work not because of one company, it works because of a sizeable community of individual developers. And largely, the community would have been happy with any open source license. AGPL does not take away the freedom of a developer to use the code, modify it, or run it for any usage. In fact, even for a big co, AGPL + Apache model, as the one we’re pursuing, offers practically all the benefits of using an open source software for free.

Thanks for the detailed response. I agree with your assessment and specifically with respect to build a business. Your response is quite needed since these arguments are being made a lot.

If the goal was just to start a free and open source project an MIT/Apache license might be best, but when trying to actually earn a living with it, a more restrictive license such as AGPL will be the best choice.

That said, a postmortem is not necessarily free of errors of judgement of course :slight_smile:

Since the go client library is inside the main repo that is licensed under AGPLv3, I think that would be good to make it clear if it is licensed as AGPLv3 or Apache 2.0 to avoid any possible confusion later between the blog post and the repository license.

The client code contains Apache 2.0 header. Additionally, we have both Apache and AGPL licenses at the root folder in the repository; to indicate this licensing system.

We’re also working on revamping our website and documentation, and we’ll have a dedicated page to clarify the licensing policy.

@mrjn, just wanted to say as a software developer and someone newly edging into the open source community, what you are doing at Dgraph in empowering the “little guys”, coupled with careful thought toward a sustainable business model as shown in this post, is really inspiring to me. Goes really well with the blog post theme photo :slight_smile:. Looking forward to seeing where Dgraph goes.

1 Like