# Orchestration for External Sim

**URL:** <https://discuss.ray.io/t/orchestration-for-external-sim/5265>\
**Category:** RLlib\
**Created:** [March 2, 2022, 5:28pm UTC](https://discuss.ray.io/t/orchestration-for-external-sim/5265 "2022-03-02T17:28:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![arturn](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/arturn/32/2096_2.png) [@arturn](https://discuss.ray.io/u/arturn)\
**Post date:** [March 10, 2022, 7:30am UTC](https://discuss.ray.io/t/orchestration-for-external-sim/5265/2 "2022-03-10T07:30:31Z")

</div>

Hi @gwisaacs2 ,  
communicates to your remote environment to break out of the ray ecosystem.

Also, have a look at Sven’s post from last year to see an example of how you can interact with external environments: [Reinforcement Learning with RLlib in the Unity Game Engine | by Sven Mika | Distributed Computing with Ray | Medium](https://medium.com/distributed-computing-with-ray/reinforcement-learning-with-rllib-in-the-unity-game-engine-1a98080a7c0d)

The most favourable solution is one where you get external RPCs out of the picture. If that is not possible and your simulator is a clunky piece of software that you have to start by hand and then waits for incoming commands (such that it cannot be properly handled as a service by your cluster), you can also try to introduce a custom resource with ray. The custom resource would be symbolic for a 1-1 mapping from rollout workers to your remote environments. Then create your own gym-style env that requires your custom resource and have your rollout workers communicate to individual instances of your simulation.

Does this help? I am sorry there is not out of the box super easy solution to this. This might require a lot of legwork.

---

_[View the full topic](https://discuss.ray.io/t/orchestration-for-external-sim/5265)._
