> For the complete documentation index, see [llms.txt](https://tochemey.gitbook.io/goakt/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tochemey.gitbook.io/goakt/features/remoting.md).

# Remoting

The [**API**](https://github.com/Tochemey/goakt/blob/main/actor/api.go) interface helps interact with a GoAkt actor system as kind of client. The following features are available:

* **`Tell`**: to send a message to an actor in a fire-and-forget manner.
* **`Ask`**: to send a message to an actor and expect a response within a given timeout.
* **`BatchAsk`**: to send a batch of requests to an actore remotely and expect responses back for each request.
* **`BatchTell`**: to send a batch of fire-and-forget messages to an actor remotely.
* Remote APIs: See [#remoting](#remoting "mention")&#x20;

## Remoting

[Remoting](https://github.com/Tochemey/goakt/blob/v3.8.2/actor/remoting.go) allows remote actors to communicate. The underlying technology is gRPC. To enable remoting just use the **`WithRemote`** option when creating the actor system. See actor system [options](https://github.com/Tochemey/goakt/blob/main/actor/option.go). These are the following remoting features available:

* **`RemoteTell`**: to send a fire-and-forget message to an actor remotely
* **`RemoteAsk`**: to send a request/response type of message to a remote actor
* **`RemoteBatchTell`**: to send a fire-and-forget bulk of messages to a remote actor
* **`RemoteBatchAsk`**: to send a bulk messages to a remote actor with replies
* **`RemoteLookup`**: to lookup for an actor on a remote host
* **`RemoteReSpawn`**: to restarts an actor on a remote machine
* **`RemoteStop`**: to stop an actor on a remote machine
* **`RemoteSpawn`**: to start an actor on a remote machine. The given actor implementation must be registered using the **`Register`** method of the actor system on the remote machine for this call to succeed. The actor is created using the *default mailbox and supervisor strategy* set when creating the actor system on the remote node.
* **`RemoteForward`**: to pass a message from one actor to the actor by preserving the initial sender of the message.
* **`RemoteReinstate`**: to reinstate a *suspended* actor on a remote node
* **`RemoteActivateGrain`**: to activate a Grain on a remote machine. The given Grain must already be registered on the remote machine using the **`ActorSystem`** method **`RegisterGrainKind`**&#x20;
* **`RemoteTellGrain`**: to send a fire-and-forget message an already registered Grain on a remote machine
* **`RemoteAskGrain`**: to send a request/response type of message to an already registered Grain on a remote machine.

Some of these methods can be found as well as on the [**PID**](https://github.com/Tochemey/goakt/blob/main/actor/pid.go) which is the actor reference when an actor is created.

## Compression

Starting from version <mark style="color:$success;">`v3.9.3`</mark> GoAkt offers the capability to specify the compression algorithm to use when communicating remotely. One can add the following compression algorithms when setting the remoting engine via the removing option:

* **`NoCompression`**: default option. remote communications happen without any data compression. This should suffice for most use cases.
* **`BrotliCompression`**: uses the [Brotli](https://datatracker.ietf.org/doc/html/rfc7932) compression data format to compress data
* **`ZstandardCompression`**: use the [Zstandard](https://facebook.github.io/zstd/) compression algorithm to compress data
* **`GzipCompression`**: uses the Gzip compression&#x20;

## Context Propagation

See [Context Propagation](/goakt/features/context-propagation.md)
