Creating a health dashboard by hacking intelligence into an AOpen (the ‘A’ for ancient) monitor; with metrics aggregated by Graphite and beautifully displayed with Grafana.
Killing Floor 2 can be pretty fun, especially with a great crew. Not to mention the amazing community, which continues to pump out workshop content such as custom maps. With a crew assembled from players around the world, we casually run games now and then, a solid amount on custom maps.
Well, one of the servers I manage went down for some time. It wasn’t until further investigation that I discovered the host ran out of disk space with all the custom maps we’ve loaded.
It was a minor inconvenience that resulted in some down time. However, it was something that would’ve easily been foreseeable, assuming I was monitoring the host.
This made me realize something; a pretty solid chunk of services I host for both external and internal use are manually monitored.
And by that, I mean I remote into them whenever the fit hits the shan.
Nowadays, tools which help in application monitoring and insight are bountiful. It would’ve been easy enough to just pick one and deploy.
But that would be boring.
So, in combination with the need for some app. monitoring & insights, let’s build our own monitor (literally), which will be mounted on my server rack with the sole purpose of displaying a comprehensive health dashboard.
So, where we headin’?
Over the course of the next few weeks, I’ll be further covering specific goals, documenting the progress already made, ranting on my failures, and generally discussing what I’ve learned – and will learn along the way.
To make following along simple, each post dedicated to this project will not only be categorized grapi, but also have its titled numbered in order of chronology and relevance.
A long time ago, I’ve uploaded a picture of my Purple Leaf Plum during the summer.
Now, after numerous updates and server changes, I tried to access the image only to get thrown a generic PHP error 500. Further investigation shows that it also happened with quite a few older files as well, including some images from some of my old pages.
Et tu, high-school portfolio?
While I could care less about that breadboard schematic back in 11th grade, that purple leaf plum picture was pretty nice.
Therefore, let’s embark on a journey to recover access to my purple leaf plum from a Windows Server machine running WordPress on IIS.
(or for the impatient, a TL;DR: PHP file uploads weren’t inheriting correct permissions)
Browsing directly to files uploaded in the past would result in an err. 500.
Unable to edit (e.g. crop images) through WordPress Media Library.
500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
Knowing what a 500 means is one thing; pin-pointing the cause is a whole new ballpark altogether, considering 500’s can be pretty vague.
In the past, I’ve modified the permissions for alvinr.ca in such a way that I wouldn’t be able to update through wpadmin – only manually. While this gave some odd behavior through wpadmin (asking for FTP credentials when hitting ‘Update Now’), it was expected. Could this error 500 issue be related?
Well, let’s take a look at the permissions for one of our uploads.
Huh. Well, we’re missing some entries; namely Users, IUSR and IIS_IUSRS. Unsure how that happened, but let’s add the permissions and try browsing to it again.
Aha! It works! The Purple Leaf plum is now visible in all its glory.
Now that we’ve resolved that, let’s continue on with our lives. Making another post, uploading another image… and guess what.
It happens again.
Same error 500, and the uploaded file is missing those permissions!
What’s going on here? Who/what keeps nuking necessary permissions to my WordPress uploads?
To better understand this, let’s talk about what exactly happens when you upload a file to WordPress.
The process of uploading a file to WordPress is handled by PHP. During this process, PHP retrieves the file from the client, placing it in a temporary location, before moving it to wp-content/uploads as dictated by WordPress.
When a file is written to this temporary location by PHP, it inherits permissions associated with that location.
When the file is moved to a WordPress specified location, it’s just that – moved. It STILL retains the permissions from the PHP temporary location.
And since PHP is not ran by a user that owns the file, its permissions cannot be changed after the move.
This explains why new uploads are affected. It also explains possible origins to this problem;
Updates to PHP
Modifications to PHP or your IIS site’s handler mappings
Modifications to the temporary file upload location written to by PHP
Define a new temporary file upload location for PHP
Add specified users above to temporary file upload location used by PHP (not recommended)
Since the default location for PHP file uploads is C:\Windows\temp , which is used by other applications including the system itself, I’d like to keep its permissions pristine before it causes conflicts, or even worse, opens security holes.
Thus; let’s specify a NEW default temporary file upload location by modifying php.ini (PHP configuration file).
Create a new location to be used for temporary file uploads by PHP Example; C:\inetpub\php-temp
Launch IIS Manager, identify PHP used for site by inspecting Handler Mappings
Navigate to location of php.ini for PHP installation identified previously
Open php.ini, find the upload_tmp_dir configuration item, un-comment by removing the leading ‘;‘, and specify the new location
How to find your PHP configuration (click thumbnails to enlarge image):
1. Select site in IIS Manager > Handler Mappings
2. View Ordered List to determine PHP used by site
3. Sort by path, identify highest priority name for *.php path
4. View Unordered List, and double-click item identified previously
Lessons learned; error 500’s are sometimes more predictable when your web application is WordPress. Also; clean up your handler mappings. May your posts be fresh, and your images always available.
Knowing the implications of a boring project chosen with very little interest, our first (and perhaps longest) team exercise was in ideation. The first month was spent on brainstorming – learning more about each other and our interests – so that we may find a project that either aligns with the collective interest, or possesses at least one element that interests each member.
Our earliest brainstorming sessions were perhaps the least technical. They were more or less friend-meets; talking about interests, directions we wanted to take the project, and the severe lack of healthy fast food locally.
Eventually, we managed to narrow down some common archetypes. From here, we directed our discussions more towards the overall project. What kind of problems exist in the world today relating to X? Could we see ourselves doing Y for a year? Will we get arrested for Z?
From here, we worked out three, solid project ideas.
All that was left was to investigate the technology we would need, the expertise of our team, the support available, and project breakdown should we choose that idea to run with.
For Atlabs, we were all interested in doing something we’d see ourselves (either in the past, present, or future) using. Hence, we went down the mobile indoor mapping route, finding enough features in here that would satisfy everyone. Then, we discussed the scope – quickly realizing that The Path wouldn’t be feasible (the first rule of Toronto is: you don’t commute to Toronto). So, we chose our campus; the Sheridan College, Davis Campus.
Finally, we talked technology;
Mobile as per current app trends – specifically Android based on team expertise
In it’s earliest stages, Google Indoor Maps was terribly limited – being literally black and white floor plans. WRLD3D directly supported route finding, a detailed POI handling system, not to mention having full 3D interactivity support that looks downright awesome.
This was how the Campus Navigator was born.
People over ideas. Ideas come and go, a majority never bearing fruit, remaining as lost promises. People are forever; they’re living, breathing, and exist right here, right now. Give them a reason to, and they will stand with you through thick and thin long after your idea grows wings, or turns to dust.
Our success in capstone came from excellent teamwork, and I couldn’t have asked for better.
By volunteering as guinea pigs for this wild ride, I’ve developed a better understanding and appreciation for proper resource assignment and time management. At the same time, I hope that I managed to imprint some wisdom into you that’ll be carried on into your future endeavors.
The leadership, project management, and variety of development skills learned throughout this project will not be forgotten – and man, am I excited for the next opportunity to try them out.
Sometimes in a project, you find yourself wondering where the time’s gone. Then you realize you’ve been tracing lines in QGIS for the past hour.
When it came to development, my time was spent on two main facets of this project; the Discussion feature, and Map Design.
For Discussion, we’ve envisioned from the start a thread-like board not too dissimilar from Reddit, where a user can nest replies, as well as influence the score of thread replies via voting. Each point of interest (POI) of our map is to have its own ‘Post’, where users can have discussions by making top-level comments, then nest replies within each.
Users that are not logged in would see the same discussion, but would be unable to comment/rank replies until authenticated.
Realistically, authentication should be tied to students, and hence, would use an institutions’ SSO.
As a proof, we’ve utilized FireBase, which both manages discuss data storage, and user authentication via Google’s OAuth.
A solid half of the effort I’ve invested in this project went towards Map Design. Initially unfamiliar with the concept of geographical information systems (GIS).
Seriously. I’m a Software Developer. My city shaping skills were limited to Sid Meier’s Civilization V. Until this project, of course.
Perhaps our greatest adversary, our team fought time to grasp the essentials behind geographical design so that we can design indoor maps in QGIS.
Of this time, roughly 40% was spent on tracing the provided floor plans. QGIS’ built in Georeferencer helped tremendously; but could only help so much, since some building outlines were misshapen (as provided from WRLD3D), or just plain didn’t exist (in terms of Sheridan College, Davis Campus’ A-Wing), resulting in a warped output from Georeferencer that could not be reliably depended upon.
The rest of the time was primarily spent drawing straight lines, identifying key features (doors, walls, rooms) and attributing them.
These design tasks were one of the largest takeaways for me; having needed to use several different coordinate reference systems (CRS), as well as handle complex designs (honestly, this makes those ‘floor plans’ seen on HGTV look like chicken scratch). Perhaps most importantly, it helped me improve my spatial awareness and general geographical design mindset through several nights of lost sleep over “is this also considered hallway?”, and “would I realistically take this path from X to Y?”
After publishing, any time left was used to correct any misshapen areas and resolve compilation errors with WRLD3D.
Practice makes perfect. Unless you’re presenting. In that case, practice makes confidence, which makes perfect.
When it came down to presentations, Sheridan’s CST courses ensured we did. Lots.
Every group discussion session in CST2 was met with a “throw me an elevator pitch”. It only got more intense with formal presentations; first to our capstone session, then to a panel of venture capitalists, eventually leading towards the grand finale at the Sheridan College Capstone Showcase held at Trafalgar.
Capstone helped me realize something important in life; that presenting doesn’t have to be a chore. No, it’s not a ‘necessary evil’, and no, it doesn’t have to be a period of extreme anxiety and dread. Like talking with friends, a phone call, or even reading this post – it’s just another way we communicate.
Every day, we’re inherently presenting ourselves to the world. What changes, then, when you slap the label ‘presentation’, onto something? Usually, it’s something being put at stake; from a good grade to a career opportunity. However, we’re always putting something at stake when presenting – and that doesn’t necessary have to be something to fear.
We’re inherently social creatures slowly losing our ability to communicate confidently face-to-face by black text on a white screen. If there’s anything to fear, it’s this.
Thus; thank you Capstone for mock interviews, group discussions, elevator pitches, release candidates, VC pitches, and showcases. Like a good workout, the pain was there, but I’m leaving Sheridan stronger, and more presentable for it.
The journey was perilous. I supported my team to the best of my ability. It hurt to watch others fall without support of their own. Great ideas, and even greater students. Gone by December.
Now, I didn’t really see fit to include this category in this little reflection of mine, but it’s necessary. Especially if you’re reading this in preparation for your own capstone.
Capstone teams need more support from Sheridan College.
And by ‘Sheridan College’, I’m referring to everyone/everything outside of the capstone faculty – which were downright awesome, and perhaps some of the most inspirational professors I had the pleasure of working with (you know who you are, Simon, Geoff, John).
While Atlabs was successful, it was only through the hard work, planning, leadership, and dedication from each of its members. We’ve all given up something along the journey, some more than others. In some cases, literal blood, sweat, and tears went into it.
On the other hand… Some teams disbanded, their members dropping out of capstone all-together. Others had to completely drop their idea for another with a MONTH remaining in 2019. There were even those with industry partners who abandoned them mid-capstone.
While there may be extenuating circumstances for these, I personally blame Sheridan College for being at the core of them. However, that’s all in the past now. And while it’s left some lasting impressions on students, let’s talk about the future, and what can be done to make better impressions on future generations of students entering a Computer Technology related capstone.
The two pillars of support I’d like to see moving forward would be:
Monetary – Support us financially. The majority of our financial spending went towards our meets and presentations in the form of printouts, handouts, brochures, hardware rentals, etc. I’ve had the pleasure of talking with some very creative individuals with some outstanding ideas who were unable to carry through with them due to the lack of funding, either because they ran out of Azure credits, or they required equipment/technology that isn’t available/affordable to the average student.
Community – Capstone shouldn’t be an ‘Applied Computing’ event. It’s a SHERIDAN event. I’m serious. Students put an entire year’s worth of efforts, alongside their full-time studies, co-op, part-time jobs, and LIFE to work on this. This is a momentous occasion, and I was seriously disappointed by the lack of impression from Sheridan. All of Sheridan College’s faculty and student body should be aware of capstone, what it is, and why we do it. Essentially, capstone should be prestigious. That way, when a team such as ours has to inquire for the floor plans necessary for our solution, it doesn’t take 4 MONTHS for facilities to deliver (there’s really no excuse, snippets are used in a variety of places on/off campus). OR, when we present at the capstone showcase, students actually have an idea as to what’s going on, engage with teams, and understand the full weight of what we’ve accomplished (no, it’s not a homework assignment).
deep breath. Alright.
FUTURE OF CAPSTONE
Any practical industry project involves more than just ‘software’. There’s a variety of people involved from different professions, such as the engineers to work out the hardware, and business analysts that help predict how to insert into the market.
To make this a much more fulfilling, creative, and outstanding project; let’s see capstones bridged across programs, integrating students from various career paths.
Let’s take the following for instance, where there’s amazing potential in an IoT technology sector for mechanizing central air vents and controlling them with your thermostat. That way, you can effectively choose how warm/cold different parts of your home should be. Heck; let’s take it a step forward and integrate simple proximity sensors. Now we’ve got an automated system that can intelligently heat/chill rooms with occupants.
While engineering students may be able to mechanize air vents, they’ll be lost when it comes to the software necessary to interface and drive communication between these vents and some centralized air system. That’s where a SDNE student would kick in.
Not only would this be more realistic, but it would be a downright amazing learning experience for everyone involved. As for the quality of capstones? You’ll be shaping the next generation of innovators.
Bringing the world together to protect life in our waters, make fisheries and aquaculture more sustainable and equitable, and preserve our planet’s future.
The only thing better than eating fish is hacking them.
In the proverbial sense of course.
On the second week of February, I lead team ‘Finna hit a Fin’ at Hackernest’s annual Fishackathon held at Toronto city hall. Through a rigorous 28 hour non-stop development cycle, we managed to create and present a functional prototype of our solution; Infinifish.
Infinifish is a hand-held device that simplifies fish identification, meant to capture data from the fin, compare it against a known datasource, and provide an accurate identification of its species. For our prototype, we harnessed spectroscopy (color-sensing), as well as translucency data to identify a fish fin, and therefore, the fish.
Similar to a human fingerprint, fish fins are perhaps the most unique aspect of a fish. Our team wanted to take this idea further and create a simple, cheap ‘fingerprint’ scanner for fish.
Presented amongst the app-heavy crowd at Fishackathon Toronto, we discussed the modern relevancy of spectroscopy in light of all the AI and photo recognition technology. Quite simply; image/pattern recognition has its difficulties. These difficulties are being migitated via AI application to tech such as facial recognition, but until then, color pattern mapping via spectroscopy remains the affordable and simple solution.
Infinifish was a hit among the crowd with a demonstration involving live fin data, finishing the day at 2nd place, and was eventually presented to the faculty of applied science and technology (FAST) at Sheridan College.
Our solution is targeted primarily towards research and marine biology in hopes of automating currently manual identification methodologies, as well as recreational.
Infinifish is currently in development with effort being placed into enhancing accuracy via pattern matching, and will (hopefully!) be presented at the next Fishackathon in 2019.
Progress lies not in enhancing what [already] is, but in advancing toward what [could] be.
~ Khalil Gibran
The Northern Wind Club is a small social club that takes up projects in and around the Sheridan community, and through efforts between our club and clients, strive towards their successful completion.
We operate on a request and case basis; analogous to a service club.
These projects can be anything, and are decided upon by various factors including interest, resources, time, as well as the spirit of the request.
Do you dislike large, unorganized groups? Hate it when things never get done? Have a niche skill set that you’re dying to exercise? Or perhaps you’re a fanatic of progression and helping others.
In that case, the Northern Wind Club may be the place for you.
Java Sudoku Engine is a project built using FXML for PROG24178 at Sheridan College. It’s a neat little desktop application that generates Sudoku puzzles and contains a few nifty features that I’m sure Sudoku fanatics will love.
Check it out at Github, where you can also download it.
WHAT IS SUDOKU
Sudoku is an old number-placement puzzle, originating with recordable evidence during the 1800’s from an experiment with magic squares. The objective of Sudoku is to fill a grid with digits between 1-9 – the catch being that no two are to be repeated in a row, column, and individual 3×3 square. The end result can be compared to that of a Latin Square, a collection of elements with a nearly indistinguishable pattern.