question

krzysztofjanik avatar image
krzysztofjanik asked

Azure Functions game udpate,How to handle updates of Azure Functions?

Hi, I'm wondering about updates of the games. My scenario is that we have mobile game build released (let's say it's version 1.0) and we use azure functions throuth playfab. We want to update game to version 2.0 and also update code on azure (new version should use new version of code). Is there a good way to handle this?

CloudScript
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

krzysztofjanik avatar image krzysztofjanik commented ·

to clarify I assume that not all users will switch to new version of game instantly, and they should be able to use old version of azure functions code

0 Likes 0 ·

1 Answer

·
drew avatar image
drew answered

Are you forcing all users to update the game? if so, just push the client and server builds at the same time. If you aren't forcing users to upgrade, and the newer game client can use newer versions of your azure functions, just version your API, keeping it completely backwards compatible. For example, if you have a PlayerUpdate function, you can leave that how it is, then add a new function called PlayerUpdate/v2, and have the new game client call that function instead.

7 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

krzysztofjanik avatar image krzysztofjanik commented ·

@drew I Could you expalin more what you mean by "version your API". You mean to have copy of all code for two versions of client?

0 Likes 0 ·
krzysztofjanik avatar image krzysztofjanik krzysztofjanik commented ·

We don't want to force update on users since new version is not available to all users at once (when realeased in Google Play)

0 Likes 0 ·
drew avatar image drew krzysztofjanik commented ·

You would not have to copy any code to do this.

[Function("DoBackendThing")] DoServerThing()

[Function("DoBackendThingV2")] DoServerThingV2()

Your original code stays the same, and your new code lives in the new function. If you write your backend using well composited object oriented code, you wont have to copy any code to achieve this pretty easily.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.