pocha / terminal-codelearn Goto Github PK
View Code? Open in Web Editor NEWSuper fast multi user pseudo bash Terminal in Node.js & SockJS
Home Page: http://pocha.github.io/terminal-codelearn
Super fast multi user pseudo bash Terminal in Node.js & SockJS
Home Page: http://pocha.github.io/terminal-codelearn
Include the the instruction for installation of moped gem inside the section "Install the gems for Terminal server".
this is one of the required gems for starting the reel_server.rb.
In this image http://tinypic.com/view.php?pic=116nhh2&s=5 , we can see that shell prompt i.e vikas@Unknown.... is appearing twice. Why is that?
Formatting works for the basic linux commands but it is not full-proof.
rails new <app name>
- the output shows bash codes
ls -al
- the softlink light blue color spills over to the subsequent commands.
The output a command takes a lot of time to appear on the output. Its best that the code (reel-server.rb) should be profiled & time taken by various modules should be dumped in a log file to figure out where the latency is.
To test latency in real-time, siege can be used to send some real-time back to back inputs for different users. Analyzing the log file should point to as what thing took maximum time & then that bottleneck should be worked on.
Error log below
ubuntu@ip-10-28-92-62 ~/codelearn/nodejs_terminal$ node app.js
module.js:349
Module._extensions[extension](this, filename);
^
Error: /home/ubuntu/codelearn/nodejs_terminal/node_modules/pty.js/build/Release/pty.node: undefined symbol: _ZN2v86String3NewEPKci
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Module.require (module.js:357:17)
at require (module.js:373:17)
at Object.<anonymous> (/home/ubuntu/codelearn/nodejs_terminal/node_modules/pty.js/lib/pty.js:9:11)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Module.require (module.js:357:17)
Leaving the server on using forever make it take 100% CPU. There is no conclusive evidence when it happens. On a daily load of 200 users who are spending around 7-10 min of time, this happens couple of times every day. As for now, I have a cron script that checks if the process is having a high CPU usage & restarts the server using forever. It fixes the problem temporarily.
@dereXeus did some research & figured out that the Node server is not able to close file descriptors when he ran the server using strace. The situation is partially reproduce able if you run the benchmark tests as instructed in README. Once all the connections are done, the CPU does not go back to 0% . So it looks like this issue is similar to what I am getting on production server.
While Googling, I came across nodejs/node-v0.x-archive#5504 & it seems upgrading the nodejs version might fix the issue. I upgraded nodejs on production to v0.10.12 (it is an ubuntu server) but the problem remains.
I also tried upgrading the node version to the latest version but 'npm install' failed for the version.
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.