JavaScript async/await in a Loop

Async/await syntax is a great technique how to deal with promises in modern JavaScript. Unfortunately it's not always easy to understand how it works which can lead to strange bugs. Let's investigate one of them.

Use-Case-Driven Testing

Why shouldn't we test the implemetation? How to decouple our tests from the code? What is the reason to add a new test? Why is mocking a code smell? In this article I will try to find answers to those questions.

Function Separation in a Microservice

Talking about serverless microservices, functions are the basic building blocks of the service functionality. How to design them from the code and deployment perspektive?

Testing Serverless Systems

Designing a system architecture is always about making tradeoffs. Microservices resp. serverless architecture has a lot of benefits, but some drawbacks as well. One of them is testing. Testing serverless systems is hard. In this article I will discuss some practices which work for my project.

How AWS Lambda Executes Node.js Functions

Based on my question on StackOverflow I did a bit investigation about how (likely) are Node.js functions called in AWS Lambda containers.

Building a simple REST API

In my previous article I showed how to build a simple RESTful microservice. For sake of simplicity I skipped some good practices for building REST APIs and I feel a bit guilty about that. I think that topic deserves its own article. And here we go... we take a look at the previous API and try to do things better.

PHP Restful API Microservices

How difficult is to properly implement the microservices design pattern in PHP? It will definitely need some thinking and maybe to leave some convince behind. At the end of the day we should have an autonomous loosely coupled service with all the benefits (and drawbacks) of microservices.
In this article we do a little walk-through of a development process of a small RESTful microservice in PHP and we take a look at some Domain-Driven Design (DDD) theory as well.

Pitfalls of Processing a Stream from an External Program

Let's image an external standalone program producing a big amount of binary data. Good example is a files converter (images, mp3s, documents, etc).
How to design such a program and what are the pitfalls of the approach?

Synchronized Methods vs Semaphore

When one-thread-access is too restrictive and we want to allow more threads to our resource then come semaphores on the stage.

But there is one important difference in these approaches.

Managing Asynchronous Tests

It's recommended to avoid any asynchrony within the scope of test, but this is unfortunaly not possible everywhere. In some systems the caller must wait for another thread or transaction to be completed.

Testing asynchrony could be pretty tricky, not always is clear how long must a test wait for a result to be delivered - if it's too little the test fails event when the tested functionality works, if it's too long the test is just wasting time (so expensive especially in the commit stage).

So, how to deal with this problem?