Saturday, 7 July 2018

IBM API Connect V2018.3.1 is available

This just in: -

IBM API Connect V2018.3.1 is now available. This update includes important internal development fixes and support for the API Designer as part of the toolkit.

Content

IBM API Connect 2018.x delivers enhanced capabilities for the market-leading IBM API management solution. In addition to the ability to deploy in complex, multi-cloud topologies, this version provides enhanced experiences for developers and cloud administrators at organizations.

The API Connect 2018.3.1 update includes important internal development fixes. In addition, this release includes the API Designer within the toolkit. API developers use the API management functions in the API Designer or the CLI to create draft API definitions for REST and SOAP APIs, or for OAuth provider endpoints that are used for OAuth 2.0 authentication. The API definitions can be configured to add the API to a Product, add a policy assembly flow (to manipulate requests/responses), and to define security options and other settings. APIs can then be tested locally prior to publishing, to ensure they are defined and implemented correctly.

Upgrading to 2018.3.1 makes changes to the underlying data structure of API Connect.  It is highly recommended to have automatic backups configured in your environment and at least one successful backup complete prior to performing this upgrade.

We advise all users of IBM API Connect 2018.1.x and earlier versions of IBM API Connect 2018.2.x to install this update to take advantage of the fixes.

Friday, 6 July 2018

Doofus Alert - Using Cloudant queries via cURL

I'm continuing to tinker with Cloudant, and am looking at how I can use indexes ( indices ? ) via the command-line using cURL.

This is what I'm sending: -

curl -X POST -H 'Content-type: application/json' -g $COUCH_URL/$COUCH_DATABASE/_find -d query.json

and this is what I'm seeing: -

{"error":"bad_request","reason":"invalid UTF-8 JSON"}

I checked my query: -

cat query.json 

{
   "selector": {
      "$or": [
         {
            "givenName": "Maggie"
         },
         {
            "givenName": "Lisa"
         }
      ]
   },
   "fields": [
      "givenName",
      "familyName"
   ],
   "sort": [
      {
         "givenName": "asc"
      }
   ]
}

and it looks OK.

Thankfully, this chap had already hit the same: -



Yep, that's exactly where I went wrong ….

I changed my query: -

curl -X POST -H 'Content-type: application/json' -g $COUCH_URL/$COUCH_DATABASE/_find -d @query.json

and … guess what ….

IT WORKED

{"docs":[
{"givenName":"Lisa","familyName":"Simpson"},
{"givenName":"Maggie","familyName":"Simpson"}
],
"bookmark": "g1AAAAA9eJzLYWBgYMpgSmHgKy5JLCrJTq2MT8lPzkzJBYozGoIkOGASOSAhkDibb2J6emZqVhYA5ooQDg"}

Can you say "Doofus" ? I bet you can ….

Thursday, 5 July 2018

Note to self - setting AND keeping alternate boot device on  macOS

Having added a shiny new 256 GB SSD drive to my  Mac Mini ( this is a USB3 device as I didn't fancy opening up the Mini and replacing the in-built Fusion drive ), I needed a way to make the drive bootable.

I'd already used SuperDuper to clone the old drive to the new drive.

I just needed to work out how to (a) boot from it and (b) make the new drive the main drive.

This gave me the answers: -


Specifically this: -


Note this subtlety: -


Yes, it's all very well booting from the SSD, but no good if it then reverts back to the "spinning rust" that is the Fusion drive ( yes, I know it's a mix of disk and SSD ).

However, the other issue that I faced was that my Bluetooth keyboard ( connected via an external USB Bluetooth dongle ) did NOT allow me to press [Option] during the boot process.

This came to the rescue: -


however, if you use Apple's Bluetooth keyboard, you could find that the system may ignore these inputs and boot normally. While you might assume that these options require a USB keyboard or other physical connection

Thankfully I had a wired USB keyboard, so I used that ….

The article does offer some other guidance: -

If any inputs are being sent via the Bluetooth keyboard before the controllers are active, then they will not be recognized by the system. However, if these inputs are performed after the controllers are activated, then they will be properly read. Therefore, for Bluetooth keyboards, be sure to press the desired key sequences after you hear the boot chimes and not before.

which is nice.

So I'm now booting from USB/SSD and the 2014 Mac Mini is suddenly WAY faster !

Cloudant - Fun with Indexing and Querying

So I was trying to resolve an issue for a colleague, who needed to use an $or operator.

He found that his query would take a very long time ( minutes ) and fail to return any results, searching through ~500K documents.

I tested the problem and, eventually, the solution, using my own data set: -

id,givenName,familyName
1,Maggie,Simpson
2,Lisa,Simpson
3,Bart,Simpson
4,Homer,Simpson
5,Fred,Flintstone
6,Wilma,Flintstone
7,Barney,Rubble
8,Betty,Rubble


In Cloudant, each document looks like this: -

{
  "_id": "1",
  "_rev": "1-0152a3e6867ad34da6e882a80f0fbeff",
  "id": "1",
  "givenName": "Maggie",
  "familyName": "Simpson"
}

{
  "_id": "2",
  "_rev": "1-6bbb94301323a3c3f6ff54f1c3c765e5",
  "id": "2",
  "givenName": "Lisa",
  "familyName": "Simpson"
}

etc.

So this was the query I was using: -

{
  "selector": {
     "familyName": "Simpson",
     "givenName": {
        "$or": [
           {
              "givenName": "Maggie"
           },
           {
              "givenName": "Lisa"
           }
        ]
     }
  },
  "fields": [
     "givenName",
     "familyName"
  ],
  "sort": [
     {
        "givenName": "asc"
     }
  ]
}

In my simple brain, this would return documents for Maggie and Lisa, out of the eight in my database.

I'd previously created this index: -

{
   "index": {
      "fields": [
         "givenName"
      ]
   },
   "name": "givenName-json-index",
   "type": "json"
}

When I ran my query, I got nothing back: -


apart from this statistic: 


Thankfully I found a smart person on our Cloudant Slack channel, who told me where I was going wrong: -


So I changed my query: -

{
   "selector": {
      "$or": [
         {
            "givenName": "Maggie"
         },
         {
            "givenName": "Lisa"
         }
      ]
   },
   "fields": [
      "givenName",
      "familyName"
   ],
   "sort": [
      {
         "givenName": "asc"
      }
   ]
}

and now I see data: -


Yay!



This was also very useful: -


Wednesday, 4 July 2018

Using IBM App Connect enterprise capabilities with IBM MQ on Cloud

A requirement similar to this: -

Your company wants to expose a custom JSON-based REST API to their developers for sending messages to a stock control application through an MQ queue that is hosted in MQ on IBM Cloud. The format of the messages that the application expects is a custom COBOL copy book structure. An integration solution needs to be constructed that receives a simple JSON REST request, converts the JSON to the COBOL structure and then sends that to the correct queue. The integration solution is imported to run in IBM App Connect on IBM Cloud (with a plan that provides enterprise capabilities).

has come up recently, on a project upon which my team are engaged.

Therefore, this is rather useful_ 


Worth a read …...

IBM HTTP Server (IHS) Performance and Tuning and Some Docs

I was having a useful chat with a colleague about threading and concurrency in IBM HTTP Server, which is based upon Apache.

I provided him with a few pertinent URLs: -

For IHS 8.5.X ( based upon Apache 2.2 )




For IHS 9.X ( based upon Apache 2.4 )




and these: -



Tuesday, 3 July 2018

IBM Operational Decision Manager 8.9 - Tuning Guide

This was recently published to the ODMDev space on IBM developerWorks: -


IBM ODM performance architects, Pierre-Andre Paumelle (paumelle@fr.ibm.com) and Nicolas Peulvast (peulvast@fr.ibm.com), have just released a new version of the IBM ODM Tuning Guide. The guide takes you on a tour of the key areas of IBM ODM and shows you how to get under the hood and improve the performance of ODM versions 8.9.0, 8.9.1, and 8.9.2.

The guide covers various "basic" and "advanced" topics, for example, you can learn how best to set up tracing in the Rule Execution Server, and you can find information on how to configure Solr on Decision Center. There is also help for you on migrating a Decision Server database, and how to optimize Decision Warehouse.

So roll up your sleeves, and get tuning. With this guide and a bit of elbow grease, you'll have ODM purring like a kitten in no time!

Note to self - Firefox and local connections

 Whilst trying to hit my NAS from Firefox on my Mac, I kept seeing errors such as:- Unable to connect Firefox can’t establish a connection t...