Skip to content

Support for non-blocking connect to 1000+ hosts simultaneously using asyncore - #68

Open
grandrew wants to merge 1 commit into
paramiko:mainfrom
grandrew:master
Open

grandrew wants to merge 1 commit into
paramiko:mainfrom
grandrew:master

Conversation

@grandrew

Copy link
Copy Markdown

I added SSHClientAsync class that is compatible with python asyncore. I already tested it on 1000+ simultaneous connections with very low memory consumption and totally asynchronous (no problems with unresponsive hosts, etc.).
The next task would be asyncore enabled Transport class to further enhance mass-interaction.

@clarete

clarete commented Oct 19, 2012

Copy link
Copy Markdown
Contributor

Not sure if it's relevant, but I see that we could share a lot of code between the current SSHClient and the SSHClientAsync. Maybe, the first change could be refactoring some bits of the current code, extracting some parts that could be shared. What do you guys think about it?

@bitprophet

Copy link
Copy Markdown
Member

Thanks for the patch!

Re: the overall feature: I'm +0, obviously an async option is a net plus, I just haven't had time to review how this is put together, nor to contrast asyncore against more modern options like (g)event(let) and friends. (Asyncore being stdlib is clearly a big point in its favor though. I just want to make sure that this is thought through fully.)

Re: @clarete's point, I definitely agree that refactoring this into SSHClient is a must before it can be merged, and that would be a great first step regardless.

@lndbrg lndbrg added the Feature label Aug 14, 2014
@nchammas

Copy link
Copy Markdown

@grandrew I know this PR was opened a long time ago, but do you have any interest in updating it to use Python 3.4's asyncio and incorporate @bitprophet and @clarete's feedback?

@bitprophet FWIW, having support for asynchronous SSH interactions in Paramiko would be a big feature add for those of us who want interface to hundreds or thousands of servers at once. Are you still +0 on the overall feature?

There is a new Python library out there called asyncssh that seems to offer exactly that, and a another library called parallel-ssh that makes Paramiko asynchronous via use of gevent (I think).

I bet many people interested in these libraries would prefer it if Paramiko supported asynchronous SSH directly, given Paramiko's popularity and larger community. In fact, people interested in using Fabric (which I understand leverages Paramiko) against large groups of servers at once would probably stand to gain the most from asynchronous SSH support.

@nchammas

Copy link
Copy Markdown

FWIW @bitprophet I would be interested in picking up this work and redoing it with the new asyncio module as long as a) you thing it would be a good feature to add (I certainly do!), and b) you or someone else from the maintainer team could provide some guidance or feedback on how it should be implemented.

@sivabudh

Copy link
Copy Markdown

@bitprophet is there any decision in this part? Async SSH is much needed. :)

@bitprophet

Copy link
Copy Markdown
Member

@sivabudh Just haven't had the time to prioritize looking at it :( Suspect after 2.0 comes out there'll be more interest in moving forwards on fun stuff like this, hopefully.

@isbm

isbm commented Sep 21, 2017 •

Copy link
Copy Markdown

Soon end of 2017 today... Just sayin'... 😆

@stephen-a2z

Copy link
Copy Markdown

end of 2018, I am waiting for ..😂

@Ali-aqrabawi

Copy link
Copy Markdown

any update on this PR? i think it's really needed feature.

@mindflay3r

Copy link
Copy Markdown

It's 2020 and this is still a good idea, guys

@isbm

isbm commented Jul 17, 2020 •

Copy link
Copy Markdown

@mindflay3r I dropped Python for this regard, Go works better. So long, Paramiko.

Nobody cares

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants