Email or username:

Password:

Forgot your password?
1,576 posts total
Alex Gleason
Rubber duck:

We're doing a weird trick with Nostr+HTTP in Ditto, which follows these steps:

1. Client hits the API, eg POST /api/v1/statuses
2. Ditto sends a WebSocket message to the client, asking it to sign the Nostr event.
3. The client signs the Nostr event, using NIP-07, a stored key, or whatever other method it wants to use, then sends it back over the WebSocket.
4. All this time, the HTTP request from step 1 still hasn't received a response. But now that the backend (Ditto) is finished, it delivers the response.

Here is the problem: sometimes that takes more than 60 seconds. It's no issue for Deno, which is very efficient at dealing with idle HTTP connections, but most webservers such as Nginx and anything on top, will cut the request off at 60 seconds.

60 seconds is a reasonable amount of time to wait for a user to sign an event. But now I'm introducing proof-of-work requirements, some of which are designed to not finish in less than 60 seconds on purpose.

So now I need to rethink this. I originally chose this design because Mastodon clients already rely on the HTTP response to show toasts such as "Post successfully submitted! [View]" and "Internal Server Error". By keeping the connection open, we can submit the correct response code when it's ready, avoiding a broken UX.

So the question is how to extend the duration of the request. Or how to prepare the information needed before making the request.

I know this sounds insane, but it will be so worth it.
Rubber duck:

We're doing a weird trick with Nostr+HTTP in Ditto, which follows these steps:

1. Client hits the API, eg POST /api/v1/statuses
Alex Gleason
Here is my new realization. The HTTP timeout is configurable by a sysadmin. So admins can work around this.

Meanwhile, we can add a new approach for signing events to Soapbox, using WebSocket instead of HTTP.

Therefore the default setup with Soapbox will work out of the box, but admins can work around support for native Mastodon clients.

Still.. it's a lot of work and I don't know exactly what it looks like yet.
Here is my new realization. The HTTP timeout is configurable by a sysadmin. So admins can work around this.

Meanwhile, we can add a new approach for signing events to Soapbox, using WebSocket instead of HTTP.
silverpill

@alex Why you're not sending a response to 1 until event is signed?

Alex Gleason
Do you remember the drama caused by Soapbox not including mentions in the text for replies? And we argued that on an email (the thing ActivityPub is analogous to) you put recipients in the "to" field, not in the text body. Well Nostr does an equally weird thing where they want to put media attachments as URLs in the text body. We've come full circle.
Alex Gleason
GitLab is a lot better at collaborating editing than GitHub. Like being able to create multi-line suggestions and apply suggestions as commits.
Alex Gleason
I've been trying to follow my own advice of "don't let your memes be dreams" and do everything that I think I should do as quickly as possible.
Alex Gleason
Visiting a Mostr URL from a web browser (ie navigating from ActivityPub/Mastodon) will now redirect to a human-readable page where you can view the discussion in a Nostr client of your choice.
Alex Gleason
Next time someone says "the 4th dimension is time" I'm going to dropkick Einstein.
Alex Gleason
https://mostr.pub/ new landing page for Mostr bridge with an input box. You can type a Fediverse name to find them on Nostr.
Alex Gleason
Btw this is just a dumb React app that hits /.well-known/nostr.json on mostr.pub, and grabs the relay list from /nodeinfo/2.1
Alex Gleason
I'm fucking up the electrical wiring in my house.
Alex Gleason
>remove outlet
>pigtail wires
>attach to new outlet

No electricity to entire circuit
Alex Gleason
I nuked and rebuilt the Mostr strfry instance and updated everything to the latest version. Prior data is deleted. I need to do this every so often once the database gets too big. https://relay.mostr.pub/
Alex Gleason
Good morning. Would you rather be a Wolf Lord or The Possum King?
Go Up