Ask HN: How can self hosted apps(browser) converse with no central medium?

https://news.ycombinator.com/item?id=9953382
by nstart • 11 years ago
15 19 11 years ago

I'm currently working on some open net tools. One last piece of the puzzle for me to bring my proof of concepts to life is to get social network apps hosted across multiple domains, to talk to each other.

The scenario is this:

Person A and Person B host their own versions of an open source version of twitter on persona.com and personb.com respectively. Each person is currently logged into their own app and are happily "tweeting". Person A discovers person B's site and sees a tweet they'd like to reshare. Upon clicking reshare, Person A's app should make a request to Person B's app saying "I'm resharing". Person B's app would respond saying "ok. here's the tweet you are resharing along with other meta info. I just increased my reshare count to 1". Obviously this would happen over an open standard API.

The kicker here though is, when person A clicks reshare on person B's site, how does the browser know that persona.com should initiate a request? How does it get the token from person A (so that no one can manually craft their own requests to get person A to reshare) and say "fine, it's person A who wants to do this reshare"?

Right now I'm stuck at the point where it feels like some central medium has to be watching over both sites so the intermediate request would go to central server saying "hey, this token (no idea who it is) just said it wants to reshare person B's tweet". The central server would match token to person A, and say "hey persona.com, you need to do a reshare on this tweet" from which point all would function as normal.

I desperately want to remove the central server but current protocols just don't seem to allow for it. Funnily enough, this would be simple on a mobile/desktop app. But on a browser app I'm completely stuck. Once person A leaves persona.com, the browser has no way of knowing that it should contact persona.com with a token when reshare is clicked.

Is a central server really the only way to go about this?

Related Stories

Loading related stories...

Source preview

news.ycombinator.com