Vikram Vaswani

Check and Refresh IBM Cloud Access Tokens with PHP

To access an IBM Cloud service instance, you must have an IAM access token. To obtain an IAM access token, you must have an API key for the service. Access tokens can be obtained directly from the IBM Cloud IAM service, by making an HTTP query to the API endpoint at https://iam.cloud.ibm.com/identity/token and including an API key in the request. Here’s an example: curl -X POST 'https://iam.cloud.ibm.com/identity/token' -H 'Content-Type: application/x-www-form-urlencoded'… Read More »Check and Refresh IBM Cloud Access Tokens with PHP

Integrate a Node.js Application Quickly with IBM Cloudant

IBM Cloudant is a fully-managed, distributed database that runs as a service on IBM Cloud. It is based on Apache CouchDB and the easiest way to access it is with an IBM Cloudant client library. As of this writing, IBM CLoudant client libraries are available for Node.js, Python, Go and Java. To illustrate how this works, I’ll provide a few examples of how to connect to, and use, an IBM… Read More »Integrate a Node.js Application Quickly with IBM Cloudant

Read and Write Data on IBM Cloudant with PHP

IBM Cloudant is a fully-managed, distributed database that runs as a service on IBM Cloud. It is based on Apache CouchDB (although it is not open source itself) and can be accessed using a standard HTTP REST API. If you’re building an application that uses IBM Cloudant as a data store, this REST API makes it easy to interact with the database service from any language that has an HTTP… Read More »Read and Write Data on IBM Cloudant with PHP

Deploy a Cloud-Native Database Service on IBM Cloud

A database in the cloud is a wonderful thing. It can serve as a secure, reliable and (most important) off-site data store for your application. It can also come in handy under different testing scenarios: for example, when you need to test an application refactor but can’t be bothered to spin up a database container locally, or when you’re trying to benchmark application performance under heavy load. A good example… Read More »Deploy a Cloud-Native Database Service on IBM Cloud

Create IBM Cloud Service Credentials with the IBM Cloud CLI

To access an IBM Cloud service instance, you need service credentials. These credentials can be generated via the IBM Cloud Dashboard or the IBM Cloud CLI. My preferred approach is always to use the CLI, but it can be confusing the first few times you attempt it. Here’s a quick cheat sheet: 1. Create the service instance (read more about service instance creation via the CLI). Here is an example… Read More »Create IBM Cloud Service Credentials with the IBM Cloud CLI

Create IBM Cloud Services with the IBM Cloud CLI

Most of the time, I use the IBM Cloud Dashboard with my browser to manage applications, instantiate services and check status. But sometimes, the point-and-click approach is just too slow. So, when I feel the need for speed, I switch over to the IBM Cloud CLI instead. This CLI, which is available for Windows, MacOS and Linux, provides a full-featured alternative to the browser-based IBM Cloud Dashboard. The IBM Cloud… Read More »Create IBM Cloud Services with the IBM Cloud CLI

Go Serverless with PHP

If you’re building a small, single-purpose Web application and you want to run it in the cloud, the the typical option is to reach for a small cloud server from Amazon, Google or Azure. Those servers are relatively cheap to run and easy to deploy, but there’s an ongoing investment of time and effort required to keep them secure and updated. In many cases, a even easier solution is to… Read More »Go Serverless with PHP

Monitor and Correlate Personal Asthma Readings with Environmental Data

For people suffering from asthma, a peak flow meter makes it easy to monitor lung capacity and understand how changes in weather and season affect their condition. Typically, this information is stored as discrete readings in an “asthma diary”. The problem with a paper diary, though, is that as the number of readings increases, so does the difficulty of analyzing them in a holistic way. To make this easier, I… Read More »Monitor and Correlate Personal Asthma Readings with Environmental Data

Migrate from CCTM to Pods in WordPress

When I first started with this WordPress blog, I installed the Custom Content Type Manager (CCTM) plugin to help me manage custom content types. Although this has been perfectly adequate for my needs, I’ve been looking to migrate over to the Pods plugin for a while now, if only because it seems to offer a bunch of additional features (relationships, a REST API…) and a nicer interface. And recently, when… Read More »Migrate from CCTM to Pods in WordPress

Track Time Spent on Projects with IBM Cloud

Many, many years ago, I wrote an article about building a timesheet system to track and analyze work hours with PHP 4.x. It was a fairly useful little application, one that I ended up using quite a bit in my daily work as a consultant. As my requirements increased, I moved on to other project management systems…but I always had a soft spot for this, the one I used with… Read More »Track Time Spent on Projects with IBM Cloud