kf6kjg / WHIP-LRU

WHIP-LRU is a WHIP-protocol-compatible asset cache and server for Halcyon-based servers, such as Inworldz.
MIT License
3 stars 2 forks source link

If a remote server repsonds to a PUT with "I've already got it" the remote edition should be brought local #5

Closed kf6kjg closed 6 years ago

kf6kjg commented 6 years ago

This keeps the local copy in sync with the remote server when two clients PUT two different assets with the same UUID and the current WHIP-LRU instance wasn't a party to one of the PUT operations.

kf6kjg commented 6 years ago

Even worse is a tiered architecture: Server A, Server B, and Server C. Server A has a region connected to it and sees Server B as upstream. Server B sees Server C as upstream.

Any fix has to make PUT operations synchronous with the response: the current instance cannot respond until it knows about the upstream's status. Storage to disk also has to be dependent upon upstream success or you risk duplicate asset attack vectors.

kf6kjg commented 6 years ago

Also there's nothing in the WHIP protocol that can communicate "I've got it already": there's only ERROR with UUID and arbitrary human-readable string. Thus any upstream error needs to result in a PURGE from all upstream servers and an error response to the putter.

That statement is FALSE: a response of FOUND could be used to indicate such a thing. However WHIP doesn't doe that ATM: instead it responds with ERROR and a message of "Duplicate assets are not allowed."

kf6kjg commented 6 years ago

Closing because the only client for PUT is the Halcyon region server, it synthesizes all asset IDs, and system engineers and admins should be able to trust their region servers in the current environment.