Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-write connection/disconnection flow #45

Open
alexstrat opened this issue Mar 25, 2012 · 6 comments
Open

Re-write connection/disconnection flow #45

alexstrat opened this issue Mar 25, 2012 · 6 comments
Labels

Comments

@alexstrat
Copy link
Collaborator

Ideas :

@alexstrat
Copy link
Collaborator Author

Now the transport part is a kind of sub-part of the reactor since it's instantiated in the reactor initialization. We should maybe separate and instantiate it in node and then pass it to the reactor as it.

@jinroh
Copy link
Owner

jinroh commented Mar 26, 2012

That may be a solution. However how should we handle the disconnection event emitted by the transport. Should it be managed internally by the transport and reported back if the problem persists, or handled by the reactor (or the node ??).
Hmm..

@alexstrat
Copy link
Collaborator Author

This was just a matter of inititialization and reference to the transport. The reactor will still be listening to the transport. It is only not responsible to instantiante it anymore (it will be the node) and the node has a direct reference to it in case of it wants listen to it.

It doesn't fix anything, I just find it simpler..

@jinroh
Copy link
Owner

jinroh commented Mar 26, 2012

I don't think I explained well my concern. I wanted to stress how should we handle a disconnection from the transport. For instance, if Strophe emits a disconnection event, should the transport try to reconnect by itself first and then if it didn't succeed tell the reactor, or should the reactor handle the whole reconnection process ?

@alexstrat
Copy link
Collaborator Author

Ahh..Ok. I'm deeply convinced that this should be handled by the transport itself, and the reactor (and other) gets feedback on this through new kind of events and states (reconnecting, ..).

@jinroh
Copy link
Owner

jinroh commented Mar 26, 2012

Agree, we have to write down all the states of the Tranport, Reactor and Node objects to clear the flow control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants