Posts

Showing posts from 2013

Book review: Sproutcore Web Application Development

Image
TL;DR:  Sproutcore is a huge framework, and this book will save you a lot of time (and headaches). Buy it. Disclaimer : this is a review of a free copy that Packt kindly sent me. Win a free copy of this book, scroll down to know how to participate! If only I had this book 3 years ago! 3 years ago I started developing a Sproutcore app as a learning experience and, in all honesty, the path has been rough. Sproutcore is a massive  framework with lots of features: some are well documented, some mentioned casually in the guides, some others...well you don't know they are there until you start reading the code or chat with one of the more knowledgeable devs in IRC.

Easy animations with Sproutcore 1.10

The release of Sproutcore 1.10  marks an important step in the life of this very popular framework. Lots of new features make developing applications on the Sproutcore framework even easier and fun. One improvement that I am sure will catch your eye (pun intended) is  view animations . Coding view animations was rather easy also on previous versions, but with 1.10 animations are now first class citizens bolted into the core rendering subsystem. For an example of what is available out of the box see this  demo . So how would you use this goodness in an actual Sproutcore application? And how much code would it take? As an example I have put together a very basic Sproutcore app ( source , demo ) which has two states: an authentication form and a main screen. Logging in transitions the app from the login form to the main screen and logging out returns the app to the login screen. Pretty simple.

Manage Windows printer event log settings from command line (i.e. GPO scripts)

Image
Just a quick note to self that to enable/disable/query event log registration from the command line on Windows releases greater than XP and Server 2003 you can use the wevutil tool. For example to enable logging of print requests on Windows 7 for auditing purposes: wevtutil sl Microsoft-Windows-PrintService/Operational /e:true The equivalent command for the the above on Windows XP is the following: reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Providers /v EventLog /t REG_DWORD /d 7 /f net stop spooler net start spooler

Developing Sproutcore apps on c9.io

Image
The Cloud9 online IDE running on Chrome/Mac. Today I was looking for a way to quickly edit a pull request to the Sproutcore project without booting up my laptop, but using the MacMini in the living room instead, which is always on, being our main entertainment system. Turns out it's quite easy if you do not mind signing in into another online service: the  Cloud9 online IDE .

Book Review: Instant OpenNMS Starter

Image
Disclaimer: Packt kindly sent me a free copy for review. TL;DR: Rating 4/5. Recommended for beginners and intermediate. The book itself is short, but packed with information. A fast reader with some experience with OpenNMS should be able to finish it in 4 to 6 hours. Beginners will probably want to follow the pointers to the online documentation, check the configuration files and possibly experiment so they should allocate more time. Before being published the book has been reviewed by Jeff Gehlbach. Anyone who has been involved with OpenNMS for some time know him, as he is one of the many brilliant minds working for the OpenNMS company, the commercial entity which develops and supports OpenNMS. Surely his involvement serves as a kind of seal of quality for the book. I for one was surprised by the clarity with even the most complex aspects of OpenNMS were presented in such a short text. Instant OpenNMS Starter is divided in three main parts: installation, quick start...

Monitoring Oracle tablespace quota with OpenNMS

Image
Going beyond the normal application availability check One interesting use of the  OpenNMS JDBC poller is for extracting data from the Oracle administrative database tables, for example tracking tablespace quota usage to detect quota exhaustion, sudden usage peaks and graph usage over time. Graph of quota usage for user [redacted] on tablespace DAT. Notice the cleaning operation running at 3.30 AM Tablespace quotas is a feature present in the Oracle database that allows the DBA to set a limit on the amount of storage that any given user can consume on a specific tablespace. This allows the DBA to share tablespaces across users yet still be able to policy users into predefined usage boundaries. When a user consumes all its quota it can no longer store data, but it can delete it, thus allowing self-recovery.

A not so short guide to ZFS on Linux

Image
Updated Oct 16 2013: shadow copies, memory settings and links for further learning. Updated Nov 15 2013: shadow copies example, samba tuning. Unless you've been living under a rock you should have by now heard many stories about how awesome ZFS is and the many ways it can help with saving your bacon . The downside is that ZFS is not available (natively) for Linux because the CDDL license under which it is released is incompatible with the GPL. Assuming you are not interested in converting to one of the many Illumos distributions or FreeBSD this guide might serve you as a starting point if you are attracted  by ZFS features but are reluctant to try it out on production systems. Basically in this post I note down both the tought process and the actual commands for implementing a fileserver for a small office. The fileserver will run as a virtual machine in a large ESXi host and use ZFS as the filesystem for shared data.

Development is fun again with nodejs

Image
Being a longtime Java developer, back from when servlets where cool and Struts was making MVC popular among web devs, I always try to find new and more productive ways to deliver software within the Java ecosystem. Recently I turned to Grails and delivered several projects with it. When developing with Grails you can use the power and the expressiveness of Groovy to write compact, elegant, fluent and readable code. The downside is that Grails is huge: even the most simple Grails apps will weigh in the 40MB range compilation, test and building takes a long time (minutes, actually) even in recent versions it is (fairly) complex, but that I can understand because it does so much it will consume a huge chunk of you app server memory when deployed I have been using Grails as the backend for  Mappu  too, initially just because I wanted to bootstrap the project quickly and Grails is simply perfect for that. But as time passed I started to find Grails too heavy for a sim...

3 new features that I wish were in OpenNMS 2.0

Image
As a long time OpenNMS user I've been often impressed with its extensibility and the completeness of its feature set. There is support for lots of data collection techniques: from the old school snmp exec extensions, to the http poller, from the JDBC poller to the XML poller and many others  that I probably forgot to mention. Supporting new probes is therefore just a matter of how,  not  if  , it can be done. And with new monitoring tools popping up every day this is clearly good as it allows OpenNMS to keep up with the competition. So the present looks bright, but what about the future? With OpenNMS 2.0 not yet on the radar I thought I could put together a list of features I would love to have. What do you think of them?

Triggering OpenNMS notifications when patterns occur in a log file

A common problem with OpenNMS is how to monitor a log file and trigger alerts when certain conditions are met. Let me clarify with an example: you have this mission critical app that sometimes experiences internal errors. The application keeps running and still responds to requests, but the error will slow down the system and/or delay further processing. Monitoring the process and/or network polling will obviously not be able to detect the issue and the only way is to tail the application log file and look for certain messages. The problem can usually be solved simply by forwarding the log file to OpenNMS through syslog, but what for logs generated by applications that don't speak syslog or if you don't want to configure syslog forwarding?