{"id":17124897,"url":"https://github.com/shellyln/out-of-proc-server","last_synced_at":"2026-04-11T02:53:47.041Z","repository":{"id":57316878,"uuid":"167672081","full_name":"shellyln/out-of-proc-server","owner":"shellyln","description":"Out-of-proc-server (+ gRPC) provides interoperability between Node.js and .NET framework.","archived":false,"fork":false,"pushed_at":"2019-01-26T21:48:21.000Z","size":85,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T12:06:01.924Z","etag":null,"topics":["dotnet","dotnet-core","dotnet-standard","grpc","interop","interoperability","javascript","node","nodejs","out-of-proc-server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shellyln.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-26T09:33:29.000Z","updated_at":"2023-09-08T17:49:42.000Z","dependencies_parsed_at":"2022-08-25T20:41:08.625Z","dependency_job_id":null,"html_url":"https://github.com/shellyln/out-of-proc-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fout-of-proc-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fout-of-proc-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fout-of-proc-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellyln%2Fout-of-proc-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shellyln","download_url":"https://codeload.github.com/shellyln/out-of-proc-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245204401,"owners_count":20577343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotnet","dotnet-core","dotnet-standard","grpc","interop","interoperability","javascript","node","nodejs","out-of-proc-server"],"created_at":"2024-10-14T18:43:39.627Z","updated_at":"2026-04-11T02:53:41.990Z","avatar_url":"https://github.com/shellyln.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Out-of-proc Server\n\nLaunch the gRPC server (or other type of server) on demand from the application.\n\nOut-of-proc-server (+ gRPC) provides interoperability between Node.js JavaScript and .NET framework (and other languages you additionally implement the \"out-of-proc-server\" sequence).\n\nIt helps you to create the desktop applications based on distributed architecture.\n\n\n---\n\n\n## Install\n\n### Node.js\n\n#### Prerequirements\n\n* Node \u003e= 10\n\n```bash\n$ npm install out-of-proc-server --save\n```\n\n### .NET framework\n\n\u003e Note: We have not published this to NuGet yet.\n\n#### Prerequirements\n\n* .NET Core SDK \u003e= 2.1\n\n#### Install\n1. Download the source archive from [https://github.com/shellyln/out-of-proc-server/archive/master.zip](https://github.com/shellyln/out-of-proc-server/archive/master.zip) and extract it.\n1. Add `src/dotnet/OutOfProcServer/OutOfProcServer.csproj` to your solution.\n\n\n---\n\n\n## Usage\n\nSee [examples](https://github.com/shellyln/out-of-proc-server/tree/master/examples).\n\n\n---\n\n\n## APIs\n\n### Node.js\n\n#### launchServer\n\n[Call from gRPC Client (Pipe Server)]  \nLaunch the out-of-proc server process.\n\n```ts\ninterface ServerContext {\n    serverPipe: Server;\n    conn: Socket;\n    childProc: ChildProcess;\n    shutdown: () =\u003e Promise\u003cvoid\u003e;\n}\n\nfunction launchServer(pipeName: string, command: string, args: string[], spawnOpts?: SpawnOptions): Promise\u003cServerContext\u003e\n```\n\n* returns : launched server process info.\n    * promise will resolved when the server process connect to the pipe.\n* `pipeName` : name of the named pipe.\n* `command` : executable path.\n* `args` : command line arguments.\n* `spawnOpts` : options of `child_process.spawn()`.\n\n#### ServerContext#shutdown\n\n[Call from gRPC Client (Pipe Server)]  \nClose the server pipe and end listening.\n\n```ts\nfunction shutdown(): Promise\u003cvoid\u003e\n```\n\n* returns : none.\n    * promise will resolved when the pipe is closed.\n\n#### notifyReadyToClient\n\n[Call from gRPC Server (Pipe Client)]  \nNotify to the client process that the out-of-proc server is ready to accept the requests.\n\n```ts\nfunction notifyReadyToClient(pipeName: string, handler: (event: string, eventArg?: any) =\u003e void): Socket;\n```\n\n* returns : Socket of client pipe.\n* `pipeName` : name of the named pipe.\n* `handler` : event handler that called if 'close' or 'error' event is occured to the client pipe.\n\n### .NET framework\n\n#### Launcher.LaunchServer\n\n[Call from gRPC Client (Pipe Server)]  \nLaunch the out-of-proc server process.\n\n```c#\npublic static ServerContext LaunchServer(string pipeName, string command, string[] args);\n```\n\n* returns : launched server process info.\n* `pipeName` : name of the named pipe.\n* `command` : executable path.\n* `args` : command line arguments.\n\n#### ServerContext#Shutdown\n\n[Call from gRPC Client (Pipe Server)]  \nClose the server pipe and end listening.\n\n```c#\npublic ServerContext Shutdown();\n```\n\n* returns : `this` object.\n\n#### Notifier.NotifyReadyToClient\n\n[Call from gRPC Server (Pipe Client)]  \nNotify to the client process that the out-of-proc server is ready to accept the requests.\n\n```c#\npublic static Notifier NotifyReadyToClient(string pipeName);\n```\n\n* returns : client pipe info.\n* `pipeName` : name of the named pipe.\n\n#### Notifier#Wait\n\n[Call from gRPC Server (Pipe Client)]  \nWait forever until the client pipe is closed or broken.\n\n```c#\npublic Notifier Wait();\n```\n\n* returns : `this` object.\n\n#### Notifier#Shutdown\n\n[Call from gRPC Server (Pipe Client)]  \nClose the client pipe.\n\n```c#\npublic Notifier Shutdown();\n```\n\n* returns : `this` object.\n\n\n---\n\n\n## Sequence diagram\n\n\u003e Note: *nix environments use UNIX domain sockets instead of named pipes.\n\n\n### Graceful shutdown\n\n![Graceful](https://raw.githubusercontent.com/shellyln/out-of-proc-server/master/docs/graceful.svg?sanitize=true)\n\n\n\n\n### Unexpected shutdown\n\n![Unexpected](https://raw.githubusercontent.com/shellyln/out-of-proc-server/master/docs/unexpected.svg?sanitize=true)\n\n\n---\n\n\n## License\nApache-2.0\n\nCopyright (c) 2019, Shellyl_N and Authors.\n\n## License of examples (./examples)\nApache-2.0\n\nCopyright 2015 gRPC authors.  \nCopyright (c) 2019, Shellyl_N and Authors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellyln%2Fout-of-proc-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshellyln%2Fout-of-proc-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellyln%2Fout-of-proc-server/lists"}