Posts

Azure Chronicles - Scaling Mule

Image
Overview In the previous post , we saw how to install and test Mule run time on a standalone VM in Azure. In this post, we will take it a step further to scale out the Mule run time. There are several ways one could scale a Mule runtime. They are - Anypoint Cloudhub Anypoint Runtime Fabric (internally uses Docker and Kubernetes at the moment) Container as a Service provided by multiple cloud vendors - Google Container Engine, Amazon Container Service, Azure Container Service etc. Build your own cluster with containers As we go down the above list, the level of details we need to get into is more. So, this post will get into explain how to implement option 4 above. We will make use of various technologies and Azure components such as - Docker, Containers and Azure VM Scale Set to achieve it. For those of you are new to these concepts, we will go through each of the steps in detail. Application Let's use the same Mule API that was created in the previous post.

Azure Chronicles - Mule

Image
Overview Continuing from the previous post , I now move to the other end of the spectrum, from Raspberry Pi to the cloud. Microsoft Azure cloud has been making impressive strides in the cloud space, especially among the enterprises. This is an experiment of running the same Mule run time in an Azure cloud server. The server is created in the East US Azure location. I created an A series server (Extra Small) in Azure using the ARM templates. An A series Extra Small server has 1 CPU core and 07.GB RAM. On this server, the Mule run time is on a JVM with 256 MB heap size. Then, I then ran some scripts to perform the following -  Install Oracle JDK 8 Configure the Mule run time (version 3.9) Deploy a simple REST based API in Mule Objective The purpose of this experiment is to test how much load can a very simple REST API in Mule handle, while running on a very low specification server in Azure. I wanted to see how the Mule run time would perform from a performance per

Adventures with Raspberry Pi - Part 4

Image
As we saw in the previous post , we now have Raspberry Pi server setup and integrated with multiple mobile devices successfully, let's try a more complex integration. API's have become the de-facto standard for communicating between devices. But, if we also wanted to implement any logic, data transformation, loose coupling between devices, then we could use an ESB. One can think of the Mule ESB as another form of IFTTT. We can use the multiple connectors to link  up different kinds of devices, services and applications.  Let's two kinds of integrations - event driven and batch. Event Driven In this example, a service pushes data to the Raspberry Pi. Event Driven Flow I am using Anypoint Studio 7 and Mule Runtime 4. A mockup product API is created in the Mule project. This API is exposed as a REST API with a GET operation. When someone calls the API, the Mule flow is executed. In the Mule flow, the data is read from the API and sent via SFTP to a targ

Adventures with Raspberry Pi - Part 3

Image
Continuing from the previous post , lets now build a Chatbot on the Raspberry Pi. If we have some digital media such as music, movies etc. stored in a media server on the Pi, these can be accessed using a Chatbot too. I have used Telegram to build the bot. The Telegram app is available for all platforms - iOS, Android, Web etc. Using the funnily named BotFather from Telegram, anyone can create a Bot account. Once the account is created, the "brain" of the Chatbot needs to be implemented using a programming language and framework. I have use the python based  chatterbot  framework to create a bot called - Frasier (named after the TV Series). The bot in turn interacts with the Plex Media Server API's to search and download the requested media such as a song, TV show or a movie. Telegram currently allows files up to 1.5 GB to be shared via the app. Telegram App in an iPhone requesting a song from a Chatbot running on a Raspberry Pi In the screenshot above, th

Adventures with Raspberry Pi - Part 2

Image
Continuing from the previous post , let us now put the Pi to some practical uses. File Server The Pi can serve as a file server for home use. One could use it to store files for use across multiple computers, backup files, share media (songs, photos and videos) etc. As most of us use Windows at home, you can setup a Samba file server. You can read/write files easily from Windows computers.  In addition, there are Apps for iOS and Android, so you can access these files from mobile/tablets too. You can SSH into the Pi and run the following commands to install Samba sudo apt-get update sudo apt-get upgrade sudo apt-get install samba samba-common-bin You could give all access to the Public folder under /home/pi/ folder using the command -  chmod +777 . Create a Samba user and password using the command - sudo smbpasswd -a pi Configure Samba as shown below - Edit the Samba configuration - sudo vi /etc/samba/smb.conf [share] Comment = Pi shared folder Path = /home/

Adventures with Raspberry Pi - Part 1

Raspberry Pi has been around for a few years. It was initially launched in 2012 by the UK based Raspberry PI foundation . Over the years, many flavors of the Raspberry PI have been created. While the Pi computer has been created as a learning tool, it can be used for some practical use cases too. These can be for both home and business use. Below is my Raspberry Pi setup at home. Imperial storm troopers protecting their precious cargo of Raspberry Pi, Mi power bank and Western Digital hard disk. All the secrets of the empire are safe! #starwars #raspberrypi #stormtrooper #maker #diy A post shared by Rajan (@rajanmanickavasagam) on May 9, 2018 at 8:33pm PDT The bill of parts for the above setup consists of (left to right) - Mi 20000 maH Power Bank USB to Micro USB cable with a power on/off switch Raspberry Pi case with heat sink Raspberry PI Model 3 Class 10 SD Card 16 GB capacity Western Digital 1 TB external hard drive The storm troopers just show

Let Us Say Grace

Image
As we head into another new year, the calendar has changed to 2018. But the differences in the world continue to remain. As long as the human condition prevails, these differences will always exist. These differences periodically surface as flash points in politics, economics, societies, arts and personal freedoms. Saying Grace by Norman Rockwell (Source - Wikipedia) There is a painting "Saying Grace" by the iconic American illustrator Norman Rockwell. It was created for the cover of the Saturday Evening Post in 1951. As is characteristic of Norman Rockwell paintings, it captures an ordinary moment with extraordinary detail. A boy and his mother say their prayers in a restaurant before a meal in a restaurant. We can also see the reactions of the other diners, some fully, some partially and some not at all.  What is truth? What is justice? What is equality? What is morality? Before we even debate these topics, we must search for the meaning of them individ

Tech - Lets Chat

Image
Instant messenger applications (like Yahoo Chat) have been around since the beginning of the web, but the web was initially bound by the desktop. With the emergence of mobile, messenger applications (like Whatsapp, Facebook Messenger etc.) have seen a explosive rise. According to recent statistics , billions of messages are shared using these applications. While these messages are largely between humans, technology cannot be far behind. The DevOps movement in the world of IT accelerated the move towards automation. Except perhaps design and coding, a lot of activities such as testing, integration, deployment etc. are becoming automated. One of the last vestiges of manual intervention was tasks like - monitoring, troubleshooting etc. Bots were created to automate these repetitive tasks too. Diagram using iPad App - Paper I decided to explore this world of Chat and Bots, also called by some as ChatBot. There are a few mature frameworks that can help build this capability. C

Fiio and Sony - Music to the ears

Image
Fiio is a relatively unknown brand in India when it comes to portable music players. The Chinese company manufactures reasonably priced high resolution digital audio players. The Fiio X1 player is the entry level model. It is built using aluminium, making it light for everyday use. It has a basic user interface similar to the earlier Ipods. The key to the player producing great sound is the separate DAC chip - Texas Instruments PCM 5142 and an Intersil Amplifier. In addition, the player can play a variety of audio file formats (FLAC, MP3, WMA, AAC, ALAC, WAV And OGG). Now, that we get professional grade sound from the player, we need a professional grade headphone to listen to the music. The Sony MDR 7506 has been around for decades unchanged. It handles all genres of music effortlessly and cleanly. There is almost no distortion, be in the vocals or the background music. For those who are keen listeners of music, I would recommend the Fiio X1 (Gen 1 or 2) and the Sony

Biryani with a Persian twist

Image
Biryani with a Persian twist Anyone who likes Indian cuisine is familiar with the Biryani. Few know that the word Biryani is derived from the Farsi word "Birian". Some believe that the dish could therefore have originated somewhere in erstwhile Persia. Today's attempt was to make a biryani with a persian twist, right from the choice of meat to the spices. So, I used mutton and only persian dry spice powder. Contributed by  Rajan Manickavasagam . Published  11. December 2016 Ingredients Salt (to taste) Crushed black pepper  Persian dry spices 1 cup natural/greek yoghurt 2 cups of basmati rice 500 gm of mutton chops  2 tablespoons of olive oil 2 tablespoons of clarified butter (ghee) 1 large onion chopped into juliennes 10-12 cashew nuts Assorted whole spices - mace, cinnamon sticks, cardamom and star anise Instructions Marinate the mutton in salt, pepper, persian dry spices and olive oil for 10 minutes. Heat a wok and