Lurker News

Comments (165) 50 threads

Show all comments

Showing thread 9 of 50

learnstats21 reply#
This is a wonderful proof-of-concept and has potential applications in better decentralising web services.

Keep going!

cjfont2 replies#
However in this case, only the content is being decentralized, not the service itself.
losvedir2 replies#
Author here.

True, and a very clear way of putting it. Interestingly, since Erlang is so well-suited for distributed computing, and Phoenix (the web framework I'm using) has been built to take advantage of that, it wouldn't be too hard to let someone else spin up this same service and take part in distributing the content.
Off the top of my head, the only thing that wouldn't work is the "Currently Viewing" counter, which relies on this all running on a single heroku dyno. Otherwise, the socket messages are routed over a distributed PubSub layer, which should be pretty easy to tap into.

stephengillie#
It's a cool idea. What do you think about running it from an Android? (Isn't there an Apache APK?) So you can only view the page while connected to the phone's hotspot?

That would make it even more etheral.

hayksaakian#
could you also keep track of viewers on a per-server basis and simply add those numbers together on the fronted?

like if
server 1abcdef is managing 300 sockets server 2ghijkl is managing 200 sockets
then you just add those on the frontend

jbert#
Yes, but as long as the same method is used to generate the hash, the same browser could connect to multiple services and share the same content.

In that sense there needn't be a single service. Just a bunch of rendevous points for browsers-with-content to connect and announce what they have.