Gustavo Straube

Introduction Using AWS Lambda we are able to run micro-service sized applications without any traditional server infastruture. These are called "serverless functions", which run inside ephemeral containers that offer several advantages over the traditional server/host configuration. We've used AWS Lambda functions for some time now. They're a great way to perform a simple computing at a large scale. And the best part - it comes without the need to manage server instances and other resources. Lambda allows you to write functions in a variety of different langauges (Java, Node.js, C# and Python). Our functions run on NodeJS. The…

We recently ran into a situation where the business logic of a project dictated that we can not have duplicate file contents. Regardless the naming convention, the contents of each file needed to remain unique. In this scenario, we were storing all types of uploaded files in a single directory. To prevent content duplication, we needed to compare the newly uploaded file with files already in the destination directory. Unfortunately, the Laravel documentation is not clear about the uploaded file class. Digging into the Laravel source code, you may find that instances returned by the file() method (from the request)…

Traditionally, many developers have opted to use relational databases when dealing with complex relationships between objects. For those of you who are used to working with relational databases like MySQL, a NoSQL database like Redis may seems like a difficult transition. While Redis is best suited for use cases like cache, queues, and leaderboards - it is possible to use Redis in front of a MySQL database. Doing this can improve overall query performance, while still allowing you to execute complex queries. Let's go ahead and dive deeper to see what can be achieved using Redis based queries. Storing Object…

Introduction cURL is a great library and tool. Quite often we'll use it to interact and fetch data from third-party API's. However, sometimes debugging requests made with cURL, specifically from a PHP application, can be tricky. Let's say you have an integration with a third-party API and the service becomes unstable. Some requests respond as expected, while others do not. How can we determine where the code is failing? Use Logs, Not Exceptions Just recently, we ran into a situation where one of our cURL integrations was failing. In production environments we capture and log all exceptions using an app…