@hybrid-compute/remote
Version:
Remote compute backend using fetch or WebSocket transport for distributed task execution.
89 lines (65 loc) • 3.58 kB
Markdown
# @hybrid-compute/remote
[](http://commitizen.github.io/cz-cli/)
[](http://makeapullrequest.com)
[](http://semver.org/spec/v2.0.0.html)






[](https://codecov.io/gh/phun-ky/hybrid-compute)
[](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).