Live data from Hacker News

Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

dash.deno.com

21–30 of 49 posts

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#21

There's few things as fun as a multiplayer notepad that wasn't intended to be an actual chat, before it's invaded by bots and spammers. Congrats on the fella that tried to paste an ascii art version of Pepe the Frog.

code for pepe is now available: https://gist.github.com/mishushakov/eb281f8edbb7e2bd2e6580de...

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#22
post #2

Nice, I like how short and simple it is. The title seems to imply it runs on multiple datacenters. How does it sync messages between those?

I was also wondering how this worked, and the following Deno Deploy documentation explains it: https://deno.com/deploy/docs/runtime-broadcast-channel/#broa...

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#23
post #6

Deno is such a nice little scripting tool. I've been using it for devops glue and scripts lately. Native typescript, easy-as-pie dependency management. its great!

Do you have any libraries you use often with scripts or mostly just deno built-ins?

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#25
post #21

There's few things as fun as a multiplayer notepad that wasn't intended to be an actual chat, before it's invaded by bots and spammers. Congrats on the fella that tried to paste an ascii art version of Pepe the Frog.

code for pepe is now available: https://gist.github.com/mishushakov/eb281f8edbb7e2bd2e6580de...

Thanks for posting pepe, my friend

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#26
post #4
post #2

Nice, I like how short and simple it is. The title seems to imply it runs on multiple datacenters. How does it sync messages between those?

I believe the BroadcastChannel implements the server-side distributed messaging.

    class BroadcastChannel
      return `system('ircd')`
    end
Only three lines! :D

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#27
post #6

Deno is such a nice little scripting tool. I've been using it for devops glue and scripts lately. Native typescript, easy-as-pie dependency management. its great!

Personally I do not like the fact that it puts too much trust into DNS.

DNS wasn't created with security in mind, so to say Deno is secure because it uses a permissions system while relying directly into DNS for imports to me sounds weird.

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#28
post #5

What I really like about this is that you open the dependency in a web browser and see the human readable source code. No transpiling! https://deno.land/std/http/server.ts

This is generally already possible with webpack, but many/most websites i've looked at have source maps turned off. Maybe the extra compile time is too much, or they just want to disincentivize client-side reverse engineering.

Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS

#29
post #6

Deno is such a nice little scripting tool. I've been using it for devops glue and scripts lately. Native typescript, easy-as-pie dependency management. its great!

Personally I do not like the fact that it puts too much trust into DNS. DNS wasn't created with security in mind, so to say Deno is secure because it uses a permissions system while relying directly into DNS for imports to me sounds weird.

It's not just DNS, thankfully - deno.land has a TLS certificate too, which I think means that DNS exploits wouldn't succeed in causing clients to install untrusted packages.
Post reply on HN