News for hackers. Stuff that matters.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @07:41AM (#23948456)
Made because I couldn't find a simple, no-sign-up service to sync a list of names for a command line tool. And resubmitted because yesterday I goofed and the curl commands listed didn't point to the right location, which really took the fun out of it.

Favorite part of the project: trying out Phoenix's built in pub sub + live view (the live view subscribes to a data/:id topic, which the api write endpoint publishes to) to get that nice instant update on write if you have the data open in the browser without polling.

It's also fun to see how fast it syncs multiple browser windows watching the same data when you edit it in one window. That's not useful, but I give it 1 "neat".

Re:Show HN: Textdb.dev – simple data sharing for fun projects by nickjj on Saturday July 25, 2020 @01:08PM (#23950750)
Hey, if you ever wanted to come on my podcast to talk about your tech stack (how it was developed, deployed, lessons learned, etc.) I'd love to have you on.

There's a few Phoenix episodes out currently, but none are using Live View yet. It would be really fun to talk about how someone is using it in production.

If you do, head over to https://runninginproduction.com/ and click the "become a guest" button on the top right to get the ball rolling.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by chris_st on Saturday July 25, 2020 @08:23AM (#23948670)
That's pretty cool! Are you doing anything like rate-limiting to prevent abuse?
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @08:34AM (#23948720)
Thanks 8), rate limiting is just the most basic of nginx configs to like, 10 requests / second / ip
Re:Show HN: Textdb.dev – simple data sharing for fun projects by sreekotay on Saturday July 25, 2020 @11:42AM (#23949996)
Really simple cool! One minor thing on the IP rate limiting side.... LOTS of mobile/cell users might end up NAT'ed behind a single IP. Just an FYI.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by sreekotay on Monday July 27, 2020 @10:27AM (#23965360)
wellllll there's no GREAT answer. Usuallllllyyy this is why some lightweight authentication is a good idea? Some kind of TGT/token scheme, and then rate limit based on that? But does make it all a little less "just works"
Re:Show HN: Textdb.dev – simple data sharing for fun projects by blisseyGo on Saturday July 25, 2020 @04:09PM (#23952012)
That's a good point. How does one rate limit correctly in that case?
Re:Show HN: Textdb.dev – simple data sharing for fun projects by lioeters on Saturday July 25, 2020 @04:48PM (#23952279)
I don't think it's possible to correctly rate limit IPs behind NAT, at least with NGINX.

> Note that IP addresses can be shared behind NAT devices, so limiting by IP address should be used judiciously.

https://docs.nginx.com/nginx/admin-guide/security-controls/c...

Re:Show HN: Textdb.dev – simple data sharing for fun projects by anderspitman on Saturday July 25, 2020 @07:10PM (#23953102)
Rate limiting by data UUID might actually be pretty effective. I should add that to patchbay.pub.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by blisseyGo on Saturday July 25, 2020 @08:19PM (#23953397)
That might be an issue if someone is using it to deliver lets say settings json and multiple users try to request the file.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by NetOpWibby on Saturday July 25, 2020 @09:40AM (#23949077)
Oh nice, that sounds simple enough.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by miki123211 on Saturday July 25, 2020 @10:07AM (#23949271)
It would be cool if it was possible to read the data not just by the ID, but also by the hash of the ID.

That would let us serve stuff like version information and links to the latest version, without the fear that somebody is going to reverse engineer our app and replace the data with something malicious.

We, as the app author, would have the full key, so we could read and write, whereas users would have nothing but the hash.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @10:24AM (#23949394)
That's a cool idea, I'd definitely like to add the ability to create a little store with more safety, and that totally works with the goal of simplicity. I'll give it a shot.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by TedDoesntTalk on Saturday July 25, 2020 @10:37AM (#23949502)
It's a cool idea, but the old anti-pattern about security through obscurity applies.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by _jal on Saturday July 25, 2020 @12:52PM (#23950629)
People get this wrong a lot.

Security only through obscurity is no security at all. The argument was generally made in the context of secret, proprietary encryption algorithms. In this context, it was frequently true - security reduced to reverse engineering.

But security isn't a thing. It is a property of a system. And many secure systems strategically employ obscurity for multiple purposes.

Reciting a mantra is a poor substitute for carefully considering your problem domain.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by TedDoesntTalk on Saturday July 25, 2020 @04:46PM (#23952266)
Right, but in the context of this application, there is NO OTHER security except the obscurity of the UUID or it’s hash. The mantra applies quite well here since an attacker could stumble upon a valid hash or UUID and then change the data.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by StavrosK on Saturday July 25, 2020 @07:58PM (#23953294)
The attacker could stumble upon a valid hash like they could stumble upon a valid password.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bart__ on Saturday July 25, 2020 @12:27PM (#23950409)
I never really understood this argument, obscurity add an obvious layer of protection, not impenetrable of course, but still valid. Why is this different than an API key for example?
Re:Show HN: Textdb.dev – simple data sharing for fun projects by gregmac on Saturday July 25, 2020 @02:05PM (#23951215)
If compromised, you can change an API key. The key is like a password, and keeping that secret is important.

Where the "obscurity" aspect comes in, as an example, can be through the mechanism used to generate and validate that key.

Let's say you decide you don't want to or can't store the keys, and don't want a full pki system (public/private keys or certificates), so go with: sha256(clientid + userid + "hardcoded secret"). Your security now 100% relies on no one knowing that algorithm. If someone figures it out, you need to release a new version of your software, invalidate ALL API keys, and for that effort you still haven't done anything to prevent the same thing happening again.

A good test of this is: if someone has your source code, can they break your security mechanism? If yes, you're probably relying on security though obscurity. By contrast, if you're using asymmetric encryption to generate keys, it doesn't matter if someone knows that: if they don't have the private key, they can't do anything. (This leaves aside the issue of storing your private key or other secrets in source code, but I'd describe that as an operational failure rather than a fundamental design problem).

Re:Show HN: Textdb.dev – simple data sharing for fun projects by Chickenosaurus on Saturday July 25, 2020 @06:35PM (#23952916)
If a cryptographic hash function is used, the security of this scheme doesn't rely on keeping the algorithm secret, though. Therefore, it's not security through obscurity. Of course, weaknesses could still exist (e. g. a too small input space because the ID that is hashed has too little entropy).
Re:Show HN: Textdb.dev – simple data sharing for fun projects by melq on Saturday July 25, 2020 @12:36PM (#23950484)
Security through obscurity refers to relying upon keeping the details of the security mechanism secret. An API key itself is a secret, but the mechanism for how that key is generated and used is public knowledge.

In fact, the reason the best security mechanisms used today are so robust is specifically because they are made public in the first place.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @02:26PM (#23951346)
It is done, lmk if it works alright. The read only hashes should be visible beneath the data editing view on a new one.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by ASVVVAD on Saturday July 25, 2020 @05:32PM (#23952593)
Adding it to the homepage would be cool too ^^
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @06:18PM (#23952838)
How would you phrase it?

"write only link here"?

I really wanna keep the basic information visible and am not sure about about adding another line

Re:Show HN: Textdb.dev – simple data sharing for fun projects by ASVVVAD on Sunday July 26, 2020 @03:28PM (#23959495)
i meant under "Access your data with:" something like "Or read old link:"

but you're right it can be discovered

Re:Show HN: Textdb.dev – simple data sharing for fun projects by josefrichter on Saturday July 25, 2020 @08:38AM (#23948741)
Whoever made this, I love you. I do a lot of prototyping in Framer, and this just make simple prototypes that communicate with one another hell of a lot easier!
Re:Show HN: Textdb.dev – simple data sharing for fun projects by StavrosK on Saturday July 25, 2020 @01:52PM (#23951107)
You may also like this super simple MQ I wrote a while ago:

https://www.stavros.io/posts/messaging-for-your-things/

Re:Show HN: Textdb.dev – simple data sharing for fun projects by canada_dry on Saturday July 25, 2020 @11:10PM (#23954116)
+1

A handy substitute for mqtt since it doesn't allow a simple http get/post method to set and query keys - something very useful with iot stuff!

Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @02:59PM (#23951552)
Hell yeah, I'm planning to keep it up for a good while and lemme know if something isn't working or you'd like a new feature. bontaq @ the google mail .com
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @02:34PM (#23951393)
I see some of you are realizing that I haven't enforced any data url to be a UUID, good on you. I hope it opens up new neat things like https://textdb.dev/data/hello-hackernews or more creative ideas.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by ASVVVAD on Saturday July 25, 2020 @05:34PM (#23952605)
That's awesome! I was wondering if I had to go to https://textdb.dev using the browser to get an ID x)
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @06:03PM (#23952757)
Nah it just gives you a more secret id, I'm happy to support people talking about apples at https://textdb.dev/data/apples
Re:Show HN: Textdb.dev – simple data sharing for fun projects by redm on Saturday July 25, 2020 @12:31PM (#23950448)
I really like simple tools like this. Well done; I can see lots of uses for this, especially with the Serverless/Jamstack surge.

I love the idea of Hashing and read/write keys mentioned in this comment: https://news.ycombinator.com/user?id=miki123211

I also like the idea of batch requests so you can pul multiple keys at once, or set multiple keys at once. It seems better for everyone.

My only concern is that a small portion of users will undoubtedly try to abuse this with high volumes or large objects, or both.

Have you published any limits on value key size, value size, read/write limits for keys etc? It might be worth thinking about now before you have to shutdown users or shutdown the service due to cost.

Congrats again!

Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @03:43PM (#23951824)
Thanks! So far the limits are about 500Kb, which is more than enough for what this service is intended for.

The setting of multiple keys I'd have to think about, as it's already so easy to acquire multiple keys -- ie I don't think I'd be saving or making anything much faster by special handling for it. Pulling multiple keys is likewise, you're free to do it in an async all.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by ximm on Saturday July 25, 2020 @10:06AM (#23949266)
This seems to be in a similar spirit to https://patchbay.pub/.

I love these small services, but I still don't have an idea how they can be scaled up: If you want to use them for anything serious you probably have to prevent abuse and comply to all kinds of regulations.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by anderspitman on Saturday July 25, 2020 @06:40PM (#23952942)
I didn't design patchbay to scale. I think of it more as a hammer, or maybe a Swiss army knife. Things can be useful without scaling.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @04:01PM (#23951957)
Yeah they're nice and fun to build. I imagine if you wanted to, you'd run this behind a VPN at #corporation, which will be a huge pain to get approval for, but not that bad.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by berkas1 on Saturday July 25, 2020 @08:12AM (#23948606)
Hi, is the source code available? :)

BTW, the front page's HTML seems to have a <head> and <body> inside another <body>.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @08:25AM (#23948679)
Sure, I just made it public over here: https://github.com/bontaq/textdb

Yeah I'm not sure why it's doing that, v annoying though

Re:Show HN: Textdb.dev – simple data sharing for fun projects by cocktailpeanuts on Saturday July 25, 2020 @09:29AM (#23949024)
probably you have a layout bug. it's wrapping a layout within a layout.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @10:16AM (#23949334)
Yep that was it, ty, it should be fixed now
Re:Show HN: Textdb.dev – simple data sharing for fun projects by jwarren on Saturday July 25, 2020 @10:16PM (#23953883)
I think this is really nice and smart. I would suggest left-aligning the text in the edit/view mode for a few reasons:

1) It's a bit easier to read for longer text sources 2) It makes writing/reading JSON/YAML/other data sources much easier 3) lists are much easier to parse

Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Monday August 03, 2020 @07:44PM (#24044851)
I have added an option in the data view to customize text alignment, thanks for the good idea
Re:Show HN: Textdb.dev – simple data sharing for fun projects by abathur on Saturday July 25, 2020 @04:42PM (#23952231)
I'd already been pondering the paperclip-machine universe that could be created by a Twitter bot that just pipes tweets to bash and posts the output.

Now it could just trawl Twitter for addresses at https://textdb.dev, and throw the contents through bash, post the result back to textdb, and tweet a new link... :]

Re:Show HN: Textdb.dev – simple data sharing for fun projects by lou1306 on Saturday July 25, 2020 @04:59PM (#23952379)
I'm pretty sure you could build a Turing machine with textdb as tape and a Twitter bot as the tape head.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @04:57PM (#23952361)
That's a neat idea too, I love hearing all these new ways to use a simple bit of data.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by TedDoesntTalk on Saturday July 25, 2020 @10:36AM (#23949492)
What language is this? I visited https://www.phoenixframework.org/ and even watched a few minutes of a video but there's no mention of the programming language. I suppose the language is called Phoenix?
Re:Show HN: Textdb.dev – simple data sharing for fun projects by dmitriid on Saturday July 25, 2020 @10:38AM (#23949506)
Elixir (on top if Erlang VM)

- https://elixir-lang.org/

- https://www.erlang.org/

Re:Show HN: Textdb.dev – simple data sharing for fun projects by detaro on Saturday July 25, 2020 @10:37AM (#23949499)
It's Elixir.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by TedDoesntTalk on Saturday July 25, 2020 @10:38AM (#23949510)
huh. I would have thought https://www.phoenixframework.org/ would mention Elixir then.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by detaro on Saturday July 25, 2020 @10:39AM (#23949520)
It does in a few places, not very obvious though, especially if you might not know that "Elixir" is a programming language, agreed.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by webmaven on Saturday July 25, 2020 @10:49AM (#23949588)
Very cool! Do you have any sort of dashboard displaying stats for the service? Simple totals would be interesting, of course (size, # of buckets, # of edits, etc.), but I'd find histograms of edits etc. per bucket particularly fascinating.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @03:37PM (#23951785)
I don't yet, but let me get back to you in a couple days. I think it'd be interesting to all.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by webmaven on Friday August 07, 2020 @01:56PM (#24084703)
ping
Re:Show HN: Textdb.dev – simple data sharing for fun projects by gmemstr on Saturday July 25, 2020 @09:47AM (#23949134)
Is there an upper limit to the amount of data that can be stored on an endpoint?
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @11:32AM (#23949917)
There currently isn't, but it is intended for small amounts of data. Today or tomorrow I'll probably put a cap at 500Kb or so, which is still a heckload of data.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by mkoryak on Saturday July 25, 2020 @09:22AM (#23948984)
Can you add a link to your GitHub from the website?

I usually star things instead of bookmarking and others probably do too.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by NetOpWibby on Saturday July 25, 2020 @09:43AM (#23949102)
Re:Show HN: Textdb.dev – simple data sharing for fun projects by rendall on Saturday July 25, 2020 @09:05AM (#23948886)
Is there a maximum file size limit?
Re:Show HN: Textdb.dev – simple data sharing for fun projects by rendall on Monday July 27, 2020 @04:33AM (#23963242)
This was answered here: https://news.ycombinator.com/item?id=23949917

"There currently isn't, but it is intended for small amounts of data. Today or tomorrow I'll probably put a cap at 500Kb or so, which is still a heckload of data."

Re:Show HN: Textdb.dev – simple data sharing for fun projects by mhass on Saturday July 25, 2020 @09:05AM (#23948881)
Very cool. Are you using just cowboy as a server or do you have nginx/Apache in front?
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @09:28AM (#23949019)
nginx is in front, but it's just doing a proxy and setting some headers, so effectively cowboy's serving everything.

So far it's doing a great job too, CPU is at 2%, 1Gb free ram of the 4Gb available, and a pretty constant 1Mbps outward, on the 20$/m digital ocean droplet. I may have jinxed it by saying this though.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by WrtCdEvrydy on Saturday July 25, 2020 @10:00AM (#23949220)
This is fancy...
Re:Show HN: Textdb.dev – simple data sharing for fun projects by tannercollin on Saturday July 25, 2020 @03:53PM (#23951899)
Great work! I wrote something similar at:

https://reg.t0.vc

It's useful if you set up bash aliases like "push" and "pull" so you can quickly move snippets of text across servers.

Re:Show HN: Textdb.dev – simple data sharing for fun projects by spery on Saturday July 25, 2020 @08:33AM (#23948715)
Manually editing data has a bug. If you click cancel it will still update the value.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @08:48AM (#23948791)
Thank you, fixed
Re:Show HN: Textdb.dev – simple data sharing for fun projects by unixfox on Saturday July 25, 2020 @09:42AM (#23949096)
Alternative service except there is no live update: https://jsonbox.io/
Re:Show HN: Textdb.dev – simple data sharing for fun projects by jrott on Saturday July 25, 2020 @01:15PM (#23950805)
Thank you for making this it's super handy.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by WA on Saturday July 25, 2020 @03:01PM (#23951561)
What’s the purpose of the read-only link if it has the same UUID?
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @03:08PM (#23951611)
I just built it without a backfill, new data should have a full read-only hash -- I'll try to backfill the data tomorrow
Re:Show HN: Textdb.dev – simple data sharing for fun projects by ximm on Saturday July 25, 2020 @10:04AM (#23949241)
The HTML of the frontend is messed up (<head> is duplicated)
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Saturday July 25, 2020 @10:19AM (#23949348)
Should be fixed now 8)
Re:Show HN: Textdb.dev – simple data sharing for fun projects by erezsh on Saturday July 25, 2020 @12:35PM (#23950480)
Cool idea, nice implementation. But man, fix your README.md!
Re:Show HN: Textdb.dev – simple data sharing for fun projects by josefrichter on Saturday July 25, 2020 @06:46PM (#23952974)
One more question: Does the data expire?
Re:Show HN: Textdb.dev – simple data sharing for fun projects by bontaq on Tuesday July 28, 2020 @09:11PM (#23982470)
Nope, especially seeing the current usage / data size I think it's perfectly fine to hang around forever. I may eventually implement something to clean up data with no reads for > 1 month, but again so far it looks fine to leave things around.
Re:Show HN: Textdb.dev – simple data sharing for fun projects by known on Saturday July 25, 2020 @09:06AM (#23948893)
Similar service https://u.instacrypt.me/
Re:Show HN: Textdb.dev – simple data sharing for fun projects by mkoryak on Saturday July 25, 2020 @09:25AM (#23948999)
No, it's not.

Your link is a message service that self destructs.

OPs link is a storage service