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

2 points by dougk16 ↗ HN
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 ] thread
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.

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.