-2

We have a product that contains features (Let's say feature A, B and C).

We are about to move it to production (a web application) for a certain client.

However, as per my boss, we will deploy the product to the client's premises. The client will also have the source code.

Now, my boss wants to restrict the features for that certain client. He wants to restrict the feature A, so that only features B and C would be available to the client.

So what are our options? How can we do this technically(restricting features) and in terms of licensing?

2 Answers 2

2

A non-software engineering answer: you disable the feature in config and write in the contract with the client "thou shalt not modify the config file". If you don't trust your client, you've got bigger problems than whether they use feature A or not. This is the easiest option for everybody.

A software engineering answer: branch the code, remove all of feature A, build special binaries from that source, install those at the client and give them that source code. This is obviously a lot more work, so evaluate whether it is cost-effective or not.

5
  • 1
    It might be easier not to branch, but to use a preprocessor to remove all traces of the non-licensed feature in the published code. Apr 14, 2019 at 13:53
  • Branches are easily reverse-engineered in source code and even in binary executables
    – Christophe
    Apr 14, 2019 at 17:05
  • @Christophe Wrong type of branch. They are talking about branching in version control, not branching in machine code.
    – wjl
    Apr 14, 2019 at 17:11
  • @wjl Ah sorry ! this would make sense of course ! Of course the code should be designed in such a way to facilitate these branches and avoid a version explosion.
    – Christophe
    Apr 14, 2019 at 17:27
  • @Christophe Ha ha! But of course you are totally right that just jumping around stuff in the source or binary is very easily reverse-engineered.
    – wjl
    Apr 14, 2019 at 22:18
1

It all depends on your code structure. The safest way is not to deliver the code with the feature. This requires to manage the configuration at delivery:

  • if your special feature is in a separate module/compilation unit, replace this module with a stub to inactivate the feature in the source delivered to the customer
  • with a clean OO design you may use an abstract interface to integrate your feature in the code without creating a dependency to the class implementing the feature (e.g. with the strategy pattern or similar techniques). You may then deliver to the client a version with a class that complies with the interface but doesn’t implement the feature.

A more difficult approach is to make the feature dependent on something that you control (e.g. a remote function call or a web service) that you could then activate selectively through a customer account / serial number or similar identifiers. This would be a kind if run-time configuration. Of course, the missing part must be complex enough that the customer cannot just provide a clone.

Finally you may opt for license restrictions. The way and the purpose your software is used can be restricted by contract (if you control the license scheme, i.e. no open source license requirements). Same for software changes. Depending on your market this may or may not be respected. Note also that you’d need qualified legal assistance on this option, since law heavily depends on your jurisdiction.

Not the answer you're looking for? Browse other questions tagged or ask your own question.