Red Hat updates Python, PHP, Node.js, more; supports new arches

I am pleased to announce the immediate availability of Red Hat Software Collections 3.0 Beta, Red Hat’s newest installment of open source development tools, dynamic languages, databases, and more. Delivered on a separate lifecycle from Red Hat Enterprise Linux with a more frequent release cadence, Red Hat Software Collections bridges development agility and production stability by helping you create modern applications that can be confidently deployed into production. Most of these components are also available in Linux container image format to streamline microservices development.

In addition to these new components having traditional support for x86_64, Red Hat Software Collection 3.0 Beta adds support for three new architectures: s390x, aarch64, and ppc64le.

NEW ADDITIONS to Red Hat Software Collections 3.0 Beta include:

Continue reading “Red Hat updates Python, PHP, Node.js, more; supports new arches”

Share

Local Development Setup for Red Hat Mobile using Docker

Getting up and running with local development for Red Hat Mobile Application requires that you run MongoDB and Redis locally. Doing so isn’t particularly difficult if you follow online guides, but it would be much more straightforward if you could just get these pieces of software up and running in a single command and not need to worry about versioning, creating data directories, setting permissions, and compiling some things such as Redis from source. It would be even better if you could easily switch versions. This is where containers shine.

In the next few paragraphs, we’ll demonstrate how you can run any almost any version of MongoDB and Redis with a single command on a machine that has the Docker service installed.

NOTE: This is not an extensive Docker CLI tutorial; just enough to learn basic commands that will allow you to get MongoDB and Redis up and running easily.

Continue reading “Local Development Setup for Red Hat Mobile using Docker”

Share

Technical Cheat Sheets for Developers

Over the past few months, we’ve been building and releasing a variety of technical cheat sheets and we’ve been getting many requests for more.  We are working on new cheat sheets every day, ok maybe not weekends, but almost every day. Here are the cheat sheets available today: Linux Commands Cheat SheetAdvanced Linux Commands Cheat SheetWildfly Swarm Cheat SheetContainers Cheat SheetMongoDB Cheat SheetKubernetes Cheat Sheet and the Eclipse Vert.x Cheat Sheet.

Continue reading “Technical Cheat Sheets for Developers”

Share

Manage your Mongo Databases in RHMAP with Mongo Express

Red Hat Mobile Application Platform (RHMAP) supports an agile approach to developing, integrating, and deploying enterprise mobile applications. Most likely, your mobile apps will include one or more cloud apps which will require persistence support such as a Mongo Database. But managing databases is not always easy, as command line support for this databases is complex and not always available.

To ease this pain, Mongo Express can be used as an database GUI. For the mongo databases in your cloud apps, it is a powerful and intuitive tool which can be used in conjunction or as substitute for the default database browser. The main benefits from using “Mongo Express” instead of “Data Browser” are:

  • Can run complex queries
  • In-depth stats for every view
  • Supports BSON types as TimeStamp() or DBRef()

IMPORTANT: there are some implications when using Mongo Express as a database manager:

  • Mongo Express can only manage the databases in one Cloud App and environment at a time
  • There is no authentication by default when using Mongo Express as explained in this article so take into account all the security issues that this may arise [1]
  • Users running the platform on the RHMAP should upgrade their databases if it was not upgraded before

[1] Check the Annex ‘how to add authentication’ to overcome this issue

Continue reading “Manage your Mongo Databases in RHMAP with Mongo Express”

Share

A Lesson in Debugging: Big Projects Have Critical Bugs Too

I recently had an interesting problem which served as a great learning experience. It involves hair-pulling levels of frustration, vicious finger-pointing, and an unexpected ending — not a TV Soap opera episode, just a day in the life of a developer.

It all started with a REST API I had built for a customer proof of concept that started refusing requests after an arbitrary period of time. Nothing was unusual in the codebase of the REST API — it was two simple CRUDL endpoints on equally simple objects.
I’d built similar many times before, and probably will many times again – but yet still, this process kept hanging, refusing requests. The time it took to fail was arbitrary — sometimes immediate, sometimes hours, sometimes days.

Eventually, through some SSH foo we discovered that the count of open file descriptors was growing inside the app’s container. I wrote a simple endpoint to query the number of open file descriptors, and it looked like this:

app.get('/fd', function(req, res){
  var fs = require('fs');

  fs.readdir('/proc/self/fd', function(err, list) {
    if (err) {
      return res.status(500).json(err);
    }
    return res.end(list.length.toString());
  });
});

Indeed, after restarting the process, it was clear that the file descriptor count would grow every few minutes, without stopping. An empty Node.js application didn’t exhibit the same problems, only this app.

Continue reading “A Lesson in Debugging: Big Projects Have Critical Bugs Too”

Share

Installing MongoDB on Red Hat Enterprise Linux

 

MongoDB has evolved into one of the most popular open source “NoSQL” databases—so-called because they dispense with the tabular storage schema of relational databases like MySQL and Postgres. NoSQL databases offer a variety of advantages in many cases

The biggest advantage is that MongoDB databases don’t require developers to define schemas before adding data to a database. Instead, they use a flexible document-based model, similar to Python dictionaries or Ruby hashes. With MongoDB, you don’t need to spend time creating tables before you can process your data. That makes the NoSQL approach ideal for situations where you don’t know how much data you have to handle, what form it is in, or how quickly it is going to move around.

There’s a lot more to say about what makes MongoDB, and NoSQL in general, a better fit for some situations. (I could also write a great deal about when not to use NoSQL—and that’s  important, because despite NoSQL’s current trendiness, it’s not better in all contexts.)

But that’s all fodder for a separate blog post. For now, let’s move onto the meat of this post, which is how to install MongoDB on Red Hat Enterprise Linux (RHEL) in order to take advantage of NoSQL databases.

Continue reading “Installing MongoDB on Red Hat Enterprise Linux”

Share