superhighway84 icon indicating copy to clipboard operation
superhighway84 copied to clipboard

[ ⚠️ Proof of concept / Work in progress] RSS server

Open mprimi opened this issue 2 years ago • 2 comments

This creates a 'server mode' SH84 that does two things:

  • Work as headless peer to serve IPFS content
  • Serves an RSS feed of latest articles (i.e. roots) or comments (i.e. all articles)

I intend to deploy this on my own server and add the feed URL to my newsreader, so I can keep an eye on posts without firing up SH84.

It's not actually serving RSS right now, but you can try it with:

$ curl localhost:8080/rss/articles
$ curl localhost:8080/rss/comments

mprimi avatar Feb 28 '22 06:02 mprimi

This is pretty cool! However, I think it might be better if you create a dedicated repository for it and make in a standalone tool, wdyt? It doesn't seem to actually integrate into Superhighway84 anyway, with most of the startup code being copypasta.

I think a more generic approach that would be possible to integrate into Superhighway84 would consist of an additional go routine that could handle incoming API calls in order to provide an external interface on top of which something like an RSS integration (e.g. with journalist) could be made. The API interface could be made configurable (off by default).

I support the idea, but I think I would pick either of the two paths instead: Make it a dedicated tool or integrate it as an actual extension that can be configured and is maybe a bit more generic (so that it could be extended with new API calls later on).

Wdyt?

mrusme avatar Feb 28 '22 15:02 mrusme

@mrusme re: move to a standalone repo.

Sounds good. At this point I was just messing around with Go's HTTP and OrbitDB (never used either before). All the thing you suggest make sense. I would never propose merging in the current state.

Here's the usage I would do for myself:

  • Start the RSS server only if launched with --rss.
  • Add a --headless option (no TUI).

On my server I'd run with sh84 --rss :8081 --headless ("seed" node, always up, and RSS server). On my workstation I'd fire up when I want to read, with: sh84 (TUI, no RSS).

mprimi avatar Mar 04 '22 05:03 mprimi