Posts
Spark Shell + S3 + MySQL
Awhile ago I was tasked to generate some reports where data could come from different sources. To be exact one data set lives in Redshift, another resides on AWS S3 and all metadata is retained in MySQL. I read few articles about Spark and this time I thought Spark would be a great tool. Especially when I realized I couldn’t replicate data from MySQL to Redshift.
So before actually coding anything I needed to play with Spark.
Posts
My First Post On Hugo
I have moved to Hugo! It’s been awhile I posted anything although I had few drafts saved and waiting. But I am tired of maintaining Wordpress and paying extra money to Amazon :) And also those annoying comments from bots! Even Google Capture doesn’t help to get rid of them! So now I am hosting myself and Hugo is my tool to blog!
How I did that Install Hugo Firstly I installed Hugo and went through their Quick Start guide which basically is going to be your first blog post.
Posts
Python Crash Course: Learning Log
I have finished Python Crash Course book recently. And especially liked its second part with real projects. Book content is a little bit out-dated (2015), so I decided to post some notes about making Learning Log web application code to work with Django 2.x.
Foreign Keys The very first issue is that in Django 2.x you must specify on_delete rule. You’ll get it during Entry creation class. Any time you create ForeignKey don’t forget to specify on_delete parameter, for example:
Posts
Off-heap Hash Map in Java, part 2
I spent some time trying to re-produce issue we had in production which justified usage of Off-heap hash map. And it was a total fail! In theory I knew that it is related to cases when app needs huge maps consuming almost all heap memory and those maps are not static, they are constantly changed triggering Full GC cycles. Anyway I got some interesting results just comparing time and memory usage of map population.
Posts
Off-heap Hash Map in Java, part 1
A month ago I had to deal with an interesting case: huge hash maps in Java! When input started to grow we switched to larger AWS instance. But that didn’t help because input kept growing. And I observed huge heap consumption and very long GC pauses. Essentially application was partly doing its job and partly doing GC. But when it started to hit max heap I had to do something. And I started investigating off-heap solutions.
Posts
Few Optimizations for my Blog
It’s been a while I touched any of configurations. But few days ago I was reading DZone article about web application performance and tried one of the tool described there – Google’s PageSpeed Insights. And I was slightly disappointed to see that my WordPress is not 100% optimal! While nothing I can really do with recommendations about JavaScript, CSS or even images (unless I hack into WordPress), I found that enabling compression is doable.
Posts
Let’s Encrypt on Amazon Linux
More then a year ago I installed SSL/TLS support for this blog using Amazon’s guide. Now that certificate has expired and I need a new one. This time I decided to use Let’s Encrypt because I have successfully used it for my other projects. And it was actually very easy:
wget https://dl.eff.org/certbot-auto
chmod +x certbot-auto
./certbot-auto run --apache -d blog.apalagin.net
This tool will complain that Amazon Linux is experimental. But I had no issues with that and it did all the work for me!
Posts
QConSF 2017
About QCon has been hosted by InfoQ in 11 years in a row. It attracts a lot of engineers from all other the world. All famous brands like IBM, Oracle, Google, Netflix, LinkedIn etc. tend to have at least few talks there. QCon describes itself as a conference for senior engineers with emphasize on practical approaches. As a InfoQ reader I decided to give a try for its San Francisco version.
Posts
Java Tutorial: JNDI Trail Tips for OpenLDAP
With every major release of JDK I quickly review Oracle’s Java Tutorial for any updates. I did that for JDK 8 and will do that for JDK 9 soon. Usually I skip trails like JNDI or JavaFX because I don’t use them at my job. But few months ago I decided to read JNDI trail and want to share some tips I had to use.
Server Setup So you will need an LDAP server and tutorial refers reader to few vendors.
Posts
CMake and MinGW
I used to build my C/C++ toy projects in Code::Blocks, but now I have moved to CLion. And that IDE uses CMake under the hood. It automates all processes (same as Code::Blocks btw), but I was interested how to build my project w/o IDE. CMake has a nice and short tutorial, but it was missing the main point: how to start the build!!! I had to surf Internet for other tutorials for that.