Is there any way to have rpc between 2 services sitting on different machines?
Trying to simulate this by having nameko service on one machine and nameko shell on another.
nameko shell is not able to complete the call as it does not recognize the service.
Tried to create a rabbitmq shovel between the 2 machines. Still service is not recognized.
Does nameko support this usecase?
Example
test_service running on machine 1 with ip1
another_service Running on machine 2 with ip2
Intention is to call test_service from another_service
from nameko.rpc import rpc, RpcProxy
class TestService1:
name = "test_service"
# we depend on the RPC interface of "another_service"
other_rpc = RpcProxy("another_service")
@rpc # `method` is exposed over RPC
def testmethod(self):
# application logic goes here
print("hello world!!")
class TestService2:
name = "another_service"
# we depend on the RPC interface of "test_service"
other_rpc = RpcProxy("test_service")
@rpc # `othermethod` is exposed over RPC
def othermethod(self):
# application logic goes here
print("hello world peer!!")