Tuesday, August 29, 2017

TPC-C current benchmarks for stateful and stateless services running Java.

  • Immediately consistency: 1 box: 2000 requests/second with 5 second response time
  • Eventually consistent: 1 box: 300 requests/second with a 100 millisecond response time.

It is all achivable, if you are not there you need tools to figure out why.
Switch to stateless services whenever possible. A great article about pushing the boundaries and how important it is in HFT is available in barbarians at the gateways.

Sunday, April 23, 2017

No versions found in startbootstrap-sb-admin-2.git

No versions found in https://github.com/IronSummitMedia/startbootstrap-sb-admin-2.git
The problem manifests itself because IronSummitMedia changed it's name to BlackrockDigital and you should go and install a different package from:
https://github.com/BlackrockDigital/startbootstrap-sb-admin-2

Thursday, May 26, 2016

Waking up Heroku app

Deployment is not enough to wake it up. I just hit the URL in the browser :) Unfortunately if you use a free dyno for a hugbot that is integrated with slack, you need to wake your dyno up after recharging period.

young-sands-45836.herokuapp.com

Wednesday, April 20, 2016

Oracle PLSQL alert table add not null column with default value throws exception

I was trying to run following script:
alter table qrtz_blob_triggers add sched_name varchar(120) not null DEFAULT 'TestScheduler';

I kept receiving a following exception:
alter table qrtz_blob_triggers add sched_name varchar(120) not null DEFAULT 'TestScheduler'
Error report -
SQL Error: ORA-30649: missing DIRECTORY keyword
30649.0000 -  "missing DIRECTORY keyword"
*Cause:    DEFAULT DIRECTORY clause missing or incorrect.
*Action:   Provide the DEFAULT DIRECTORY.
I had to change the order of a query (default before not null):
alter table qrtz_blob_triggers add sched_name varchar(120) DEFAULT 'TestScheduler' not null;
I will keep this as an example for people that keep telling me that SQL is a declarative/functional language, and not something that Scarily Qualifies as a Language

Monday, March 21, 2016

Maven command to run tests in a selected module and ignore failures and redirect output to a file

This is useful when I want to see all the failed tests, and I want to have it in file so I can easily navigate thru entire output - for example to search for errors.
mvn -f system-tests/pom.xml -Dmaven.test.failure.ignore=true clean install > myout.txt

Tuesday, February 23, 2016

NoClassDefFoundError - classloaders in Java


Key concepts

  1. There is a hierarchy of classloaders
  2. Class loader may delegate to its parent
  3. Parent may load class
  4. If none of loaders loaded the class -> NoClassDefFoundError

Friday, January 29, 2016

Jenkins: Couldn't find any revision to build. Verify the repository and branch configuration for this job.


If you see following error in Jenskins build and you are using git:
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
It is because someone moved some git branches around, and they are missing. Instead of selecting a branch in Jenkins config modify advance input with:
+refs/heads/foo/bar:refs/remotes/origin/foo/bar