Skip to main content

Posts

Showing posts from October, 2016

Reactive Programming with RxJava book published

"Reactive Programming with RxJava: Creating Asynchronous, Event-Based Applications" book was finally published on paper.
More than a year of hard work resulted in almost 350 pages packed with RxJava and touching various technologies like Android, Camel, NoSQL, Hystrix and more. It's available as an ebook and in paperback at official O'Reilly store as well as on Amazon. But rather than making a sales pitch I'd like to share some of my experiences with writing my first book.

Atlas is great All authors writing for O'Reilly get access to Atlas - their publishing platform. Atlas is like a combination of GitHub and Jenkins - it hosts your books in built-in git repository and "builds" them. For developers the user experience is very familiar. The one and only source of your book is in O'Reilly-hosted git repository. You can use it as any other repository: commit changes, push to branches, pull revisions from other authors. You can quickly see history …

Small scale stream processing kata. Part 2: RxJava 1.x/2.x

In part 1: thread pools we designed and implemented relatively simple system for processing events in real time. Make sure you read previous part as it contains some classes that we'll reuse. Just in case here are the requirements:

A system delivers around one thousand events per second. Each Event has at least two attributes:

clientId - we expect up to few events per second for one clientUUID - globally unique Consuming one event takes about 10 milliseconds. Design a consumer of such stream that:

allows processing events in real timeevents related to one client should be processed sequentially and in order, i.e. you can not parallelize events for the same clientIdif duplicated UUID appeared within 10 seconds, drop it. Assume duplicates will not appear after 10 seconds What we came up so far was a combination of thread pools and shared cache. This time we will implement the solution using RxJava. First of all I never revealed how EventStream is implemented, only giving the API:

in…

Small scale stream processing kata. Part 1: thread pools

Once again I prepared a programming contest on GeeCON 2016 for my company. This time the assignment required designing and optionally implementing a system given the following requirements:

A system delivers around one thousand events per second. Each Event has at least two attributes:

clientId - we expect up to few events per second for one clientUUID - globally unique Consuming one event takes about 10 milliseconds. Design a consumer of such stream that:

allows processing events in real timeevents related to one client should be processed sequentially and in order, i.e. you can not parallelize events for the same clientIdif duplicated UUID appeared within 10 seconds, drop it. Assume duplicates will not appear after 10 seconds There are few important details in these requirements:

1000 events/s and 10 ms to consume one event. Clearly we need at least 10 concurrent consumers in order to consume in near real-time.Events have natural aggregate ID (clientId). During one second we can exp…