A New Multiregion Demo

Share: Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditEmail this to someonePrint this page

Screen Shot 2016-04-14 at 9.28.00 AM

To accompany Lee Surprenant’s article Configure and run a multiregion Bluemix application with IBM Cloudant and Dyn and my last post on the bluemix-cloudant-replicator, Lee and I decided to create a better demo app to demonstrate Cloudant replication at work. This new app allows users to create and delete “Post Cards” across regions. For guidance on deploying the multiregion demo application watch the video below:

As mentioned above, the app has two main capabilities:

  1. To add a new card to the database simply click the button located in the bottom-left of the screen that says “Leave a card.”
  2. You may also clear the database by clicking the button in the bottom-right of the screen labeled “Clear all cards.”

When a card is created, a random “stamp” is assigned to the card using Lorempixel.com. This image should help you locate your card when you visit the other regions. It is also worth mentioning that the background images change according to the time of day. Using the Weather Insights service on Bluemix, we determine the solar position for each region and render an appropriate image.

multiregion (1)

We aimed to keep the code for this demo concise and easy to read, but to do so we did make some sacrifices. The most notable being the absence of dynamic card rendering. While it would be nice for the cards to dynamically appear in other regions without a page refresh, we did not want to complicate the code anymore than what was necessary to show Cloudant replication. We’d love your thoughts on the project and encourage people to visit our repo. The repository is under an MIT License, so feel free to fork it and hack away!

Share: Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditEmail this to someonePrint this page
Luke Stack
Luke joined IBM's jStart team as a co-op in January 2016 . Luke is a junior, pursuing Bachelor’s of Science degrees in both Computer Science and Mathematics at Appalachian State University.
Luke Stack
Luke Stack

Latest posts by Luke Stack (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *