Ask HN: How to hobble open-source library for free license tier
To all the crypto enthusiasts here: let's say I had a library that I wanted to open source and there's a free tier and a paid tier. In order to incentivize people to the paid tier I somehow hobble the code that's hosted on GitHub. The paid tier people would get e-mailed a version that's functionally and almost source-wise identical but just a bit "faster" somehow. For a contrived example let's say it'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's different for each tier, but that's easily changeable if you want to get around the license.
I want to harden it to an extent that it's just too much of a pain to try to hack around the free license limitations for your average developer, but doesn't have to be bullet-proof. One constraint is that it can't go out to a server. Has to be all self-contained client-side.
A half-baked idea that sprang from my complete beginner crypto knowhow:
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/runtimes would be cool too. Can't figure out a good way to prevent subsequently modifying that variable at runtime though.
2 comments
[ 4.1 ms ] story [ 19.3 ms ] threadI'd say just go with a proprietary library across the board, or a completely open source library, and not try to be both.
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.