UNPKG

@hybrid-compute/remote

Version:

Remote compute backend using fetch or WebSocket transport for distributed task execution.

89 lines (65 loc) 3.58 kB
# @hybrid-compute/remote [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](http://makeapullrequest.com) [![SemVer 2.0](https://img.shields.io/badge/SemVer-2.0-green.svg)](http://semver.org/spec/v2.0.0.html) ![npm version](https://img.shields.io/npm/v/@hybrid-compute/core) ![issues](https://img.shields.io/github/issues/phun-ky/hybrid-compute) ![license](https://img.shields.io/npm/l/@hybrid-compute/core) ![size](https://img.shields.io/bundlephobia/min/@hybrid-compute/core) ![npm](https://img.shields.io/npm/dm/%40hybrid-compute/core) ![GitHub Repo stars](https://img.shields.io/github/stars/phun-ky/hybrid-compute) [![codecov](https://codecov.io/gh/phun-ky/hybrid-compute/graph/badge.svg?token=VA91DL7ZLZ)](https://codecov.io/gh/phun-ky/hybrid-compute) [![build](https://github.com/phun-ky/hybrid-compute/actions/workflows/check.yml/badge.svg)](https://github.com/phun-ky/hybrid-compute/actions/workflows/check.yml) Part of the [`@hybrid-compute`](https://github.com/phun-ky/hybrid-compute) monorepo. > See the [main README](https://github.com/phun-ky/hybrid-compute#readme) for > full project overview, usage examples, architecture, and contribution > guidelines. ## API Docs [RemoteCompute API Documentation](https://github.com/phun-ky/hybrid-compute/blob/main/docs/api/remote/src/classes/RemoteCompute.md) ## 📦 Package Info This package provides: - A remote compute backend that delegates tasks over HTTP or WebSocket - Transport-agnostic JSON message protocol - Suitable for offloading work to distributed compute services ## Usage ```bash npm install @hybrid-compute/remote ``` ```ts import { createRemoteCompute } from '@hybrid-compute/remote'; const remote = createRemoteCompute({ transport: 'fetch', endpoint: '/api/compute' }); ``` You can see [examples here](https://github.com/phun-ky/hybrid-compute/blob/main/docs/api/remote/docs/example.md), and a [testing guide here](https://github.com/phun-ky/hybrid-compute/blob/main/docs/api/remote/docs/testing.md) --- ## Contributing Want to contribute? Please read the [CONTRIBUTING.md](https://github.com/phun-ky/hybrid-compute/blob/main/CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](https://github.com/phun-ky/hybrid-compute/blob/main/CODE_OF_CONDUCT.md) ## License This project is licensed under the MIT License - see the [LICENSE](https://github.com/phun-ky/hybrid-compute/blob/main/LICENSE) file for details. ## Sponsor me I'm an Open Source evangelist, creating stuff that does not exist yet to help get rid of secondary activities and to enhance systems already in place, be it documentation, tools or web sites. The sponsorship is an unique opportunity to alleviate more hours for me to maintain my projects, create new ones and contribute to the large community we're all part of :) [Support me on GitHub Sponsors](https://github.com/sponsors/phun-ky). p.s. **Ukraine is still under brutal Russian invasion. A lot of Ukrainian people are hurt, without shelter and need help**. You can help in various ways, for instance, directly helping refugees, spreading awareness, putting pressure on your local government or companies. You can also support Ukraine by donating e.g. to [Red Cross](https://www.icrc.org/en/donate/ukraine), [Ukraine humanitarian organisation](https://savelife.in.ua/en/donate-en/#donate-army-card-weekly) or [donate Ambulances for Ukraine](https://www.gofundme.com/f/help-to-save-the-lives-of-civilians-in-a-war-zone).