DEV Community

Luis Uriel Leaño
Luis Uriel Leaño

Posted on

Best way to manage new versions of my project making sure all client sessions are updated to latest version ?

Discussion (10)

Collapse
rhymes profile image
rhymes

Are we talking about a native app? I guess you can send notifications to customers urging them to update the software but I'm not sure you can force them to upload. Communication is the key.

For a web app you can show a notice telling the client to refresh because there are new features

Collapse
luigi_leano profile image
Luis Uriel Leaño Author

Hi rhymes , thank you so much for your answer. We have a web app made it with Angular 4.4.7,; the notifications are something that we have in mind but also we are looking for more options, to know if there is a better way to do it. Another suggestion is welcome. Thank you so much.

Collapse
rhymes profile image
rhymes

What if you send an update message through a websocket/SSE from the server to the client? Then you tell the user about the new update saying "new features are available, please refresh".

Something like that

Thread Thread
luigi_leano profile image
Luis Uriel Leaño Author

Yeah that is what we actually have implemented, it works ! Thank you so much.

Thread Thread
rhymes profile image
rhymes

You should write an article about it :D

Thread Thread
luigi_leano profile image
Luis Uriel Leaño Author

Sounds good , i will do it. Wait for it ;)

Collapse
toastking profile image
Matt Del Signore

I feel like this is tough to do in a way that isn't running into antipatterns. If it's a webapp then you can always deploy the newest code out to all users. If it's a desktop app then you can create processes to auto update the application on start up. A word of warning - users, especially enterprise users, may get angry if their programs change out from under them too much.

Collapse
luigi_leano profile image
Luis Uriel Leaño Author

Hi Matt thank you for answering. My team and I have a web application made with Angular 4.4.7 ; i agree with your suggestion about the deployment of the new code, but the problem comes when some users logged in(for different reasons) never refresh the browser and they are still able to make requests to the server using the older version. We are trying to handle this issue the best way possible so if you have another suggestion i will be happy to read you. Thank you so much.

Collapse
toastking profile image
Matt Del Signore

If the issue is backend code you could use semantic versioning. Have new users use /v2/api/... and old users use /v1/api/... for example. Or is it that frontend code changes drastically?

Collapse
joshualjohnson profile image
Joshua Johnson

Own the hardware/software that clients run on.