FriendUPCloud / friendup

FriendOS is a free web based platform that runs in your browser. It allows you to work and play, collaboratively, across devices.
https://friendos.com/
Other
347 stars 87 forks source link

cross-application communication APIs #59

Closed sashafirsov closed 2 years ago

sashafirsov commented 6 years ago

The ticket is about exploring available now, currently used and potential alternatives. EPA-WG is given for reference for such kind of cross-app communication API use.

Available in browser

Criteria for evaluation

purpose of cross-application data storage and communication

API matrix with criteria

since actual 2d matrix UI in github is not that flexible and most of bullet points would require extended elaboration, the matrix format actually a list of each criteria against each API entry.

window.postMessage

transfer useful helper allowing pass object ownership to destination.

window.localStorage

document.cookie

APIs support

EPA

embed-page is targeting to cover most of provided APIs and certainly the most popular among in-browser front-end frameworks. sessionStorage and localStorage implementation is ready; location.href is implemented without target attribute( app could not control another ), cookies are next on implementation.

friendup

Utilizes postMessage for cross- container communication. The data and events for application itself TBD.

CC: @thomaswollburg , @francois333 , @titlestad

sashafirsov commented 6 years ago

Just realized what is common ground of friendup and EPA. EPA is a runtime for running PWA applications on friendup desktop.

titlestad commented 3 years ago

We actually enabled cross app messaging in one of the previous releases. Postmessage is working very well.

What specific use case would we solve with this? PWA? How?

sasha-firsov-bs commented 3 years ago

PostMessage is just one of multiple APIs for cross-app communication. EPA tries to cover all starting with most popular. It also introduces the scope for groups of apps where those APIs could communicate through. The insulation allows to use existing apps without worry of cross-browser pages penetration. I.e. two persons windows using same app would not share scope unless instructed by container.

When you stated support for PostMessage I guess it was referencing to custom protocol requiring utilizing FriendOS conventions by app. In EPA app does not need to know about container and can use any communication api on it's own judgement according to w3c standards.

PWA are standalone apps loaded into OS. Not much popular but have a good support as it is cross-platform solution. If I would select own desktop/os, it would be one of platforms important to support as it fits to the concept perfectly. (Second would be java and android as remote terminal support you already have). PWA as browser-based apps could run in RDP terminal of course but also could run locally in same browser. The missing part for FriendOS is virtualization of environment where it runs. EPA could give that layer. PWA has all necessary attributes of application: icons, title, vendor credentials, security layer, window control,... and most important open cross-platform support. When running in desktop environment all should be kept in place and exposed properly to user. EPA could provide the integration and insulation layer as for web apps as for PWA within friendos desktop browser page.

xet7 commented 3 years ago

Wekan has PWA apps at:

Android Play Store and MS Store do cost about 30-50 euro/year each. Ubuntu Touch OpenStore is free.

Please note that:

More info about Wekan PWA:

titlestad commented 2 years ago

We have cross communication implemented now via application to application messaging. Check the developer manual on this. :)