background preloader

Performance Profiler for Node.js

Performance Profiler for Node.js

Update on my Node.js Memory and GC Benchmark - Hannes Wallnöfer Posted on 29 September 2010 I was lucky enough to have a short chat with Ryan at JSConf.eu last weekend in Berlin about the memory allocation comparison between Node.js and RingoJS I had done. He didn’t have any suggestion for tuning Node.js or V8 for higher memory and garbage collector throughput, but thought it was possible that Node’s lackluster performance in the benchmark had to do with binary buffers and getting data in and out of them. Thinking about a memory and garbage collection benchmark that didn’t involve buffers quickly led me to JSON. Parsing JSON is a fairly frequent task for a web application, and it can put a considerable load on the garbage collector. Also, from my work on the Rhino JSON parser I knew that it is comparable in speed to V8’s (something that unfortunately isn’t true of, say, RegExp implementations), so the results would reflect GC performance pretty well. Here’s the source code of the JSON parsing benchmark I wrote. Notes

JavaScript | Mozilla Developer Network JavaScript (JS) is a lightweight interpreted (or just-in-time compiled) programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, garbage-collected, dynamic language, supporting multiple paradigms such as imperative, functional, and object-oriented. JavaScript's dynamic capabilities include runtime object construction, variable parameter lists, function variables, dynamic script creation (via eval), object introspection (via for...in and Object utilities), and source-code recovery (JavaScript functions store their source text and can be retrieved through toString()). This section is dedicated to the JavaScript language itself, and not the parts that are specific to Web pages or other host environments.

My Node.js Linksheet - Progstr Filer Recently I have been looking around the internet for various info about Node.js. At first, my intent was to make some sort of infographic on the topic, but later I have changed my mind. I like infographics a lot, but they have an important limitation - their links aren't clickable. That is why I have decided to simply categorize the information and share it. Some companies, using Node.js 37Signals.com use Node.js to write Pow, zero configuration Rack server for OS/X. academia.edu uses Node for background data processing. appendto.com Dow Jones - The WSJ Social front-end is written completely in node, using Express, ejs, and many other modules. duckduckgo.com uses it for XMPP bot im@ddg.gg. ebay.com uses Node.js in ql.io An HTTP gateway. ge.tt is a file sharing service. heroku.com use Node for internal tools. joyent.com is the basic supporter of Node.js. klout.com livechat.com gomockingbird.com is using Node.js and operational transformations to do real-time, collaborative wireframing. Yahoo!

Brief git guide Git is handy version control for collaborative development and testing. This guides you briefly through basics to get started. Only terminal usage under GNU / Linux is covered, for graphical user interfaces please refer guides available at web. Note - this was not placed under developer nor testing because it's common for all MeeGo contributors. Concepts Please open the excellent git cheat sheet . 1. git clone <repository> Example: git clone 2. 3. git add <newfile> (if you created new file) git commit -a Your default editor is opened and you need to write description of changes. 4. git push (this assumes you have commit rights to repository, please check with repository admin) That's it! Pre-steps Mandatory - Make sure you have git installed Debian /Ubuntu: sudo apt-get install git Optional - If working behind ssh-proxy If you are working with corporation you might need to resolve ssh-proxy challenge. Run the following command:

Max Ogden Blogotronz Description of and notes on the node.js Stream API There is also a screencast version of this article. node bills itself as JavaScript evented I/O. "Streams in node are one of the rare occasions when doing something the fast way is actually easier. -@dominictarr in his high level node style guide The main tool in node's evented toolbox is the Stream. Readable Readable streams will emit data events each time they get a "chunk" of data and then they will emit end when they are all finished. emit (from EventEmitter) is the observer pattern - a publish/subscribe pattern which allows a number of observer objects to see an event. Readable streams can also be paused and resumed, and it's up to the Stream implementer to write the pause() and resume() methods. Writable Writable streams must implement two functions: write and end. This is a form of back pressure which is a very powerful feature as it lets stream communicate "upstream" to their writers. Simplified writable stream

Git First of all, you'll need to have Git installed on your machine, whether through the support of your IDE, or as a command-line tool. If you want to checkout the source code of Groovy, there are three different URLs you can use. From the command-line, you can use the command: git clone git: ?? git clone https: git clone git@github.com:groovy/groovy-core.git You can checkout different branches, in particular: master is the latest Groovy branch, for the upcoming major versionGROOVY_1_8_X is the branch of the curret Groovy 1.8.x versions (current stable version)GROOVY_1_7_X is the branch for the previous official version of Groovy 1.7.x For fetching a branch the first time, simply use: To checkout a particular branch: git checkout master git checkout GROOVY_1_8_X git checkout GROOVY_1_7_X Icon Developers: Make sure your SSH information is up-to-date on Github or on Codehaus Xircles and that your SSH key is available to your command-line client or IDE integration. git commit -m "Your commit message"

Felix's Node.js Convincing the boss guide « Home / All Guides Now that you're all hyped up about using node.js, it's time to convince your boss. Well, maybe. So this guide is my opinionated collection of advice for those of you that want to explore whether node.js makes sense for their business, and if so, how to convince the management. Bad Use Cases CPU heavy apps Even though I love node.js, there are several use cases where it simply doesn't make sense. That being said, node.js allows you to easily write C++ addons, so you could certainly use it as a scripting engine on top of your super-secret algorithms. Simple CRUD / HTML apps While node.js will eventually be a fun tool for writing all kinds of web applications, you shouldn't expect it to provide you with more benefits than PHP, Ruby or Python at this point. The truth is that while we are starting to see good frameworks for node.js, there is nothing as powerful as Rails, CakePHP or Django on the scene yet. NoSQL + Node.js + Buzzword Bullshit Good Use Cases JSON APIs Performance

Adding a Drop Down Login Form to Bootstrap's Navbar - mifsud.me Bootstrap Twitter Bootstrap is great, really great. If you’re spending a tremendous amount of time and energy fighting to create your site’s base layout or ensure that it is cross-browser compatible, you should check it out. The toolkit was born about ten months ago when a couple of engineers over at Twitter decided that the process of getting the base layout of an web app (a part of the “bootstrapping” process) shouldn’t be as difficult was it was. As a result of this, they created Bootstrap to streamline the process. Bootstrap comes with all of the necessary JavaScript and CSS to whip together a clean looking website with a ton of different components (tables, progress bars, alerts, tabs, a navigation bar, etc). I recently made the decision to use Bootstrap on my latest project (stay tuned) and I thought I’d share a solution to a small hiccup I ran into. The Code I’m going to focus on actually getting the login drop down working as I ran into an interesting issue doing so. That’s it!

anode@microsoft

Related: