DynamoDB: 3 ways to use the API

The way you interact with DynamoDB is usually with AWS SDK, where you can perform: Items-based actions: Anytime you act on a single item - writing, updating, or deleting - you are using an item-based action. You must provide the entire primary key. Query: Read-only actions that allow you to fetch multiple items in a single request. You must provide the partition key and optionally provide sort key conditions. Scan: Full table scan that looks at every item in your table. Avoid it unless you are doing an export or ETL. It’s an expensive operation at scale regarding how long it takes to respond to a request and how much capacity you need to service it. Remember that there is a 1MB limit when reading items from the table. ...

December 14, 2021

5 Responsibilities Regarding the JWT as an API Provider

As a reminder, a JWT (JSON Web Token) is a way for securely transmitting information between parties as a JSON object. As an API provider, here are the actions to take on the received JWT: Validate the signature of the JWT (mandatory) Check if the scope necessary to use your API is present (mandatory). Your API may require more than one scope. Check if the JWT is not expired (mandatory) ...

December 12, 2021

My Thoughts About Java Reactive Programming

Context Traditional Java applications use thread pools for simultaneous I/O operations (such as a REST call). Each request consumes a thread freed at the end of the processing only. So, whenever the thread pool is empty, new requests are blocked waiting for an available thread. This programming paradigm is called imperative or blocking. What is reactive programming? It is a programming paradigm based on the data transmission from one or more sources called Publishers to other elements called Subscribers in an asynchronous, non-blocking, and functional way. Streams combined with the Observable design pattern process all types of data. ...

December 11, 2021

Hexagonal Architecture and Microservices

Presentation Several technologies make it possible to expose or invoke business functions: SOA, REST / Web API, Messaging / JMS, and others. It is crucial to isolate the code that implements the business logic from the architectures used. The hexagonal architecture is an option to design microservices to address these challenges. Source: http://tpierrain.blogspot.com/2013/08/a-zoom-on-hexagonalcleanonion.html P/A stands for “Port/Adapter” and UC stands for “Use Case” High-level sequencing: A service receives and sends events to the “outside” via ports. A port is specific to a technology or a protocol: Servlet API, SOAP endpoint, JMS listener, or a JDBC driver. ...

December 10, 2021

Modern Website Architecture Overview in AWS

I have recently launched a new website snapvocab on the AWS cloud. This hands-on experience allowed me to practice what I learned in the AWS Cloud Developer Certification. After long hours working on it - more than I expected, I can tell you it was worth it. Nothing can ever replace having our hands dirty! From a functional point of view, it is simply a CRUD application that allows a user to manage a list of words with a paid plan. On the technical side, my goal was to leverage AWS services to go live as soon as possible and at a lower cost. ...

December 9, 2021