News for hackers. Stuff that matters.
Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by masukomi on Friday February 05, 2016 @04:29PM (#11044780)
is it me or is this going to result in massively long data files that you KEEP having to re-downloading in their entirety every time you want to get an update from someone you follow?
Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by klapinat0r on Friday February 05, 2016 @05:21PM (#11045092)
This could be solved by archiving/rotating old entries, and have the webserver return the n latest.

For instance, you could let nginx do this:

  location /masukomi.txt {
     default_type 'text/plain';
     content_by_lua 'local tail = io.popen("tail -n 20 ".."/chroot/twtxt/masukomi.txt", "r")
     for line in tail:lines() do
       print(c, line)
     end
     ';
  }
Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by toyg on Saturday February 06, 2016 @09:19AM (#11047811)
The problem is that if you didn't fetch the file at the right time, you will lose some history after rotation happens. At the very least, it needs a standard way to deal with that (like a mandated date-based URL format?), which has to be specified in the format.

Also, no DM and no @-replies. For those, you need a registry of some sort, but decentralized registries enable name-squatting.

Before you know it, you have reinvented the WWW, except limited to 140 chars.

Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by klapinat0r on Saturday February 06, 2016 @06:26PM (#11050545)
> if you didn't fetch the file at the right time, you will lose some history after rotation

Very true, and that's a trade-off, not unlike what Twitter does today. In my pseudo-code I didn't make the -n part of the url (it easily could be, but that'd add changes to the client). So I agree with your criticism, but a "since" lookup would be a fairly easy extension of the client (i.e. part of query, so unsupported frontends still work), as the data file already contains date.

> Before you know it, you have reinvented the WWW

Yes. :)

Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by amelius on Saturday February 06, 2016 @09:24AM (#11047830)
No need for all this complication.

Simply use IPFS[1] instead as the underlying protocol.

[1] https://ipfs.io/

Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by pythousiast on Friday February 05, 2016 @04:35PM (#11044822)
Yup that's an issue. Their should be more control on how the data is stored. I like the concept tho.
Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by sleepychu on Saturday February 06, 2016 @01:28AM (#11046801)
Can't you just use an HTTP range request?
Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by buckket on Saturday February 06, 2016 @06:42AM (#11047343)
Yes, should be possible. But then again you would have to specify an ordering, i.e. are newer status updates at the top or at the bottom.
Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by akkartik on Friday February 05, 2016 @04:34PM (#11044812)
Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by hk__2 on Friday February 05, 2016 @06:01PM (#11045331)
It can help to avoid re-downloading a timeline that didn’t change but you’ll still have to re-download the whole file for each new status.
Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by detaro on Saturday February 06, 2016 @06:32AM (#11047316)
Make the ETAG the size, send a range request for only the bytes you haven't seen already?
Re:Show HN: Twtxt – Decentralised, minimalist microblogging ... by buckket on Saturday February 06, 2016 @11:40AM (#11048398)
This is nice as long as nobody changes old status updates. Thought about using If-Modified-Since to at least reduce the load when nothing has changed at all.

But still: It will definitely take some time till a "twtxt timeline" causes more traffic than browsing the current Twitter homepage. :3