

Ask HN: How to hobble open-source library for free license tier - dougk16

To all the crypto enthusiasts here: let&#x27;s say I had a library that I wanted to open source and there&#x27;s a free tier and a paid tier. In order to incentivize people to the paid tier I somehow hobble the code that&#x27;s hosted on GitHub. The paid tier people would get e-mailed a version that&#x27;s functionally and almost source-wise identical but just a bit &quot;faster&quot; somehow. For a contrived example let&#x27;s say it&#x27;s an Android library that polls battery level...the free tier polls it every 10 seconds and the paid tier polls it once a second. Obviously I could have a configuration variable that&#x27;s different for each tier, but that&#x27;s easily changeable if you want to get around the license.<p>I want to harden it to an extent that it&#x27;s just too much of a pain to try to hack around the free license limitations for your average developer, but doesn&#x27;t have to be bullet-proof. One constraint is that it can&#x27;t go out to a server. Has to be all self-contained client-side.<p>A half-baked idea that sprang from my complete beginner crypto knowhow:<p>The hash of some parts of the source code (internal method and class names, etc., accessed runtime through reflection) results in the configuration variable. Library is for Android in Java by the way but answers for other languages&#x2F;runtimes would be cool too. Can&#x27;t figure out a good way to prevent subsequently modifying that variable at runtime though.
======
mindcrime
My gut feeling says "Don't do that, it won't work." Doing an "open core"
approach _can_ work (although to be honest, I'm not fan), but it's one thing
to have a paid version that adds real value on top of the open source version.
But when the _only_ difference between the two versions is that one is
intentionally "hobbled"? I don't think developers are going to go for that. I
know I wouldn't. To be honest, it sounds and feels like the kind of thing I'd
expect from Microsoft or CA.

I'd say just go with a proprietary library across the board, or a completely
open source library, and not try to be both.

~~~
dougk16
Agree with all of what you said and thanks for responding. The hobbling I have
in mind is targeted such that it wouldn't practically impact users that
probably wouldn't pay anyway (class projects, hobby projects, etc.). I'm
probably not getting that point across clearly and my actual situation would
take some time to explain.

Overall this is more a thought experiment than something I'm actively
considering though. The more realistic approach I'm going to take is either
open core or dual license.

