Comments (3)
Ah, that's an interesting distinction to draw attention to!
Perhaps we should say more clearly that "a client can ignore the update, and a server can reject it." I wonder what status code the server should respond with?
from braid-spec.
We also have longer-term plans to extend HTTP to allow clients to send acknowledgements back to servers. This might help with what you're doing.
Note that this work is in Level 3 of the Protocol Roadmap— it requires moving HTTP beyond a request/response client/server architecture, and generalizing it into a P2P messaging system. (I presented on this in Braid Meeting 2. Here's a shortcut to the video explaining the relevant slides 12-15.)
So whereas today's HTTP lets a client mutate a server (with acknowledgement):
Client request:
PUT /foo # "The state of /foo is now X
X
Server response:
HTTP/1.1 200 OK # Acknowledge
...
And lets a server mutate a client (without acknowledgement):
Client request:
GET /foo
...
Server response:
HTTP/1.1 200 OK # "The state of /foo is now X"
X
# ...client cannot acknowledge :(
We could generalize HTTP into a more symmetric, P2P future, like this:
Peer A:
GET /foo
Subscribe # Peer A asks to know about /foo from B
Peer B:
GET /foo
Subscribe # Peer B asks to know about /foo from A
Peer A:
PUT /foo # "The state of /foo is now X"
Version: "1"
X
Peer B:
ACK /foo # HTTP/1.1 200 OK
Version: "1"
seen: local # Everyone in phase 1 commit has seen this
valid: local # All validators in phase 1 commit has validated this
Peer A:
ACK /foo # HTTP/1.1 200 OK
Version: "1"
seen: global # Everyone in phase 2 commit has seen this
valid: global # All validators in phase 2 commit has validated this
This can generalize the 200 OK
message into a full 2-phase commit cycle. The cycle can tell you both whether a mutation has been validated (e.g. accepted by various authoritative servers) and whether it's been seen by all peers on the network.
I think this might help with what you're doing. Nobody has proposed a spec for it yet, but a compelling application could give us a reason to spec it up.
from braid-spec.
The idea of reversing the roles of clients and servers was also brought up this fall at IETF 118 in @bemasc's Reverse HTTP proposal (slides).
Austin Wright (@awwright) pointed out in that session that it's actually possible to do this today on HTTP, even though people don't. It wouldn't be supported in the browser fetch()
API IIRC, but if your code only goes server-to-server, I think it would work.
from braid-spec.
Related Issues (20)
- Heartbeat messages to prevent timeouts HOT 8
- Subscriptions with no immediate response HOT 2
- Add top level Patch-Type to subscriptions HOT 3
- What error code should we use when historical versions are missing? HOT 1
- Get requests with 'version' header should all appear in same section. HOT 3
- Allow 404s within a Subscription HOT 7
- Cache-Control is missing from the spec HOT 1
- Typo on braid.org HOT 1
- Subscription without payload HOT 6
- Compression or inheritence for headers
- Guidance for PUTs to legacy servers HOT 9
- Articulate the general form of Updates HOT 1
- Subscription parameters HOT 2
- Write Abstract Protocol HOT 3
- Place fields in correct IANA Registry
- Multi-ID versions used in text before they are explained HOT 2
- Reporting versioning-related errors
- Memento protocol HOT 3
- First-Readthrough Nitpicks HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from braid-spec.