As for today, getters and setters of items in this API are purely synchronous. There might be no impact in async environments like node.js if the storage is all cached in memory. Still, some events exists to inform other threads (workers, windows...) when an item is updated
We are looking for representatives of this HTML5 API to discuss of potentially needed updates to consider server-side implementations
The current Issue in the Web Storage Recommendation is about data collisions:
- The use of the storage mutex to avoid race conditions is currently considered by certain implementors to be too high a performance burden, to the point where allowing data corruption is considered preferable. Alternatives that do not require a user-agent-wide per-origin script lock are eagerly sought after. If reviewers have any suggestions, they are urged to send them to the addresses given in the previous section.
What is acceptable here on client-side might not be acceptable on an application server which might need some lock mechanisms
SessionStorage is a very good candidate to manage sessions on the server.
lock() and unlock() methods have been added to prevent collisions. As for today, such collisions might happen in the browser if there is multiple windows or worker contexts.