-
Notifications
You must be signed in to change notification settings - Fork 79
Scripting with one identity
One identity is a feature of CIRC that allows multiple devices to use the same IRC connection. One device acts as a server and the other devices act as clients.
When scripting was introduced to CIRC, several issues arose of how to integrate with one identity.
Should scripts run on only the server device? On all devices? On the device it was installed on?
When a script is installed, should we install it on all devices? If yes, then...
- Do we save scripts in sync storage? Or send over a socket connection?
- If a client connects to a server and both have different scripts, do we try to install all scripts on both?
Should scripts save data to local storage or sync storage. If sync then... - When do we remove the storage? What if another device is using it?
The solution that was decided upon is to save scripts to local storage, but allow scripts to save information to sync storage. When a script is uninstalled, it's sync storage is removed, even if another device with the same script installed may have been using it.
This solution is simple, but also allows scripts to communicate across devices through sync storage.
Ideally scripts would be saved to sync storage, however this option was avoided because of the space limitation. See details here: http://developer.chrome.com/extensions/storage.html#property-sync.