February 5, 2019

Introduction to Oracle Blockchain Cloud Service (OBCS) - Blockchain made easy


"Blockchain" is the most buzzing word in the industry at present. I am fortunate to be part of this technology and starting my blog writings/learnings on this technology with this post. In this post, we will see how the Oracle Blockchain Cloud Service (OBCS) looks like its console, features and how Oracle made blockchain easy.

#OBCS is built on open source Hyperledger fabric blockchain framework. Hence, OBCS supports all the features of Hyperledger fabric, in-fact it made easy to implement the blockchain by reducing a lot of configurations to create channels, nodes, rest services etc, so that, we can concentrate only on logic (chain code or smart contract) implementation. We need to do basic configurations, rest everything will be taken care of by OBCS.

Before begin, we need to understand the basic terms used in OBCS.
  • Founder: It is an organization which is creating the blockchain network. In OBCS, only the founder holds the Orderer.
  • Participant: It is an organization which is participating in the blockchain network.
  • Orderer: A defined collective of nodes that orders transactions into a block. The ordering service exists independent of the peer processes and orders transactions on a first-come-first-serve basis for all channel’s on the network.
  • CertificateAuthority: It is responsible to provide membership to peers in the network.
Let's start the OBCS exploring.
  • Once you login to OBCS console, you can see a list of blockchain instances created (You can create a new instance also from here)
  • Open console of any of the instances, it will open a dashboard which looks like as below
  • The above screen is the dashboard of a blockchain network founder. You can see 
    • The number of channels created in this instance
    • The number of peers added 
    • The orderer (One order per a network)
    • The number of chain codes deployed
    • The number of organizations participated in the network
    • and other information like the health of nodes, channel activity, and peer activity
  • In the case of the participant organization,  the dashboard looks as below where you see only the count of peers, channels and chain codes
  • Below are other tabs/options available in the console
    • Network: This tab shows who are all participating in the network. The founder can see all the participants in the network, however, the participant can see only himself and the founder. The below image shows a topology view of the founder network. You can see participant organizations and their peers along with a Certificate Authority (CA) and an Orderer. If you see this view from a participant organization, it would look similar (participant organizations and their peers) except Orderer.

    • Nodes: This tab shows all the peers including self peers and remote peers who are all part of the network. Also, a node of Certificate Authority (CA). If it is the founder, he can see an extra node for Orderer. Below image is a topology view of the nodes. This will look similar (Nodes and their peers) in both founder and participant console.

    • Channels: This tab is to list the existing channels. Also, you can create a new channel and join peers with it.
    • Chaincodes: This is where our smart contact will be deployed. Here, we will do deployment, initiation, and instantiation of a chain code. While deploying, we will choose the channel in which the logic should deploy. This chain code (smart contract) can write/update ledger of the channel. At present Oracle Blockchain supports chain codes written in GO language and Node JS. However soon, it will support Java also as Hyperledger fabric is already supporting java.

#Oracle #OBCS #OracleBlockchain

October 15, 2018

Android Error: Failed to resolve: com.google.firebase

[Android Studio]


I updated gradle to 4.4 in my Android app and added below firebase libraries to my app level build.gradle file

implementation 'com.google.firebase:firebase-core:16.0.0'

but while building the project, got the below error

Failed to resolve: com.google.firebase:firebase-core:16.0.0

This is a maven issue. This issue is resolved after adding google() to repositories of allporjects in project level build.gradle file. Now the json looks like below.

allprojects {
    repositories {

August 26, 2018

How to run background service in Oracle MAF

In mobile apps, we often need some services to run in the background to do tasks like fetching or updating data from a server, sync local data with a server, invoking APIs etc.
In this post, we will see how to run a task in the background of a mobile app developed using Oracle MAF.

There is a default utility available in Oracle MAF to run java code in background threads which is MafExecutorService. It has a method execute() to run java runnable on a background thread in the context of the calling thread's MAF feature context. The syntax of the method is like

MafExecutorService.execute(new Runnable()
public void run()
         //Invoke your methods here     

If you update any data change events in the background, invoke below method to make it effective.