Window.postMessage() IPC #827
saoirse-iontach
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
The core event bus actually hooks into the window messages, and iframe apps can use this to provide an IPC mechanism. This is very basic and only provides an interface with custom events. It would be cool to have a slave core instance as suggested here. Providing services over a mechanism like this is fairly trivial, but handling shared states (like sharing a session) will require some work. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I was thinking about threading and debugger API...
In order to provide a debugger, we have to run in separate threads, like Worker or Iframe.
On an other hand, we could integrate page from many origin into a same window using iframe.
A corner case is using a file:// served distribution...
In those case, we should use some IPC mechanisms in order to communicate with a unique OSjs Core.
What we could do is to use Window.postMessage() to communicate between different instances,
say one top master OSjs Core and many framed slave OSjs cores.
This IPC could also be used to have many browser Windows for a unique remote desktop.
By example to allow multipes desktops for a unique session.
In order to properly work, we'll need to provide a generic mechanism to proxify API and services...
(by example, OSjs.make('osjs/vfs') in a slave should provide an IPC proxy to the top master Core)
This also require some configuration and security (especially with file:// origin).
Beta Was this translation helpful? Give feedback.
All reactions