Microservices Architecture : Best Practices

The other day I came across this article: “Microservices Architecture: All the Best Practices You Need to Know“.  There’s been a lot said and written about the microservices architectures around the web.  But I like this article in particular, because it paints a more realistic picture, in my opinion.  Big parts of it are covering the “why?” part of the whole conversation, and it presents a balanced view of pros and cons, as well as several approaches to solving the problems.

This is very refreshing after tonnes of “Microservices are amazing, and are the best thing since sliced bread” and “Microservices is nothing but hype and bubble” coverage out there.

Encrypt MySQL data using AES technique

I came across this blog post from a while back, which demonstrates how to use AES encryption for the data in MySQL database.

INSERT into user (first_name, address) VALUES (AES_ENCRYPT('Obama', 'usa2010'),AES_ENCRYPT('Obama', 'usa2010'));
SELECT AES_DECRYPT(first_name, 'usa2010'), AES_DECRYPT(address, 'usa2010') from user;

This seems rather easy and straightforward (apart from a little calculation one needs to do for the VARBINARY field types).  The only thing that I’m concerned about is whether the encryption keys will be visible in the MySQL process list (as in “SHOW FULL PROCESSLIST“).

Hiring Sucks.

The other day I came across this story by Guy Shachar, in which he shares his experience with hiring people and the lack of candidates.

The struggle is real. All the different startups are competing over the same human resource and let me tell you, the list of proficient talent isn’t as long as you might think. Or as someone once told me, the problem with going after the top 1% of talent, is that there is only 1% of top talent. In fact the only thing that’s harder than finding top talent employees, is finding top talent employees that are interested in working in your startup.

This reminded me of a long rant I wrote about ten years ago – Where did all the PHP programmers go? And I wasn’t even looking for the top 1% of talent at the time.  I have been continuously involved in hiring for a number of companies since that blog post.  I’ve tried a variety of different approaches with varying success.  But the problem is real and it’s getting worse.  There’s huge demand, insufficient supply, and the quality of the supply seems to be dropping as well, with many educational institutions falling behind the progress.

And it’s even tougher for the startups, as they don’t have much to throw into the competition with the larger established companies.

Caire – content aware image resize library

Caire is content aware image resize library.

How does it works

  • An energy map (edge detection) is generated from the provided image.
  • The algorithm tries to find the least important parts of the image taking into account the lowest energy values.
  • Using a dynamic programming approach the algorithm will generate individual seams accrossing the image from top to down, or from left to right (depending on the horizontal or vertical resizing) and will allocate for each seam a custom value, the least important pixels having the lowest energy cost and the most important ones having the highest cost.
  • Traverse the image from the second row to the last row and compute the cumulative minimum energy for all possible connected seams for each entry.
  • The minimum energy level is calculated by summing up the current pixel with the lowest value of the neighboring pixels from the previous row.
  • Traverse the image from top to bottom and compute the minimum energy level. For each pixel in a row we compute the energy of the current pixel plus the energy of one of the three possible pixels above it.
  • Find the lowest cost seam from the energy matrix starting from the last row and remove it.
  • Repeat the process.