Advanced Message Queuing Protocol (AMQP)

Since AMQP is gaining more a more popularity these days I decided to dive in to this new protocol and share with you my knowledge. The first questions that appeared in my head when I started learning AMQP were what’s the difference between AMQP vs JMS and why would I use AMQP if we have JMS?

amqp

First of all, the main difference is that JMS is an API and AMQP is protocol. JMS describes how to send message whereas AMQP describes how message should be constructed. In other words, with JMS you have possibility easily to replace your broker with another broker without or almost without changes in your code. Continue reading Advanced Message Queuing Protocol (AMQP)

FX Derivatives

Derivatives are instruments and typically used by investors for speculation and arbitrage or hedging against possible future changes.  Generally, they took a form of contract under which parties agreed on payments, dates, amounts, obligations between the parties.

Forex_-_14599002424

The most commonly used foreign exchange derivatives are forward contracts, future contracts, options and swaps. I will make a brief introduction for each derivative with example below.
Continue reading FX Derivatives

Basic Things To Know About Forex

This post will accumulate the basic features of foreign exchange markets also known as Forex or FX. Let’s start from the definition: What is Forex? It’s a largest and most liquid market in the world where currencies are traded.

Forex

In other words, it’s a place where everyone can make money in different ways. For example, the most obvious way is to buy and sell currency or you can work in a big investment bank as a trader or software engineer. Continue reading Basic Things To Know About Forex

Optional Class Overview

Optional class is a nice solution that can be used to solve NullPointerException problem or in such cases when you need to express an empty value. In other words, it can be compared with a box that might contain something or be empty.

cardboard-box-147605_960_720

The class was introduced in Java 8 and you can see that it’s widely used in Stream API. For instance,  such methods like min, max and average  return Optional. Since the stream source can be empty it’s better to return Optional rather than null. Because Optional class provides rich functionality to handle different scenarios in functional way. Continue reading Optional Class Overview

Stream Reduction Operations

In this post I will make overview with examples of Collectors class which provides very cool functionality that can be applied on a stream. The functionality is quite similar to some features in SQL language. For instance, it allows you to make an averaging, grouping, partitioning, summing and many other cool things. In order to use stream reduction API you need to be familiar with Collector interface and Collectors class.

Screen Shot 2016-03-30 at 20.34.29

Collectors is an utility class that contains factory methods which you should use most of the time, whereas Collector is an interface that can be used for implementation more specific reduction operation.
Continue reading Stream Reduction Operations

Stream Operations Overview

One of the greatest thing in Java 8 is new Stream API which essentially is a new fancy iterator over the collections or any other sequence of data. To work with Streams you need to compose a stream pipeline which consists of source, zero or more intermediate operations and a terminal operation.

Screen Shot 2016-03-26 at 09.39.36

The interfaces and classes that belongs to stream API can be found in java.util.stream package.
Continue reading Stream Operations Overview