Re: [Ryu-devel] suspending Ryu coroutines execution

2017-12-20 Thread Carlos Ferreira
Ok Iwase I'm willing to give it a try at ZMQ. I will read the documentation you gave me and then come back at a later time to tell you how it went. Once again, thank you for your support. Carlos On 21 December 2017 at 01:35, Iwase Yusuke wrote: > Hi Carlos, > > Hmmm... It seems that your probl

Re: [Ryu-devel] suspending Ryu coroutines execution

2017-12-20 Thread Iwase Yusuke
Hi Carlos, Hmmm... It seems that your problem is whether Pyro4 can work on (or cooperate with) GreanThreads. I don't know much about Pyro4, if Pyro4 (client side at least) can work on GreanThreads, you can call Pyro4's APIs on your Ryu application, I guess. Ryu is designed for using non-blocking

Re: [Ryu-devel] suspending Ryu coroutines execution

2017-12-20 Thread Carlos Ferreira
Thank you Iwase. I was actually thinking in using queues to synchronise information between Ryu's threads and native threads, since I'm also using Pyro4 to communicate with another service. But my doubt here is, how can I suspend a Ryu thread and make it wait for a message to arrive at a queue? I

Re: [Ryu-devel] suspending Ryu coroutines execution

2017-12-20 Thread Iwase Yusuke
Hi Carlos, Please let me confirm your issue first. Your question is how to suspend the current thread waiting for some works finished (REST request? or other thread?), right? To suspend your threads using ryu.lib.hub.spawn, you can use "eventlet.event" which is similar to a Queue or threading.Loc

Re: [Ryu-devel] suspending Ryu coroutines execution

2017-12-19 Thread Carlos Ferreira
Iwase, can you help me here, please? Thank you! Carlos Ferreira On 18 December 2017 at 11:16, Carlos Ferreira wrote: > Hmm, suspending all Ryu activities that is precisely what I was trying to > avoid. > > Ok I have another idea. Instead of having the coroutine waiting for > some work to be pr

Re: [Ryu-devel] suspending Ryu coroutines execution

2017-12-18 Thread Carlos Ferreira
Hmm, suspending all Ryu activities that is precisely what I was trying to avoid. Ok I have another idea. Instead of having the coroutine waiting for some work to be processed, what if I have a Python thread creating a new coroutine using ryu.lib.hub.spawn, which will then active the necessary flow

Re: [Ryu-devel] suspending Ryu coroutines execution

2017-12-17 Thread Iwase Yusuke
Hi Carlos, Well, as far as I know, Ryu does not provides the features for suspending the specific activities (e.g., threads) of Ryu, so I guess you can only suspend all activities at the same time. Just an idea, the following suspends all Ryu activities when calling sleep() and prevents other th

Re: [Ryu-devel] suspending Ryu coroutines execution

2017-12-14 Thread Carlos Ferreira
I work with real switches (Zodiac FX). Depending on the Events, wether is Packet_In or other Events, I want to take different kinds of actions. Some of these actions, require contacting a different system component, outside of the Ryu scope. What I want, is to have a way to suspend the greenlet ex

Re: [Ryu-devel] suspending Ryu coroutines execution

2017-12-14 Thread marcosabreu
When you subscribe an event (with @override) while switch is connect you receive this event. You can ignore these events implementing a logic according your application. But when you ignore an event, for exemple Packet_IN, you loss the packets that enter in switch. Can you explain more your