Database deployment automation

DB deployment (schema or DDL, package)
Continuous integration and deployment of database is a main issue for many legacy monolithic web app. I came across this article recently, and I think it touched some good points.

On a related matter, Jeff Atwood (cofounder of stack overflow), has a good piece on database version control.

I understand the world is going microservice, and the monolithic relational database is not used as frequently as it’s being used in those legacy web apps. But nonetheless, it helps the dev team to be agile if version control / CI / CD can be applied to database update as well as the application update.

Tracking data changes in DB
This also reminds me of an app I worked in 2010/11, in which we have an DB audit log for many (if not most) database changes: add, update, delete. It’s usually achieved via trigger in Oracle, or interceptor in Java. I read an article from a startup engineering blog (credit karma? Or something like this), they detailed how this is implemented.


I heard webhooks from Zapier the first. Below is an good article written by the folks at Zapier.
What are the webhooks? (Zapier)

Was trying to follow the tutorial from the above
requestbin tool

requestbin works like described (encountered a few 500 errors, but mostly working)

It seems I could not open the link from runscope community page.

I am reading this more technical webhooks blog by @brandur

My interest in webhooks is also inspired by this little JS program I wrote a long time ago. And this was rekindled recently due to the atomist-sdm (GitHub) (node.JS based SDM, automation, quick start here).

Node js tutorials and webtask

(Original 11-30-2014, to be worked on)

I heard about Node js for a while, until recently I had opportunity to practice it. I used this tutorial from as a start, as I had good experience using the iOS tutorial on ray’s site. But I need to learn more. Here is another one (similar to Ray’s tutorial).

Webtask (Auth0)


Atomist: a SDM based on Node.js (SDM stands for Software Delivery Machine)

I was also following the first few lessons of the advent of atomist automations. Got a bit stuck at the SDM team mode. Local mode seems working fine. I did receive the free trial for Atomist. Maybe I need to update the package as I downloaded Atomist a while ago (in August, I think).

Continue reading

Setup JBoss with Eclipse

I have been doing this for a while, mostly for my new work (back to dev). My goal is being able to debug a Java web application, just like what I did for my previous work (Spring STS + Tomcat). The new work requires Eclipse + JBoss (some coworkers uses the not free Intelli-J).

Download / install Eclipse
link here, need to unzip, and install the Eclipse for JEE

Add a new server
I picked Wirefly 11. Read this post regarding JBoss EAP vs Wirefly. This has been helpful.

After that I was able to import a “maven project” (that runs on STS with vFabric server), and start the app in debugging mode. This seems like baby steps, but for me it’s a long time “not doing” :-)

Paradigm shift

(11-03-2018) Alibaba just reported a quarter in which its cloud revenue grew 90% YoY. It appears Ali Cloud is No. 4 in the world: behind Amazon AWS, Microsoft Azure, and Google Cloud Platform (GCP). Thinking Ali may challenge Amazon in not too distant future (note Ali started the cloud much later than Amazon).

About Alibaba Cloud:

(07-08-2018) Came across this multi-cloud article form Glenn.

(Original) Good old Oracle is shifting Java SE from perpetual license model to subscription based. Link here.

Note John Chen (CEO of blackberry) mentioned the subscription model makes more revenue more predicable for the business (video here, noticed he mentioned new accounting rules here).

Btw, heart broken to see the Blackberry phones go away.

Docker – second take

(Update 02-13-2018) So I found out today I have AWS bill of $2.62 (mostly due to EC2 instances) today. This is due to the fact that I did fire up the VM as well as the docker swarm instances (total 9? maybe due to I ran the deploy script multiple times?) Anyway I fired up the instance last night, this evening I looked at the “instances” and looked at the bill, I know what happened. I still did not make the connection from outside to ec2 working though. For the time being, I “terminated” the docker swarm, and stopped AWS VM.

(Update 02-12-2018) I am also following the tutorial at Docker’s official website. I am at step 6 here. And right now, I am stuck in connecting to the AWS vm (was following this Docker guide): step 6 “docker node ls”. I did follow the steps to create docker credentials for AWS.

error during connect: Get http: server gave HTTP response to HTTPS client

Note this IP address looks like the local default machine: one thing I am not quite sure is how the local connects AWS

(Original 01-31-2018) I installed docker on my mac a while ago and did a simple tutorial. But I never had much chance to play with it until recently. After the training, esp. after I saw use docker container to host Tomcat, and then use Jenkins to startup Tomcat (build and deployment), this whole thing got me interested in docker again. Note I have been learning about docker contain and they seem to be the future deployment model for scalable mobile apps backend: e.g., I know the Robinhood app (the free stock trading app) is container based in the back.

Some resources I used to get started:
1) Youtube docker tutorials (11-18-2018: such as this one Demystify Docker; also noticed this one Docker for GCP. I will see if I can do the training exercise again I mentioned above).
2) Install docker or on Ubuntu (I have a digitalocean droplet / VM, and its OS is Utuntu);
3) Overcome the error message:
FATA[0000] Get http:///var/run/docker.sock/v1.17/version: dial unix /var/run/docker.sock

The answer is this:

The problem is that your user has not been added to the docker group.


sudo usermod -a -G docker
If you don’t want to log in/out from your current shell, run:

newgrp docker

Last but not least, install Jenkins on Ubuntu 14.04.

Other error messages (note I am on a Mac)
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (when I tried to run some docker command)

It seems the solution is
eval “$(docker-machine env default)”

Alipay wechat Pay


I was travelling in China for 9, 10 days recently, and I can see those two payments method everywhere. From the small food stall to KFC, one of those two methods are widely accepted, and in many cases cash transactions are very rare. I noticed this trend about 1.5 years ago during my China trip too, at that time I saw some promotions around those new payment methods. This time I saw many promotions too, such as discount to points (reward) system.

Just use my own shopping experience as an example. I purposefully did not get a local mobile phone number this time, which in other words, this disqualified me from using those new payment methods. I did not want the hassle of getting a new mobile phone number, with or without data plan, and then have to give up the number later. Because my trip is really a 9 day trip. I noticed in most “free” or public wifi hotspots, the setup is such that they send a validation code to the mobile phone. For me I can live without because my phone has international data roaming, in other words, I still get to wechat on the go. But I cannot get to those free public wifi hotspots, at a bookstore when I tried to sign up to be their member via wechat, I realized my lack of local phone number is preventing me from doing that, or getting the discount. Same thing in KFC. I did noticed some China Unionpay (flash pay, or its own contactless payment methods, like masterpass or visa checkout, if you will) promotion along with Apple Pay and Samsung Pay, but it’s very obvious they are not in the same magnitude as Alipay or wechat pay. There is news saying that China central bank is regulating Alipay and wechat pay, such as limit the amount of transaction. It will be interesting to observe though, we know Unionpay is very much state owned, while the other 2 are in theory private owned. But all in all, this is a very difficult market for Mastercard and Visa to crack.

Fully disclosure: as of this writing, yours truly works for Mastercard. And this article is just my personal opinion, not my employer’s.

PS, in order to get a local mobile phone number, one usually needs a local identification card. I am not sure how foreigners can get one, via their passport. I assume there is a legal/legit way to get that.

Last but not least, my friend in Ningbo, used Alipay app to rent a car (I assume it’s similar to Uber), to pick me up at Ningbo railway station. He said he even sold his car recently, due to the convenience of car-rent app, public transportation, and the desire to walk/cycle (again bike sharing here, needs a phone and app) more instead of trying to finding a parking spot for his car (and the cost of maintain a car). When we got off the car, the payment is automatic just like Uber.