Why Demo Jam ROCKS – From a losers perspective

It was Tuesday night sometime back in 2009 at my first TechEd where I was sitting in the audience and really wishing I was standing up on stage, presenting something inspiring and innovative which would encourage the votes of the demanding audience of Demojam. Well, it took 4 years to creep over personal hurdles, family time and to gain an ounce of courage which persuaded me to post an entry in 2013, this blog gives some insight into what I did, what I would have done differently, and also why Demojam really needs people like YOU!A couple of months ago (May through July) I went through the openSAP HANA course and was really impressed, not only by the DB, but more the HANA XS Engine as an Web/App server. Being a “learn by doing” kinda person I struggled to get the most out of the course content since it really didn’t apply to anything I was currently working on, until I realized the opportunity… As I described in my demojam presentation, I drank the HANA coolaid Personally, it was not so much of the big data aspect that intrigued me, but rather this concept of the DB and the app server really being a single entity from a platform, as well as infrastructure perspective. Simple. I spent a couple weeks learning a lot more, since I had something to apply it against and started developing an app called Metric²

(pronounced squared).

Image.png“I realized that while there are a lot of applications which are using HANA, there were very few for HANA.”

My goal with Metric² was to build a web based realtime platform for showing how your HANA instance was performing, and subsequently, how your business was actually benefiting from having this type system and helping your business run better. The concept was to try and correlate performance with user impact.

OK , get to the demo jam part …

Around the end of August, Metric² was doing what I had intended and I decided to submit the app for Demojam, although, my original anticipation was to build something far more purpose built and “crowd” pleasing. However, I was really hoping that the free perspective, something useful – realtime dashboards – and a good use case – audience involvement – would hopefully win the votes and hearts of a couple techies in crowd. I created a submission video and a couple days after submissions closed, I got a welcoming, but equally nerve wracking acceptance email. Graham Robinson was actually the one who sparked the idea of a Demojam submission with his comment on a small Mac app I developed for HANA called xSync. I both cursed and thanked him for about 2 months straight when I was wondering what I had gotten myself into

After getting accepted, I had a couple interesting challenges, my 1st priority and goal was to deliver the app at Teched, which meant between the acceptance email (around the 20th of September) and October 20th (TechEd) I needed a fully function product. I also needed to put together, and have a solid presentation nailed down. I subsequently neglected the last point and as always, focused more on adding features and functionality to the app. I had conceptual ideas about what I was going to present, and set out to do something a little different by getting the audience involved by using the actual system I built to show its purpose and functionality, but also to make them feel a part of the demo.

Shortly after being accepted you also have the opportunity to have a online session with Tobias Queck and Sebastian Steinhauer, 2 really great guys and coaches who listen to your demojam pitch and provide some really solid feedback on what their thoughts and suggestions are. After speaking with them, it really calmed my nerves and gave me a certain reassurance that I was going to be OK. A great and well needed confidence boost, especially for a first timer.

Well the 30 days between the above mentioned dates just flew by, and before I knew it, it was TechEd time. The first two days of TechEd for me, included the awesome Innojam event – I thoroughly enjoyed myself, but ended up spending considerably more time helping out than I anticipated and did not get as much coding done as possible. Yes, I was still writing code 2 days before the presentation. Adding features, optimizing things and getting the website finished. Innojam wrapped up on Monday evening, I skipped the keynote to do additional coding and practicing my pitch, the Tuesday of the event unfortunately came pretty quickly and my nerves were starting to get the better of me. I was super stressed to go up on stage, especially knowing it was going to be tough to beat the other participants. I was optimistic and pressed on … on Tuesday the demojam rehearsals start around midday. You get to run through your presentation twice, with others watching and the stage/event crew helping you out with monitor setup, displays, etc. You get to meet the funny and friendly Ian Kimbell, and also Tobias and Sebastian who coach you through your pitch once again, providing some really helpful feedback.  This really helps ensuring that your demo goes  smoothly.

A word of praise – The events team are amazing people, they will literally do anything to make are you are comfortable and happy and EVERYTHING you need to be successful. I do not have enough praise for them. They really go above and beyond, and this image should give you an idea of just how far they go.

photo.JPG

Jen Abrahamson (part of the talented events team) gave me this shirt just before the event!

While going through my 1st rehearsal I was so nervous I left out close to 40% of the pitch/demo and still had 2 minutes on the clock, at that stage, i realized I needed more practice and I spent the rest of the afternoon going through my talk over and over again to engrain it as best I could. In between that – as you can guess, I was also doing last minute code changes making some small modifications. Having the audience involved proved to add its own set of challenges, since I didnt have a full time HANA system and using the developer image on AWS, it was far from a very powerful machine, I spent quite a lot of time running load tests, but was never 100% sure who and how users were going to influence the performance and subsequently the outcome of the demo … major stress factor.

Around 8pm the event started and I got my time on stage, I went through my presentation and felt it really went pretty well. It was reasonably well received, with the exception of me forgetting to mention that the app has support for gestures using the Leap Motion. During the demo I walked over to the large monitor to show this functionality, it did not work – making me look like i was swatting or catching flies Boo.


“Tell people what you are doing and why, that way when it does not work, people at least understand what you were attempting to do….”

With around 2 minutes left I asked the audience to open up the demo website on their mobile device and they got to pick which pill they wanted to purchase from my online store (running on HANA) which was being monitored by Metric². Up on the screen you could see the orders being completed in realtime and how the system was reacting to the new load. In the end around 700 orders were completed which was great, and to me, is what made the demo a success.

Link to my Demojam presentation

I was subsequently voted off the stage in round 1, I walked off the stage pretty disappointed … all I could think about was what I would need to do to win it next year. Its official, I am hooked. I now understand why John Astill has done this for so many years over and over again.

In the end, I *really* want to win. I already have around 5 ideas about what I could potentially do next year and I really hope i get the chance to redeem myself and write a sequel to this blog post, but from a winners perspective

Thinking of submitting an entry? Here are a couple tips which I learned:

  • Think small – my challenge was that I developed a full featured app, with loads of features. This is challenging at best just to demo in 6 mins, never mind apply a crowd friendly use case.
  • Your presentation is 50% of your demo – Have a creative and complimentary presentation and you can succeed very easily. (The running demo of John and Greg is a great example of a creative presentation).
  • Creative use of a technology, far outweighs technology being used for creativity. I.e. Don’t just use HANA for the sake of it
  • Come to TechEd prepared, have your 6 min pitch nailed down. I didn’t and it was far more stressful than I had hoped.
  • Even if its the same, make it look different: On Tuesday morning Vishal Sikka and Sam Yen gave some great introductions to the SAP UI5/Fiori programming paradigm. Guess what, my app had a very similar look and feel. When they were going through their presentations I was literally sinking in my seat … I was actually considering changing my color scheme and if I had just a couple hours more, I probably would have. Point is, even if your demo is a UI5 app, don’t make it look like UI5 app.
  • The devil is NOT in the details, its in the use case. Its far more important to have a sound, solid and relevant use case, than a phone number having the correct input format of (111) – 111 – 1111.
  • Tell people what you are doing – (Sebastian suggested this) – it is helpful and adds context to your presentation. Its also often hard to see what your mouse is clicking on, or what watch button you are pressing.
  • Your jokes are not as funny as you think they are – I threw a couple small jokes in and all I heard was crickets chirping, nothing breaks moral more One of Ian’s tips are not to start with a joke, and I fully agree.

The Demojam event needs some changes …

I noticed a couple of tweets a couple of days ago about changing rules, and doing things differently, having now participated in an event, here is are my feedback/comments to the demo jam organizers:

  • We need more demo jammers, way more. if it means we need to reduce the 6 minutes to 4, so be it. The event starts pretty late which also may limit the amount of Demojam presentations, the SCN event is also prior which takes up quite some time while being a big advocate for this, it might be best to restructure the timetable a little?
  • I would like to see a couple different categories. It would be great to have a “open source” category and a “regular” category. Any others you can suggest?
  • I think there should be more prizes for different criteria or per category, this could or could not be known prior to the event. At Innojam LV, there were multiple winners and this really encourages more entries across multiple disciplines.
  • I would like to see SAP employees back in, even alone. Maybe a category for best SAP employee demo? They have developed some great tech in the past, I understand it could be a slight advantage due to technology accessibility, early access, and a couple of other aspects but I also believe the audience wants to see how internal SAP employees are innovating in their respective areas. I know there was a huge thread back in 2011 from Demojam winner Matt Harding about this topic, and this is just my opinion
  • Limit previous winners? No way, I applaud jammers who can win multiple times, it encourages all other jammers to build something more creative, more innovative and deliver a great presentation.
  • Please change the voting – the “Clapometer”? I would prefer to see a slightly more transparent process … winners could be based on amount of tweets? Voting page from a mobile app? Even a panel like X Factor handing out tasteless feedback would be pretty cool and a bit more enjoyable.

In the end ….

Demojam ROCKS, I am truly grateful for an opportunity to participate. It was a great feeling to have completed a life long dream of mine. I got 6 minutes of fame up on the same stage as the greats of Vishal Sikka and Hasso Platner. Here’s the best part – YOU can too. All of us have done something outstanding, something creative and something I/WE/YOU/SCN/Attendees want to hear about. I encourage you to create or share a concept, a dream or just a downright outrageous idea for next years demo jam, and hopefully join me in showing your peers, friends and family that you are a dedicated and a creative innovator of awesome enterprise technology.

Metric² Update

For those of you who would like to download/check out Metric² – its coming! I had a huge amount of great feedback at TechEd and I am in the process of making some of the suggested changes to make it a little better before throwing it into the wild. (I developed the entire app on the concept of polling due to the XS Engine limitation of not supporting Web Sockets in SPS6 = not perfect.) You can stay up to date using the website here: http://www.metric2.com

Metric² for SAP HANA

Metric² is a web based, realtime dashboarding platform for SAP HANA, on SAP HANA.I recently gave a demo of the app at Demojam in Las Vegas (You can read my blog post about the event here). Metric² is a free app/download and this blog gives some insight into how it works, and how you can download and install it in your own HANA system:

Overview

Metric² is made up of 3 key areas:

Dashboards: Metric² can have multiple dashboards. Dashboards are designed as blank canvases, are quite flexible, and can contain widgets which are added can be simply dragged and dropped into their needed locations and also sized accordingly.

Widgets: Dashboards can have multiple widgets displayed. There are a variety of widgets including a range of predefined datasources (CPU, Memory, Disk etc.) but also include custom widgets (SQL, JSON, Yahoo) which can display a myriad of information to your team.

Alerts: Certain widgets can have alerts “attached” to them, when the value meets the conditions, the alert is logged and displayed.

  1. Why realtime? The intent is to be proactive about your systems or applications health, having the Metric² dashboards up on a large format monitor ensures that everyone is well aware of how your system is performing, and more importantly, when it is not.
  2. Why Web Based? While I personally prefer Native/Traditional/Window types apps, having Metric² run as a web app (using SAPUI5) means it can be used and displayed on a variety of devices and formats.
  3. Why do you call it a platform? Its more than just a bunch of metrics, everything is customizable, you can create your own widgets, your own dashboards and alerts, it also acts as a large data warehouse for any of the data you are monitoring/tracking, taking it past being an app, to a small platform which you can build, and extend upon.

Image1.png

Architecture:

This was an interesting dilemma for me, I wanted to keep the app as simple as possible by not requiring that admins install *any* additional components (thus deemed as a “Native” XS HANA app). It has a DB schema which Metric² needs to have present, and subsequently a set of files which get installed in the content repository via a package.

This lead to an interesting challenge, because the XS Engine did not support web sockets for “true” realtime app runtime, the app uses timers and HTTP polling to fetch the data from the backend system (read xsjs file). This is less than perfect. I have high hopes that SPS7 will include WebSocket support and we can start writing true realtime web apps directly on XS Engine. Another alternative is the recent availability of Node.js library for HANA, while its awesome, still requires additional components outside of the core HANA platform.

Image2.png

Design:

The app is based on a “Fiori” themed SAP UI5 foundation. I also used a variety of JQuery add-on’s to help (read: not reinvent the wheel) with the display of  the data. I also used the standard D3 visualization library of UI5 along with a helper class called NVD3 which is very useful in simplifying the D3 charting experience.

Image3.pngWhats Missing:

- Currently the app does not support multiple users.

- Browser support … currently its developed for Firefox only, but does not look too bad on Safari or Chrome (CSS Changes needed).

- The polling aspect, because the data is being fetched from your XSJS file and returned to the main page, I am constantly having to eval the returned code to update the chart widgets. Eval is Evil

- Widget history: Because widgets are being polled, if the screen is not open, it will not capture any historical data. Not very useful for troubleshooting.

Whats Next:

I am currently working on porting the app to support the realtime abilities. Planning on a new theme (not so much Fiori like) to make it a little more differentiated. Also planning on adding a few more predefined widgets (suggestions welcomed!!!).

Download:

Here

Install Guide:

  1. Import the Metric² Package to the content repository in XS Engine (This can be done via Web or Studio)
    1. Open http://YOURIP:8000/sap/hana/xs/ide/
    2. Click on the Delivery Unit Menu and then Import Delivery Unit From File System
    3. Select the downloaded/unzipped file (REPO_20131109-203950826-HDB–METRIC2.tgz)
  2. Run the Install script (InstallScript.sql) for the DB which is included in the download – This can be done in either HANA Studio or the Web IDE
  3. Optional: Run the Overview dashboard script (Overview Dashboard.sql) from here to give you a sample dashboard  – This can be done in either HANA Studio or the IDE
  4. Open your browser to http://YOURIP:8000/lilabs/metric2/Index.html

- Optional: Predictive Analytics: You may need to enable PAL on your server in order to use the libraries and forecasting feature under some of the widgets.

Known Issues:

- The ping response widget is not functional currently

- The Total CPU reported on the “System overview” widget should be converted to a legitimate percentage (0 – 100%) as SLES displays a summed percentage of all the CPU’s.

- The Map of the US Widget – coordinates are not accurate, they need an offset due to the images size and padding within the widget

- The dashboard itself is not fully responsive, when displaying on an iPad the view is often too small to display all the widgets

- There is no mail server functionality built into XS Engine, so alerts are only displayed on the monitor and in the notifications area on the right of the screen.

You can submit an issue log on my website making it easier to track, share, resolve: http://blog.li-labs.com/issue-log/

Disclaimer:

Vishal Sikka made a humorous reference at the Las Vegas Keynote to a certain “Pre-release” Beta product, so I am going to do the same This version of Metric² is a “Prerelease” beta please use and test it thoroughly in your development environment.

Stay up to date:

Please head over to http://www.metric2.com and signup for the newsletter, this way I can stay in touch with people interested in learning more.

License:

This software is provided as is, and with no warranty. You may copy, modify and share the code for personal purposes. You may not sell or include, any parts, or as a whole, the software. Please share the download via the URL provided – Thanks.

Favor:

If you install Metric² and build an interesting dashboard, please tweet or share it in the comments. Also if you find any errors or issues on the installation process, please let me know and I will gladly update this guide. Thanks

Node.js dashboard for SAP HANA

This is what we will be developing in this blog …

Over the past few years Node.js has really caught my attention. The simplicity of Javascript with server side processing, Non-blocking-IO, Event Driven, and simple integration always intrigued me as a great combination for enterprise applications. (Somehow it sounds similar to HANA XS Engine)
A couple months ago I ran into a similar problem to Jon-Paul Boyd (HANA Forum Post) in which I wanted to use XS Engine for websocket/persistant connections to my HANA Instance, but due to the support not being included in SPS6, I decided to look elsewhere, and ended up using Node.js to fulfill this requirement.

In the past, while developing HANA/Node apps, I resorted to creating a XSJS App which really just acted as a middleware layer to push and pull data from my HANA DB, until recently I noticed a great blog post from Ingo Sauerzapf which piqued my interest. The blog mentioned that Holger Koser had created a HANA DB Client for Node making life extremely easy to connect to HANA directly from Node. I thought it would be good share the small project I developed using Node.js and this new client with the community in the hopes that others will share their experiences with the technology.

This blog is not necessarily an introduction to Node.js development as there are some nice tutorials and examples out there from Tobias Hoffman and Alessandro Spadoni. The blog is intended to cover a small app developed in Node.js and shows the development process behind it, taking it from conception through to reality. I encourage you to download a few of these components, and also the example out. This app, similar to another app I developed called Metric² (which you can read about here), it is a web based widget showing some friendly KPI’s on the performance of your HANA Instance. The app gets streaming data from our HANA backend displaying this in a friendly, simple dashboard. The dashboard is designed to be shown on a large format monitor in a Ops or IT center and can also very easily be modified to show any KPI’s relevant to your business or needs.

Requirements:

SAP HANA Instance (e.g. AWS Developer Image)

Node.js installed (this does not need to be on the HANA box but same network with access to the HANA port – normally 30015).

Node Dependencies

We will also use a couple of helpful dependencies from the node community including Socket.io, Express and obviously hdb. Installing these packages is as simple as running “npm install hdb”. Once you have the dependencies installed we can start creating our app.

https://nodei.co/npm/hdb.png?compact=true

App Design

For me, I always start mocking up in my favorite Image IDE (Photoshop), I used this image as inspiration for my app. I liked the simplicity, clean layout with focus on the numbers at the bottom. In our case, we will add a small chart in the center, giving us a basic visual representation of the numbers being displayed:

 

Photoshop HTML Mockup
Download the PSD

App Development

Index.html

In this case I decided to use Twitter Bootstrap to help with some of the layout/formatting of the page as well as some mundane tasks like Modal popups. From a coding perspective I started out developing the Single paged “index.html” file, doing my best to stick with my mockup which I previously created. I was sure to “id” all of my elements on this page as we will be updating these values from our node.js backend. This aspect of node development is strictly “traditional” web based development. No need to work with Node or any server for that matter. Once you have your page rendering the way you want, we can move on.

<html>

<head>

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

<meta charset="UTF-8"/>

<meta name="viewport" content="width=device-width, maximum-scale=1.0" />

<title>Metric&#178;</title>

 

<!-- jQuery -->

<script src="https://code.jquery.com/jquery.js"></script>

 

<!-- Socket.IO -->

<script src='/socket.io/socket.io.js'></script>

 

<!-- Peity - a lightweight sparkline package for jQuery -->

<script src='js/jquery.peity.min.js'></script>

 

<!-- Client side code needed -->

<script src='js/client.js'></script>

<!-- Bootstrap CSS -->

<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">

 

<!-- Latest compiled and minified JavaScript -->

<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>

 

<!-- CSS -->

<link rel="stylesheet" href="css/style.css">

 

</head>

<body>

<div id="top">

<div>

<div>

<div>

<table>

<tr>

<td rowspan="2" style="text-align: center; width: 10%;" >

<img id="statusicon" src="img/OKIcon.png"/>

</td>

<td style="vertical-align: top;">

<h1><span id="info-name">SAP HANA Instance</span>

<button data-toggle="modal" data-target="#myModal">

<span></span>

</button>

</h1>

</td>

</tr>

<tr>

<td style="padding-top: 20px;">

<span style="margin-left: 0px;" /></span><span id="info-alerts">0</span> Alerts

<span></span><span id="info-version">1.0</span>

<span></span><span id="info-detail">Server Location</span>

</td>

</tr>

</table>

 

</div>

<div>

<span>0</span>

</div>

<div>

<table>

<tr>

<td id="infoUSERS" onClick="setChart('USERS');">

<!-- The ID of each of our <SPAN> tags is important for updating the data being returned from the server -->

<span id="info-users">0</span><br />

<span>Users</span>

</td>

<td> </td>

<td id="infoDISK" onClick="setChart('DISK');">

<span id="info-disk">0</span> <sup>GB</sup><br />

<span>Free Disk</span>

</td>

<td id="infoMEM" onClick="setChart('MEM');">

<span id="info-mem">0</span> <sup>GB</sup><br />

<span>Free Memory</span>

</td>

<td id="infoCPU" onClick="setChart('CPU');">

<span id="info-cpu">0</span> <sup>%</sup><br />

<span>CPU</span>

</td>

</tr>

</table>

</div> <!-- /.containerfooter -->

</div> <!-- /.container -->

</div> <!-- /.centercontainer -->

</div> <!-- /.top -->

 

 

 

<!-- Modal -->

<div id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

<div>

<div>

<div>

<button type="button" data-dismiss="modal" aria-hidden="true">&times;</button>

<h4 id="myModalLabel">Settings</h4>

</div>

<div>

<form id="modalbox" role="form">

<div>

<label for="servername">Name</label>

<input type="text" id="servername" placeholder="Enter a reference server name">

</div>

<div>

<label for="serverdetail">Location</label>

<input type="text" id="serverdetail" placeholder="Description, Location or Other Information">

</div>

<div>

<label for="bg">Background</label><br />

<label>

<input type="radio" name="bg" value="../img/bg1.jpg" checked> Background 1

</label>

<label>

<input type="radio" name="bg" value="../img/bg2.jpg"> Background 2

</label>

<label>

<input type="radio" name="bg" value="../img/bg3.jpg"> Background 3

</label>

<label>

<input type="radio" name="bg" value="none;"> None

</label>

</div>

<div>

<label for="colorscheme">Color Scheme</label><br />

<label>

<input type="radio" name="colorscheme" value="Dark" checked> Dark

</label>

<label>

<input type="radio" name="colorscheme" value="Light"> Light

</label>

<label>

<input type="radio" name="colorscheme" value="Fiori"> Fiori

</label>

</div>

<div>

<button type="button" data-dismiss="modal">Close</button>

<button type="button" id="modalSave" onClick="saveSettings();">Save changes</button>

</div>

</div><!-- /.modal-content -->

</div><!-- /.modal-dialog -->

</div><!-- /.modal -->

 

 

 

</body>

</html>

App.js

Next we develop the app.js file which is the brains of our operation. This file is firstly going to act as our web server for our web site, and secondly provide the data from our HANA server to the web page, pushing the data via web sockets.

Below is the app.js code, here you can see how we process each request based on the type and subsequently respond with the requested data. You can also see how simple it is to call the HANA DB and respond with the results.

 

var express = require('express'),

http = require('http'),

hdb = require('hdb');

 

 

try {

var app = express();

var server = http.createServer(app);

server.listen(3000);

var io = require('socket.io').listen(server);

 

app.use(express.static(__dirname + '/'));

 

// development only

if ('development' == app.get('env')) {

app.use(express.errorHandler());

}

 

var client = hdb.createClient({

host     : 'Your HANA IP Address or DNS Name',

port     : 30015,

user     : 'username',

password : 'password'

});

 

client.connect(function (err) {

if (err) {

console.error('Connect Error:', err);

} else {

console.log('Connected to server');

}

});

 

process.on('uncaughtException', function (err) {

console.log('Caught exception: ' + err);

});

 

strContent = '';

 

io.sockets.on('connection', function (socket) {

socket.on('request', function (data) {

// Handle Service Requests

switch (data.service) {

case 'CPU':

client.exec("SELECT ABS(SUM(PROCESS_CPU)) as CPU from SYS.M_SERVICE_STATISTICS", function(err, rows) {

if (err) {

console.error('Error:', err);

} else {

socket.emit('response', {service: 'CPU', response: rows[0].CPU});

}

});

break;

case 'MEM':

client.exec("select TO_VARCHAR(ROUND((FREE_PHYSICAL_MEMORY) /1024/1024/1024, 2)) AS FREEMEM

from PUBLIC.M_HOST_RESOURCE_UTILIZATION", function(err, rows) {

if (err) {

console.error('Error:', err);

} else {

socket.emit('response', {service: data.service, response: rows[0].FREEMEM});

}

});

break;

case 'INFO':

client.exec("SELECT VALUE FROM SYS.M_SYSTEM_OVERVIEW WHERE NAME = 'Version'", function(err, rows) {

if (err) {

console.error('Error:', err);

} else {

socket.emit('response', {service: data.service, response: rows[0].VALUE});

}

});

break;

case 'DISK':

client.exec("select TO_VARCHAR((ROUND(d.total_size/1024/1024/1024, 2) - ROUND(d.used_size/1024/1024/1024,2))) as FREESPACE

from ( ( m_volumes as v1 join M_VOLUME_SIZES as v2 on v1.volume_id = v2.volume_id ) right outer join m_disks as d on d.disk_id = v2.disk_id )

where d.usage_type = 'DATA' group by v1.host, d.usage_type, d.total_size,    d.device_id, d.path, d.used_size", function(err, rows) {

if (err) {

console.error('Error:', err);

} else {

socket.emit('response', {service: data.service, response: rows[0].FREESPACE});

}

});

break;

case 'USERS':

client.exec("SELECT COUNT(CONNECTION_ID) as STATUS FROM SYS.M_CONNECTIONS

WHERE CONNECTION_STATUS = 'RUNNING'", function(err, rows) {

if (err) {

console.error('Error:', err);

} else {

socket.emit('response', {service: data.service, response: rows[0].STATUS});

}

});

break;

case 'ALERTS':

client.exec("SELECT COUNT(ALERT_DETAILS) as ALERTCOUNT FROM _SYS_STATISTICS.STATISTICS_CURRENT_ALERTS", function(err, rows) {

if (err) {

console.error('Error:', err);

} else {

socket.emit('response', {service: data.service, response: rows[0].ALERTCOUNT});

}

});

break;

}

});

});

 

} catch(err) {

console.log(err);

}

 

The App does have a couple of different themes which will hopefully make it fit with your office decor

Below you can see a couple of images of the app running and showing the output. You can obviously very easily modify the code to show anything relevant to your business case as well. The Node-hdb package for node.js really makes developing HANA connected Node apps a breeze! Thanks Holger!

Fiori Styled
Light Theme
Image5.png
Dark Theme
Image6.png
As usual – please feel free to comment on your experience with Node.js and if you feel like this type of technology is a good fit in the enterprise? Do you have any suggestions on what I could have done differently?You can download the app here: Metric² for Node
Credits: The Bokeh backgrounds are from devientArt