How-tos

Deploy a Microservice Architecture with Cloud Tools (video)

Share this post:

Disclaimer: IBM Cloud Tools for Swift (ICT) is no longer supported. Check out IBM Cloud App Service to take advantage of the same features of ICT in a more comprehensive experience for building Cloud Native applications in any programming language.

IBM Cloud Tools for Swift (ICT) makes it easy for developers on macOS to deploy, manage, and monitor end-to-end applications on Bluemix. The tool is part of a larger IBM initiative to bring Swift to the server. This article highlights a new video we’ve recorded with the value ICT provides using a microservice use case. It demonstrates the value of ICT when combining microservices.

This demo video shows you how to get started with a Swift todo list sample, run it locally on your Mac, then run it remotely on Bluemix. In this video, we’ve extended that demo to communicate with an existing Node.js runtime, which interfaces with the Weather Company Data API on Bluemix.

To help you visualize how the demo works, here is a depiction of the architecture.

  • We first show you how to run a todo list sample that uses a Local Kitura Web Server. Then we push it to a Cloudant Database on Bluemix and demonstrate the iOS client connecting to the Remote Kitura Web Server and the Cloudant Database.
  • Next, we deploy an existing Node.js runtime that connects to data from the Weather Company API.
  • Using Xcode 8, we modify the todo list sample app to query the Node.js app when the user inputs “Get current weather”. When the logic on Kitura sees this string, it queries The Weather Company Data and replaces the todo with the current weather in Austin, Texas.
  • We test the connection locally, then deploy and test on Bluemix.

brian_diagram

In the demo, first we get the todo list sample. This is deployed to Bluemix. We then show the iOS client connecting to the logic running on Kitura and storing data in a Cloudant Database.

Next, we get and deploy a “legacy” runtime which is running on Node.js. This logic provides the interface to data we query from the Weather Company Data API in Bluemix. This step uses the advanced ICT feature, “Create Sample Project from GitHub Repo.”

Then, we modify the Kitura app to query the legacy interface when the user inputs a special string for the todo, “Get current weather.” This is simply for demonstration purposes. When the logic on Kitura sees this string, it queries Weather Company Data and replaces the todo with the current weather in Austin, Texas.

Finally, we test that Kitura app running locally on macOS. When it is successful, we deploy and test it on Bluemix!

If you are running macOS, you can download and install the app and deploy the same samples quickly. Check out the video below, try it out, and then let us know what you think!

More How-tos stories
April 5, 2019

IBM Cloud App ID: Updated Runtime APIs Provide Tighter Interoperability for Your Cloud-Native Apps

As part of our efforts to tighten interoperability and broaden the frameworks that are able to use IBM Cloud App ID, we've updated the runtime APIs.

Continue reading

February 11, 2019

IBM Cloud Mobile Foundation: Top-10 Features to Boost Your App Rating

The Mobile Foundation service offers many hidden gems that developers often gloss over. In this post, we highlight the top 10 features that increase user engagement as well as improve app ratings. 

Continue reading

February 8, 2019

Distribute CoreML Models Securely Using Mobile Foundation Service

IBM Mobile Foundation is excited to introduce a feature to manage the distribution of CoreML models.

Continue reading