In my previous post I showed how you can implement an event bus using Akka and how to handle incoming and outgoing messages using Websockets. Now it’s time to feed the event bus with some internal events and also support scaling it up on multiple instances.

Image for post
Image for post
Photo by Patrick McManaman on Unsplash

The Publisher

Instead of depending directly on the event bus I will introduce a publisher object, an intermediate component, which then can be used by various different components to publish events into the event bus.

Adding additional abstractions allows to easily mock it in unit tests and also replace undergoing logic without changing the users of the component. …


You’ve probably read such posts many times and you are wondering what more I can tell you about this topic. Maybe not much but my idea for this post was inspired by a real case scenario I had implemented in my project. I will start with events going in/out with Websockets which are then propagated to Akka actors. In the following post I will add RabbitMQ to support multiple pods/instances of the app.

Image for post
Image for post
Photo by Joey Kyber on Unsplash

Background

In a project I’m working in we had to add support to allow users watch a folder for changes (we built a virtual file system over the top of Dgraph). Those changes then need to be propagated to the users whoever did the change — yet another user, a background running process, etc. So, user subscribes to a folder and gets notified via websocket, then we can re-fetch the folder’s data again if needed. You can see the same mechanism when working with Github Pull Requests, where you need to click a Refresh button to reload changed files. …


In my previous post I started a preparation process of allowing to run a Hubot instance in the Kubernetes cluster. I presented how to set up a Docker image, how to use MySQL as Hubot’s brain and so on. Right now we are ready to jump into Helm and Charts and do a real Kubernetes stuff!

Image for post
Image for post
Photo by Ian Schneider on Unsplash

Just one remark: I assume you have a Kubernetes cluster running plus you have an account on Docker Hub to push your images there. Also, DevOps already installed Jenkins on the cluster which you can use for deployment.

Helm

The very first thing we must do is to install Helm which is also known as the Package manager for Kubernetes. It basically allows deploying any service into a Kubernetes cluster based on a defined Chart. The chart is a packaging format like Dockerfile or Jenkinsfile, which you can use to describe how to deploy your service. It can be simple or complicated and allows you to deploy really complex systems. In our case I will use two charts, one for MySQL — I will use a ready-to-use chart for that, and a second chart which describes how to deploy our Hubot. …


The very first option to setup and run your own Hubot is Heroku. There is a whole section in Hubot’s documentation how to do it. This is a very easy and straightforward solution, yet it’s true as far as you are running just Hubot and you don’t have any other services to maintain.

In a modern company, consolidating your services and resources on one platform reduces maintenance and operations costs, not to mention better knowledge sharing inside the IT department. You do not need to hire multiple specialists to support each platform, you just need one YAML developer ;-)

Image for post
Image for post
Photo by Franki Chamaki on Unsplash

Background

Some time ago we started moving all our dispersed services into a Kubernetes cluster (aka k8s), which is running on the Google Cloud Platform. As this requires some changes to the application itself, it is not just devops work. …


In a project I’m involved in, we started using RabbitMQ to support internal communication between different microservices. At the beginning we have been using rabbitmqadmin to create all the queues at startup — this isn’t a production ready solution. Let’s read how you should configure RabbitMQ to fully control who changed what.

Image for post
Image for post
Photo by Sarah Brink on Unsplash

As I mentioned we started with a simple case, right now we are extending the usage of RabbitMQ and adding support for collecting all information and events happening in different parts of our system. …


You all know these little images showing the latest version of an artefact or if the tests are passing or showing coverage of the project. We all love them, they are small but so informative. With just one image you convey a bunch of data.

Image for post
Image for post
Photo by Jakob Owens on Unsplash

What’s Maven Badges

The Maven Badges project was started by Jakub Jirutka few years ago and as such was hosted on Heroku, on a free dyno.
The main purpose was to provide missing features of shields.io. Right now shields.io


Image for post
Image for post

Yes, you can be surprised but after almost 18 years on the market the Apache Struts project is still maintained and under active development. Ok, this is not exactly truth as Struts 1 was announced End Of Life a few years ago and Struts 2 (Struts 1 successor) is a totally different framework. Anyway, when you started using Struts 2 few years ago you can still be sure that you will get the latest patches or security fixes in a timely manner.

Oh, and Struts is a Java web framework so if you are not a Java developer you can stop reading here…


A few days ago I gave my first presentation on Bielsko Biala JUG. It wasn’t my first presentation but it was my first time in front of the new audience and with a new topic.

Image for post
Image for post
Photo by Alex Knight on Unsplash

Yes, I was talking about Halinka and Watson, showing some code examples and explaining how we can use bots and how we can connect them to an Artificial Intelligence to escalate the bots’ possibilities. There was also a plenty of discussions about different use cases. One of the most interesting is about bot’s behaviour:

should the bot behave like a human? should it be treated as a person? what will happen if the bot won’t be able to give a proper answer to the user’s question?


I would like to share three hacks that you should consider when implementing a bot using Hubot. They can make your daily use of Hubot a better experience.

Image for post
Image for post
Photo by Matan Segev from Pexels

What’s Hubot?

Hubot is a bot created by Github which can be used with broad number of chat platforms. You can use it with Slack, Campfire, and many others. All you need to do is to use a proper adapter.

There is also a plenty of ready to use scripts that can be easily installed and they will extend Hubot’s functions. …


A story about a tough love in the world of bots.

Image for post
Image for post
Photo by Josh Felise on Unsplash

Halinka the Bot

As you probably figured it out, Halinka is a bot, a chatbot. It (or should I call her “She”?) supports our hiring process in automation of some common and boring tasks. And yes, we hire software programmers that’s why we hired the bot to handle the process smoothly ;-)

Who’s Watson

Watson is a very smart guy developed at IBM — right, not a guy but an AI, yet in Halinka’s world it’s a guy. Watson is a very broad term as it consists of many services that you can use in your application. …

About

Lukasz Lenart

OSS enthusiast, ASF committer, Apache Struts lead, developer, husband and father and biker :-)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store