JRE vs JDK – pt 2

All

Intro

JRE and JDK what is the difference and why it’s a bit confusing! lol!

The diagram below summarizes: basically, JDK is a superset of JRE.

CBNux.png

What does the diagram above mean?

Well, if you want to use Tool and Tools API, you will need JDK. Dot.

 

Use the commands below to install JRE and JDK

JRE

OpenJRE

sudo apt-get install openjdk-8-jre

JDK

OracleJDK

sudo apt-get install oracle-java8-installer

OpenJDK

sudo apt-get install openjdk-8-jdk

Setting JAVA_HOME

echo “JAVA_HOME=$(which java)” | sudo tee -a /etc/environment

 

REFs

Paper Acceptance

All

E2P3M Team

Our paper, Non-Scrum Implementation: A Methodological Approach for Small Companies, was accepted at the conference 18th European Conference on Research Methodology for Business and Management Studies, aka ECRM19.

Thank you very much to all involved!

See you guys in Johannesburg – South Africa

Pstack

All

Intro

Debug using gdb for Apache

Pstack

pstack is this quite an interesting tool for debugging in case you don’t want to trace the server.  Basically this command command shows a stack trace for each process!! Similar to gstack but for RHEL.

pstack <pid>

Example stolen from Oracle to demonstrate nfsd

243:    /usr/lib/nfs/nfsd -a 16
 ef675c04 poll     (24d50, 2, ffffffff)
 000115dc ???????? (24000, 132c4, 276d8, 1329c, 276d8, 0)
 00011390 main     (3, efffff14, 0, 0, ffffffff, 400) + 3c8
 00010fb0 _start   (0, 0, 0, 0, 0, 0) + 5c

 

On this case we can see that last function is pool, called from ??? – without ELF info – which was called by main.

Reading

The reading follows the simple rule:

 The bottom is the start –> the top is the last call 

REFs

  inline

Chaos Engineering

All

Intro

Although I already talked about this before, I think it worth mentioning – I talked before about Chaos Monkey and the Simian Army, but there are actually some interesting principles around Chaos Eng actually worth mentioning.

CHAOS ENGINEERING

It is the discipline to run several tests on production in order to make it robust and foresee issues – the first is basic for any scientific experiment. This has started on Netflix, but it’s quite interesting and now has spread all over.

The main principles are the following ones:

Build a Hypothesis around Steady State Behavior

Vary Real-world Events

Run Experiments in Production

Automate Experiments to Run Continuously

Minimize Blast Radius

Large scale

I think for large scales application, those kinds of tests are very important and even Forbes made a report about it. Minimizing the blast radius of the issues that the system might face is quite an interesting highlight here.

Reference Book

I didn’t read it but it’s on my reading list: Chaos Engineering – by Ali Basiri, Nora Jones, Aaron Blohowiak, Lorin Hochstein, Casey Rosenthal

REFs

inline.

Beautifulsoup + googleapi

All

Intro

I recently posted that with some python libs. I think beautifulsoup is on this list.

Beautifulsoup

Beautifulsoup is this very nice thing treat html content, quite nice.  The code below takes the the content from hmtl and returns the content without html tags.

from bs4 import BeautifulSoup
#Get Content
def get_content(url="test\solution.html"):
    #content = urllib.request.urlopen(url).read()
    #soup = BeautifulSoup(content, features="html.parser")
    soup = BeautifulSoup(open("test\solution.html"), "html.parser")
    return soup.text

Google Search

To do queries on google search is quite simple, with this lib – the query is done as below:

query

domain

number of results

search(query, tld="com", num=n_result, stop=1, pause=2):

REFs

inline

Helper parser

All

Intro

I have created a small server.log parser for JBoss with Gabriel A., my wingman.

It’s small and growing on demand, contributors are more than welcome.

Helper parser

This helps to parse server.log files to find exceptions and faster. Actually any file with errors, indeed.

Very small stuff, but we will improve upon that.

 

REFs

[1]https://github.com/FranciscoMeloJr/Python-Tests/tree/master/helper

Working with Java in Toronto

All

I started to work in Toronto some months ago with Java and it’s quite interesting.

I can’t say if it is better or worse than Montreal, it’s quite different though, because in Montreal I used to work in Python.

I miss Python sometimes, very very flexible. So cool.

That’s not my first time working in Java, my master was implemented in java, my honour thesis as well, and at All App start up I worked with some java android also. But, this time I’m working with JVM very specific tuning, EAP, and JDG, so then the framework changed and the city too.