Questions tagged [rpyc]

A transparent python library for symmetrical remote procedure calls, clustering and distributed-computing.

RPyC (IPA: /ɑɹ paɪ siː/, pronounced like are-pie-see), or Remote Python Call, is a transparent python library for symmetrical remote procedure calls, clustering and distributed-computing. RPyC makes use of object-proxying, a technique that employs python’s dynamic nature, to overcome the physical boundaries between processes and computers, so that remote objects can be manipulated as if they were local.

96 questions
3
votes
1 answer

Redirecting stdout for RPyC to local client without using Classic RPyC

How do I redirect stdout to my local client when using RPyC services? I know it is possible when using Classic RPyC by using c = rpyc.classic.connect(ip) c.modules.sys.stdout = sys.stdout Does anyone have an equivalent code that I can use on my…
3
votes
3 answers

why connection always gets refused?

I am trying to connect machine using the RPyC but it always says that connection refused. I did on the python shell import rpyc rpyc.connect("hostname", port) but it says connection refused. checked the firewall for the port. firewall allow this…
Sagar
  • 2,315
  • 7
  • 25
  • 34
3
votes
1 answer

How can I get the list of clients connected to a server in RPyC?

I want to have a connection between two client and one server in RPyC, and I want to call a method of server from client1 that in the method of server call a method of client 2, this is my code: import rpyc #server: class…
Madoodia
  • 79
  • 1
  • 6
3
votes
1 answer

Handle computationally-intensive requests to a Django web application, possibly using a pre-forking RPC server

I am running a Django-based webservice with Gunicorn behind nginx as a reverse proxy. My webservice provides a Django view which performs calculations using an external instance of MATLAB. Because the MATLAB startup takes some seconds on its own,…
ChrisM
  • 1,114
  • 1
  • 7
  • 18
2
votes
1 answer

Returning remote object in rpyc

I have a remote server like below which already has an initialized class and i have set protocol config as allow public attrs True. import rpyc class SharedClass(object): def __init__(self,string): print string def action(self): …
Adhithya
  • 223
  • 1
  • 3
  • 6
2
votes
1 answer

Using rpyc to connect to database once and serve multiple queries

Trying to serve database query results to adhoc client requests, but do not want to open a connection for each individual query. I'm not sure if i'm doing it right. Current solution is something like this on the "server" side (heavily cut down for…
user811463
  • 31
  • 6
2
votes
1 answer

Issue properly passing *args and **kwargs through RPyC to underlying modules

Background I'm attempting to implement the RPyC proof-of-concept example provided in the APScheduler github repository in order to deploy my application using gunicorn with more than one worker (an issue pointed out in APScheduler's FAQ section).…
CaffeinatedMike
  • 1,537
  • 2
  • 25
  • 57
2
votes
1 answer

Transparently passing through a function with a variable argument list

I am using Python RPyC to communicate between two machines. Since the link may be prone to errors I would like to have a generic wrapper function which takes a remote function name plus that function's parameters as its input, does some status…
Rob
  • 865
  • 1
  • 8
  • 21
2
votes
0 answers

Using rpyc to run gui based application on remote windows machine

I'd like to run a gui based user-interactive process on remote windows machine. Here's a simple naive example of such process that opens a messageBox: void main(int argc, TCHAR *argv[]) { MessageBoxA(NULL, NULL, "my window", MB_OK); …
Zohar81
  • 4,554
  • 5
  • 29
  • 82
2
votes
1 answer

Using scapy through RPyC

I need to use scapy on remote server to dump traffic like this sniff(filter='icmp', iface='eth1', timeout=5) To connect to remote server I'm using RPyC. conn = rpyc.classic.connect(HOST_IP) but I can not understand how to use scapy on remote…
Pavel P
  • 21
  • 2
2
votes
1 answer

using rpyc to update properties on a remote object

I am using rpyc within an application and have come across a small hiccup. I would just like to know if it's possible to update remote properties? I have a test server: import rpyc from rpyc.utils.server import ThreadedServer class Test: def…
Gregory Kuhn
  • 1,627
  • 2
  • 22
  • 34
2
votes
1 answer

Detect stopped server process via rpyc.Connection

Suppose I have a Service: import rpyc class MyService(rpyc.Service): my_dict = {} def exposed_put(self, key, val): MyService.my_dict[key] = val def exposed_get(self, key): return MyService.my_dict[key] def…
Mack
  • 2,614
  • 2
  • 21
  • 33
2
votes
1 answer

Import modules using RPYC

I'm trying to remote into an interactive shell and import modules within python 2.7. I'm getting hung up. So far this is what I've got: import rpyc import socket hostname = socket.gethostname() port = 12345 connections =…
RocketTwitch
  • 285
  • 5
  • 17
2
votes
1 answer

rpyc: difference between root.getmodule("module_name") and manually returning a module reference?

I want to use a python module that is accessible on a remote rpyc server only. Is there a difference between the following two ways of accessing modules on a remote machine: """ on the client side: """ my_local_mod_ref =…
langlauf.io
  • 3,009
  • 2
  • 28
  • 45
2
votes
1 answer

passing class methods in rpyc python

I have seen passing a functions using teleport_function, is there any way to pass class methods ?? or can I execute my class object remotely in any other way I can alternative work around by making class a service . But that does not serve…