chsjiang / golem-services

The open sourced Golem services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

golem-services

This repository contains the open source parts of Golem Cloud - a set of services enable you to run WebAssembly components in a distributed cloud environment.

See Golem Cloud for more information.

Getting Started

Firstly, spin up golem services using docker-compose in docker-examples folder. Afterwards,

cargo install golem-cli

# template is your compiled code written in Rust, C, etc
# https://learn.golem.cloud/docs/building-templates helps you write some code and create a template - as an example
golem-cli template add <location-to-template-file> 

# Now we need a worker corresponding from template, that can execute one of the functions in template
# If worker doesn't exist, it is created on the fly whey you invoke a function in template
golem-cli worker invoke-and-await  --template-id <template-id> --worker-name my-worker --function golem:it/api/add-item --parameters '[{"product-id" : "foo", "name" : "foo" , "price" : 10, "quantity" : 1}]'

Internally, it is as simple as golem-cli using golem-client sending requests to Golem Services hosted in Docker container. Therefore, you can see what's going on and troubleshoot things by inspecting docker containers.



+-----------------------+         +-----------------------+
|                       |         |                       |
|  Use golem-cli        |  --->   |  Golem Services       |
|                       |         |  hosted in            |
|  commands             |         |  Docker container     |
|  (Send Requests)      |         |                       |
+-----------------------+         +-----------------------+

Contributing

Find details here

About

The open sourced Golem services

License:Apache License 2.0


Languages

Language:Rust 97.1%Language:Java 1.1%Language:Go 0.6%Language:Shell 0.6%Language:Zig 0.2%Language:Dockerfile 0.2%Language:JavaScript 0.1%Language:C# 0.0%Language:C 0.0%Language:Python 0.0%Language:Swift 0.0%