Release Management - releasing to a subset of users - how would it work for a public facing website

前端 未结 7 1904
长发绾君心
长发绾君心 2020-12-24 02:42

I read somewhere (sorry don\'t exactly remember the source) that facebook has release Tuesdays. They release the new features to their internal employees first, then to a sm

7条回答
  •  轮回少年
    2020-12-24 03:45

    At my company we almost always do any major release in a staggered fashion. We achieve this by adding a flag for every new feature in the users table. By default this flag is set to false; and as we are rolling out the feature to more users we simply switch the flag in the DB table.

    This means at the application level, we have to make sure at all places we check for this flag. The code push goes to all servers. DB changes are made; but still only some users see the new feature.

    At the database level, we make sure that any changes to SPs are "backward compatible". This is done by following some simple rules:

    1. Any new parameters added to the SP have to go to the end of the parameter list.
    2. New parameters should have a default value. This is done so existing calls to the SP does not break.
    3. If existing parameters to SP has to be changed (or if order of parameters has to change), then obviously all calls to the SP is changed. But the SP is coded in such a way that it supports users that have the feature enabled as well as users that don't have it enabled.
    4. Most table changes are related to adding new columns. It is really rare when we have to modify an existing column. All new columns are added with a default value or the allow NULLs.

    As for the API, most of our parameters are passed as custom objects(structures). This way we can add a new parameter to the API methods and still prevent existing calls to the API from breaking.

    Also, for each user we store the API version they are using. Depending on the version, users go to a different API URL. So basically when users make the first API call to authenticate, we pass a new API URL (based on API version for the user). For all subsequent calls, they are supposed to call the new URL. Salesforce.com also follows this for their API calls.

提交回复
热议问题