lagonapp / lagon

Deploy Serverless Functions at the Edge. Current status: Alpha
https://lagon.app
GNU Affero General Public License v3.0
1.32k stars 63 forks source link

Raw TCP & UDP Support? #838

Open zizifn opened 1 year ago

zizifn commented 1 year ago

Is your feature request related to a problem? Please describe. I want to be able to connect the database.

Describe the solution you'd like If Lagon runtime support raw TCP & UDP API, then DB driver is possible in Lagon.

Describe alternatives you've considered N/A

Additional context

QuiiBz commented 1 year ago

This is definitely something that will be supported in the future. Note that we'll probably support WebSocket first: #794

There are some discussions in WinterCG to land a common API for sockets, so we'll wait for it to avoid creating a proprietary API: https://github.com/wintercg/admin/issues/43#issuecomment-1380748978

There is also a proposal from Chrome for a Direct Sockets API, but I don't know what's the state of it: https://github.com/WICG/direct-sockets/

zizifn commented 1 year ago

This is definitely something that will be supported in the future. Note that we'll probably support WebSocket first: #794

There are some discussions in WinterCG to land a common API for sockets, so we'll wait for it to avoid creating a proprietary API: wintercg/admin#43 (comment)

There is also a proposal from Chrome for a Direct Sockets API, but I don't know what's the state of it: https://github.com/WICG/direct-sockets/

Common API for sockets maybe be trickly, seems Deno and Workerd share the same interface connect which is not the same as the Direct Sockets API proposal

If I can make a bold guess, I will guess Direct Sockets API has a long way to be final...

QuiiBz commented 1 year ago

Cloudflare just released their connect() API: https://blog.cloudflare.com/workers-tcp-socket-api-connect-databases/