novus / rugu Goto Github PK
View Code? Open in Web Editor NEWA scala dsl for ssh.
License: Other
A scala dsl for ssh.
License: Other
This is a real concurrency issue. If you specify ovr("ls" :> "out") (or :>>), where ovr is an OverShell instance for N connections, then write attempts will conflict from the different worker threads.
Related to #2, if an explicit handling function is provided through exec, it should be run with access to the error stream of the command.
There seems to be a threading issue in Jsch, where Jsch instances themselves are not thread-safe (we aren't mutexing connections, but a Jsch instance provides fresh sessions which are kept in a single thread). It's been tough to reproduce this; specs2 tests sbt w/ sbt test parallelization disabled results in sporadic hangs unless specs parallelization is disabled in the spec itself. I've failed to reproduce this yet in a straight up j.u.c scenario (https://gist.github.com/1176662), but it the issue seems to be JSch.
sshj is worth evaluating. It seems cleaner, thread-safe, and much more active.
It seems that an overshell gets slower with more underlying instances. A thread dump revealed the following; it's quite possible that threads contend for blocking reads on the system's random generator (more threads, more contentions):
"pool-6-thread-11" prio=10 tid=0x000000004190d000 nid=0x6e88 waiting for monitor entry [0x00007f56810af000]
java.lang.Thread.State: BLOCKED (on object monitor)
at sun.security.provider.NativePRNG$RandomIO.implGenerateSeed(NativePRNG.java:201)
- waiting to lock <0x00000000f7a02de8> (a java.lang.Object)
at sun.security.provider.NativePRNG$RandomIO.access$300(NativePRNG.java:108)
at sun.security.provider.NativePRNG.engineGenerateSeed(NativePRNG.java:102)
at java.security.SecureRandom.generateSeed(SecureRandom.java:495)
at net.schmizz.sshj.transport.random.BouncyCastleRandom.(BouncyCastleRandom.java:65)
in a REPL session the console became unresponsive; possibly a deadlock in jsch. Trap any exceptions in handlers and propagate as Lefts
Hey there Chris,
@splittingfield here.
I just pulled the rugu git repository and tried to run the tests and noticed that the test.properties file required
for RemoteCommandSpec.scala is not included in the repository.
Feel free to reach me via email [email protected].
Take care,
m
OverShell downloads from multiple hosts will conflict. This can be handled by a transformation of the file name per host.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.