- From: Qinglin Song <notifications@github.com>
- Date: Sun, 07 Nov 2021 23:09:05 -0800
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/manifest/issues/1019/962868701@github.com>
@marcoscaceres Thank you so much for sharing your insights. I totally agree with you that it is the developers' job to avoid race conditions. But the intention of our proposal is to advocate a specific design in browser to support singleton-only PWAs. The Sudoku example may be somewhat misleading here. What we want to show here is that if the developer of the Sudoku PWA doesn't want multiple games to be played at the same time, they can easily declare the PWA as singleton in the manifest and the browser will do the rest of the work. Why do we think a singleton running pattern is crucial?Because historically, web browsers have many singleton only components/features. Chrome, for example, can have only one single main process that manage resources and assign work to child processes. Chrome's history tab and downloads tab are also supposed to be singleton (although users may work around it through some "hacky" ways). In desktop environments, some programs such as some system utilities and daemons are also restricted by the operating systems to have a singleton running pattern. And because, PWA is created as an alternative to native apps and we want the PWA to be "more app and less web". As you mentioned, PWA can be in 4 possible display modes but the majority of them only chose standalone to have a app like look. And on mobile devices, we expect each app to just have one running instance. Allowing a PWA to be singleton only can better simulate the native app user experiences. And in our daily work, we encountered multiple situations that required some PWAs to be singletons. For instance, an online exam PWA that wants students can only open one exam window. And imagine what would happen if you command your character to turn right and turn left in an online game at the same time on two PWAs. It is up to the browser developers to determine how to support the singleton running pattern. One possible solution is to forbid singleton-only PWAs to be on browser display mode. In my opinion, allowing PWA to be singleton only is one more level of "progressive" that can greatly expand the functionality of PWAs and benefit PWA and browser developers tremendously. Again, thank you for your thoughtful comment. If you have any further questions and discussion, please feel free to comment on my reply. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/manifest/issues/1019#issuecomment-962868701
Received on Monday, 8 November 2021 07:09:18 UTC