Friday, October 30, 2020

Blockchain is useless and I will be happy to be proven wrong

Over last few years I have seen Blockchain technology climb the hype curve and the hype refuses to die down. I've spent countless hours reading about the technology and the potential use cases it can solve. The basic arguments for Blockchain are about Decentralization, Immutability, Traceability and no need of intermediaries for transacting. 

The use cases I hear about are A blockchain of Financial Assets (think of Land Records, Currency, etc.) or a blockchain of records which record the movement through the supply chain etc. 

Now one the fundamental usecase from which blockchain is refactored out is that of bitcoin. As far as I understand blockchain is a distributed ledger with 2 features which make it unique. 

  • It's a consensus based ledger without a central authority. As in if more then 50% of the nodes believe a transaction has happened then it's considered as consensus. 
  • It's an immutable record of transactions, i.e. once the 50+% of people have recorded and validated the transaction. It can't be tampered with anymore. It can only be reverted by doing a compensatory transaction.

Apart from these there are other features like open for all, anyone can participate etc. which are also found in run of the mill technologies.

Blockchain made a lot of sense with bitcoin because, 

  • The bitcoin was a digital asset, which took birth in bitcoin's blockchain and remained in the same ledger from birth.
  • There is no physical asset changing hand and hence the transactions are really tamper proof. 

Now any usecase which people try to solve with blockchain have a few contradictions to the original usage of blockchain. 

  • In most use cases, a central authority (A government or a company) wants to "Own" the blockchain. 
  • In most use cases, the underlying asset is not digital, e.g. food through a supply chain, or land. In such cases, blockchain can't offer any protection as the physical good can easily be tampered with. 

Everything else which is provided by blockchain, e.g. open system of records, immutable records, anytime access etc. can be easily done with cheaper and more efficient technologies which exist in the market. e.g. A digital record of Land Ownership and it's transfer already exists in most countries and there is no reason to move them to blockchain in order to do things like easy access and smart contracts. They can be done in the existing stack for far cheaper costs. 

This is my personal view on blockchain as I struggled through for 5 years to figure out a usecase which fits this tech. This involves speaking to various banks and asset intensive industries.
Everyone wants it due to the hype curve, but no one understands why they need it. I would really be happy to be proven wrong here. Please leave comments to make me understand why I should still care about this technology 

Cheers,
Abhishek

Thursday, July 16, 2020

Using SAP Cloud Connector for Automation

I recently got a. requirement to dockerize and use SAP Cloud Connector for one of the test rigs we have built up internally. 
The idea was to expose a few REST APIs written in a java application through cloud connector. One of the services we write should be able to call this java application through SAP Cloud Connector. 
For the test rig we had to setup a cloud connector and connect to a subaccount automatically. Turns out Cloud Connector has an API which is documented on here.

There is a nice github repository which allows you to Dockerize the Cloud Connector as well.

The challenge is that SAP Cloud Connector has no APIs to do the first time configuration i.e. to change the password for the first time and to set the Installation Mode. 

So here's the hack we did. We did the changes on the running SAP Cloud Connector and found that 2 files are touched by these APIs. Went ahead and made another image which adds the touched files. and Voila.. we have SAP CC Docker image on which we can directly call the APIs and automate the rig. 

The code is available in a fork of the original repository. You can access the fork here

Happy Coding, 

Abhishek

Thursday, June 11, 2020

Quick Hack to debug your docker image in cloudfoundry

I am trying to make a docker image bind with the kafka service on SAP's Cloudfoundry Platform. The kafka on SCP works on SASL authentication, and needs some configuration. 
Now the docker image has a start command which directly launches my process which binds to the Kafka Service, tries to connect to Kafka Cluster and fails because of some misconfiguration. 
It's almost impossible to try the configuration, unless I change the environment and then push the image to my repository, and then push the image from repository to cloudfoundry. 
Too Painful. 
So a quick hack to solve the problem is to change the startup command of my docker image to 

CMD tail -f /dev/null

And change the health check type in manifest to none. 

Push the image back in CF and ssh into it, to fiddle with the environment as many times as you like :). 

Happy Coding!!

Abhishek

Monday, June 17, 2019

Day 11: Diaries from Summer Vacation 2019

We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days

PS: Just realised it was a 11 day trip and not 10. 
 27th May 2019 Day 11


I write this on day 11 (edit 12) as I simply was too tired to write it yesterday. We got up in Amritsar and I was very very tired. So I decided to stay in the hotel, while Richa and Reyansh wanted to go inside the golden temple. We couldn't enter inside the temple the day before as it was too crowded. Before leaving for the temple we did the majority of packing. 

Richa and Reyansh left and I decided to catch on some sleep in the hotel. Around 20 minutes later, Richa called and told me that we didn't go inside the Jalianwala Bagh yesterday. I wanted to go in for sure. So I took a quick shower and asked Richa to meet me near Jalianwala Bagh in a bit. I finished packing, put the bags in the car and rushed to Jalianwala Bagh. Richa and Reyansh again found a huge queue and decided to not enter the temple and came near the Jalianwala. 

We also saw a Digambar Jain temple in the same lane as Jalianwala and had a quick visit over there.
  
This happens to be 100 year anniversary of the tragedy in which so many innocent people were killed by General Diar. The entrance to Jalianwala is as narrow as it was a 100 year ago, it is even marked that this was the way from which Diar entered the Bagh. There are a couple of brick walls one can still see marks of bullets which were fired at the time. A total of 1650 rounds were fired by the troops. One can also see the well in which most people had  jumped to save themselves. A total of 120 bodies were taken out of the well. The well is very concealed though. The crowd in the Bagh is too much and you hardly get any sense of nostalgia or sympathy inside the park. 
After visiting the park we went back to hotel, and then to return the car to zoom car. A cab to Amritsar airport, flight back to Bangalore and a cab back to home followed. 
An awesome vacation comes to an end. A few of the highlights for me were : 

1) Unplanned road trips are fun. 
2) People are throwing plastic bottles all over the beautiful landscapes of our country. We need to clean it up soon or else we will lose all the natural beauty we have. 
3)  Himalayas are majestic and we should visit more often. 

Signing off Day 11.

Day 10: Diaries from Summer Vacation 2019

We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days



26th May 2019 Day 10 



Last night we stayed in Raja Ka Bagh @Nurpur which is a boutique hotel. The hotel also hosts live music on Saturday nights. Party and music went on till 3.00 am which made it difficult to sleep in time. We somehow managed to get some sleep. 
As we got up, we had to figure out the plan of the day. I wanted to visit the partition museum in Amritsar in addition to our plans of catching the Beating Retreat ceremony at Atari Wagah border and visiting the golden temple. As we checked various places on the map we realised that partition museum is closed on Mondays, which meant we had to visit it today. We also had to attend the ceremony at Wagah today, given that it happens around sunset time. So we decided to skip Nurpur Fort and drive to Amritsar post breakfast. The restaurant at the hotel looked pretty slow so we rushed out and got some breakfast at a dhaba on the way. We then drove non-stop to a coffee day in Amritsar. After having a green tea, we parked our car in a public car parking next to partition museum. 

This museum is 2 years old and tells the story of our independence specially focusing on partition. It covers a few years post partition and how it affected the politics and lives of the people of both Pakistan and India. It captures the story of the biggest migration in the history of the world and it is the first museum in India which I felt is done beautifully and was badly needed.

We could have spent half a day at the museum, however as we had to go to Wagah border we had to rush through the museum. We decided to take a cab to Atari as we thought it would make it easier for us to attend the ceremony instead of trying to find parking. We took a cab for Rs. 1150. There was heavy traffic and we were a bit late. We anyhow managed to reach the border at around 4.45. The crowd and the queues were humongous. They separated the men from women for the security and there was no way to figure out how to meet after the security. The BSF people were not allowing us to stand and wait and moving wasn’t really an option. Phones were not working and if we had moved then there was no way for Richa to know that we have moved to the stadium. Once we found Richa back we had to jostle through the crowd to enter the stadium. There was no easy way to get in and people were pushing all around. After a while we managed to enter the stadium and there was no place to sit. The ceremony was good. They played some songs, made people dance on the road inside the arena. There was a lot of slogan shouting. And the BSF did an orchestrated show of aggression and brought the flag down.  On the way back we were stuck inside the parking for 1.5 hours.
The ceremony felt a lot longer then what it is as we had to stand all through and had to carry Reyansh on my shoulder for around an hour.
As we reached back towards golden temple, we checked in to hotel City Park. We can now say that we changed 9 hotels in 9 nights in this vacation. After check in we decided to have dinner, however on the way to dhaba we decided to visit golden temple instead. It felt crowded on the heritage street (street around temple). As we entered the temple complex we decided to not go inside the temple owing to the crowd. As we moved towards the langar it had the same kind crowd to get food. We decided to not have langar either.
After a round inside the temple complex we had chole kulcha on a shop next to the temple. The chole tasted nice. In the past 9 days We have had too much junk and no work out :(. After dinner we came back to hotel via our car parking. 
Richa went for some quick shopping while me and Reyansh took all our stuff from car to the room. We need to pack everything we have in 3 bags tomorrow morning. 

Richa may try to visit the temple from inside  tomorrow however I only intend to return the car to zoomcar and then fly back home.

Signing off Day 10

Friday, June 14, 2019

Day 9 : Diaries from Summer Vacation 2019

We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days

25th May 2019 Day 9


We woke up in Dalhousie today and the weather was pretty cold. We had late breakfast and then got out for sight seeing. 

The traffic in Dalhousie is very dense and given that the city is situated in the mountains driving is very difficult. There is nothing to see in Dalhousie.  It's mostly about the awesome weather in the town because of the altitude it is at. There happens to be a church which we couldn't go to as there was no parking nearby. We then went to Saptdhara which is nothing again ..however there was a small waterfall next to it with activities like zip-line and river crossing happening. We sat on the fall and had a tea while Reyansh dip his legs in the cold water and had some fun. 

We walked back to car park. The number of sales people bothering tourists  with offer to buy Kesar, Shilajit and herbs to grow hair is very high and its irritating to keep saying no to them. These vendors just won't give up and catch you near everywhere. 

We were also offered with 5 items for 10000 Rs. Sale. This is the same sale which we had ended up buying a carpet, chingu and a few more items, 11 years ago in Shimla. Nothing has changed in 11 years :). We anyways declined to buy and started driving towards Khajjiar. 

Khajjiar is a small town almost an hour's drive from Dalhousie. The drive is pretty tricky as it has narrow road in the mountains and the traffic makes it almost impossible to enjoy the route. We reached Khajjiar and it is called Mini Switzerland for a reason. There is a large meadow and a lake in the middle of huge trees and it looks and feels great. The lunch was at a non descript restaurant facing the lake and the service was very poor.
Reyansh wanted to ride a horse so Richa took him for a ride on a white horse named Shera. I sat near the lake where they had many 'adventure activities' going on. Zorbing slope gradient was pretty low as compared to what I have seen in Bangalore. The most funny thing was a paragliding kind of ride. A team of almost 10 people will run with a parachute and make the kid airborne for approximately 10-15 seconds. How far up the kid goes depends on the height and weight of the kid. While the kid comes down a couple of people will focus on catching her to ensure that she doesn't fall on the ground too badly. Some kids weren't even sitting properly on the seat and it was mockery of a gliding. It was very unsafe and not sure why parents were risking something like this with their kids. 
After spending a good 3.5 hours near the lake we decided to drive towards Nurpur where we are staying for the night. 

I write this from Nurpur which is our last night halt in Himachal. tomorrow we will drive to Amritsar and it's a pretty flat drive. We are back to planes now and the drive should become simpler. We have driven almost a 1000 kms in Himachal Pradesh and thank god for no major incident in the drive :)

Signing Off Day 9.

Wednesday, June 12, 2019

Day 8 : Diaries from Summer Vacation 2019

We took an awesome and memorable 10 day road trip (17th May 2019 - 27th May 2019) from Chandigarh to Amritsar via Himachal Pradesh. These are the notes taken every night from that vacation. I will publish them one day at a time for the next 10 days

24th May 2019 Day 8 


This holiday has been long and busy. The memories of the days are already merging together. I write this blog from Dalhousie where we just checked in to a hotel. 

I couldn't sleep well yesterday night. The moon and stars were visible from the wall size window of the room we had checked in to and it just kept me uneasy for some reason. As we woke up on Mcleodganj this morning, it was already raining. The weather was cold and we had a dull begining of the day. The tiredness was now catching up. We somehow managed to go for breakfast at around 9.15 am. The breakfast was usual chola bhatura and poha. After the breakfast we pushed ourselves to mobe and checked out by 11.00. 

The first stop was Bhagsu nag temple and waterfall. Reyansh loved the fall and walked all the way up and down to earn the binoculars he wanted to buy. On the way back he even raced with a traveller from USA. At the end of Bhagsu Nag I had to buy him a well earned binoculars. 

Afterwards we went to Namgyal monastery. It is the monastery near which Dalai Lama lives. The monastery wasn't as peaceful as we had seen near Kullu or in Bir but is significant as it hosts Dalai Lama. The market in Mcleodganj was very crowded and all we wanted to do was run away from this place due to congestion on the roads. Richa did some shopping and then we were off to Dalhousie around 5.00 PM. As we neared Dalhousie we realised that sun sets around 7.50 pm in this part of our vast country. The sky looked beautiful with various shades of blue as the night settled in. 

We reached Dalhousie at around 9.10 pm. It's a cantonment area followed by a tourist city. The cantonment was probably established as Lord Dalhousie was a Governer General of India and had established this city. 

All the hotels were full as it was a Friday. We somehow managed to get a room in Clarks inn and crashed for the night. Reyansh fell asleep at around 5 in the car and looks like he will sleep through the night. 

Tomorrow we would visit a local church and Khajjiar. We are still not sure if we want to stay in Dalhousie tomorrow night or sleep in Nurpur, which is on the way to Amritsar and has a small fort. 

Will decide tomorrow...

Signing off Day 8