Hey Tomer,
I've been looking at rewriting some of our test tools at work using
asynchronous frameworks as we need to be able to generate many simultaneous
UDP/RTP voice streams in order to load up our units under test. However
we've got existing synchronous test scripts and we generally like to write
test code synchronously. So I thought RPyC (or RPC in general) would be a
nice way to leverage the power of asynchronous programming for doing the
realtime UDP stuff from synchronous test scripts (see attached image). I've
been playing around with twisted, gevent, asyncore and diesel. I've settled
on twisted for now as it comes with a bunch of stuff including
LoopingCall<http://twistedmatrix.com/documents/8.1.0/api/twisted.internet.task.LoopingCall.html>
and
a Multicast UDP implementation.
I did some googling and couldn't find any existing server side twisted/rpyc
implementations (I did scan through old rpyc commits and saw there used to
be a client side twisted protocol?) so I decided to write my own (inspired
by the twisted_integration.py code). It's pretty rough at the moment,
basically glueing existing rpyc code into twisted :p The performance of
this code running in twisted is a bit worse than running rpyc synchronously
using the servers that come with rpyc... Not that performance is that
critical for us, but I'm taking that as a clue that there's potentially a
more efficient and nicer approach.
The code can be found here: https://github.com/oliverdrake/twisted-rpyc, if
you've got time any pointers you could give me on improving this (or if you
know of existing implementations) that would be great,
Thanks,
Oliver

<<attachment: AsyncSyncTestApproach.png>>

Reply via email to