Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Interprocess communication #2585

Closed
highmountaintea opened this issue Jun 26, 2019 · 7 comments
Closed

Interprocess communication #2585

highmountaintea opened this issue Jun 26, 2019 · 7 comments
Labels

Comments

@highmountaintea
Copy link

Hi, is there any plan to support faster communications between two deno processes, or between parent and child deno processes? I am wondering if ProtoBuf might provide a mechanism that's faster than typical HTTP or IPC communications. This would be a boon for dispatch based architecture.

@Stvchm9703
Copy link

As I google others articles, seem Deno is using other framework Flatbuffer (also made by google), to dual with V8 and Rust communicating, instead of using Protobuf.
However, similar question that I want to ask: is there any IPC / FlatBuffer channel that open for other program to communicate with Deno?

@kitsonk
Copy link
Contributor

kitsonk commented Oct 26, 2019

We removed flatbuffer from Deno, and that was only for privileged communication between the JavaScript runtime and Rust.

Depends on what you really mean by "child process". Deno supports web workers, and the communication to them is in the standard way. Deno.dial() and Deno.listen() could be used for TCP communication.

Communicating via Windows or Linux raw sockets might be an interesting enhancement.

@highmountaintea
Copy link
Author

For example, we have a node.js project where we want a central web server dispatch the messages to its child processes, instead of using clustering. But this type of architecture has a lot of overhead over clustering in node.js.

Since deno has invested much effort in message passing, I am wondering whether that can benefit the messaging performance between parent/child processes.

@stale
Copy link

stale bot commented Jan 6, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 6, 2021
@stale stale bot closed this as completed Jan 13, 2021
@rahul-dutt-sharma
Copy link

I need to use unix sockets to communicate with a c++ daemon process in out project. Are we getting this in Deno?

@lucacasonato
Copy link
Member

lucacasonato commented Mar 4, 2021

@rahul-dutt-sharma Deno can already connect to unix sockets in --unstable.

const conn5 = await Deno.connect({ path: "/foo/bar.sock", transport: "unix" });

https://doc.deno.land/builtin/unstable#Deno.connect

@tmcw
Copy link

tmcw commented Sep 11, 2023

This was closed for staleness but count me in for interested. Though Deno has Workers, I've found the hard way that they aren't a real solution to processes - Workers can get "stuck" in permanent ways like through bad npm dependencies that break the module graph, and the memory consumed by Workers doesn't get cleaned up, so at the end of the day, we've got to use processes, and it'd be great if there was a nice way to communicate with them.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants