JavaScript: From Closures to Autonomous Systems

Interlude. Revoking What Has Already Been Delivered

Part IV. Distributed Reactivity3 min

Interlude. Revoking What Has Already Been Delivered

In the PDF storage I have already described, documents lived in folders, and a folder could be shared with another person, for example an accountant or a lawyer. To share, the person was added to the folder’s access list, and the publication started sending them documents; to revoke access, they were removed from the list. At least, that is how it looked in the interface.

While testing this scenario, we opened the folder as a second user, removed that user from the list in a neighbouring window and went back to look. The documents were still there. New ones added after the revocation no longer reached them, but everything they had seen before was still in their list and still opened. The cause was the one discussed in the sixteenth chapter: the publication read the access list once, when the client subscribed, and never learned that it had changed. After a page reload everything was correct. Had a real user been the first to find this case, a company’s former accountant would have seen its documents for several more hours simply because they had not closed the tab.

Free, one step away

The rest of the book is free

Leave your email and I will send a link to confirm it. Once you click it, every chapter opens here, on this device, for a year. When a new book comes out I will write to this address; reply “stop” to any email and I will not write again.

Have an INITE account? Sign in and the book opens without an email.

I do not charge for the book. If you would like to support it, you can donate from any chapter.

How your email is stored