Skip to main content

Posts

Microservice Architecture - How to

Microservices are an evolution of Service Oriented Architecture (SOA). They perform a small number of tasks of related functionality. Their main purpose is to keep services small and loosely coupled.

A single application may use multiple microservices to get it's job done. For example, a video streaming service may have a microservice for user accounts, another for comments on a video, and a third for the actual streaming of the media. The advantages of structuring your functionality this way are scalability and modularity.

Let's say you're a video streaming company and you have two platforms on which you have your product; desktop and mobile. For the desktop application you may want to offer only user accounts and video streaming. On the other hand, on mobile, you may want to focus solely on streaming and comments.

Microservice architecture gives you the flexibility to do this and scale your products appropriately. If the majority of your users are on mobile then you only…
Recent posts

How facial recognition works (A high level explanation)

Facial biometrics is a technology that has been acquiring increased interest and application throughout almost every industry. From airport security to cruise lines. Everyone is seeing the advantages that facial recognition can bring their business. Some examples include knowing when a repeat customer is visiting your store and offering highly personalized services and products. Other industries are using it for crime prevention; like airports.
But how does facial biometrics actually work? First, let's make a crucial distinction between face detection and facial recognition. Face detection is the ability to detect that there is a face present in an image or video. Facial recognition is the ability to know who the face belongs to.
Facial recognition is broken down into two categories. Verification and Identification. Verification is one-to-one matching. Verification can tell you if two faces belong to the same person. Identification is one-to-many matching. Given a single face and…

I did some ACID. Now I'm a Couch(base) potato

NoSQL has many advantages without a doubt. Fast insertion and retrieval. Fast scalability and replication as well.

Where I work we use Couchbase. Couchbase is a NoSQL database and it's a good product if you need fast master to master replication and lightning quick indexed searches. As a NoSQL database it is basically a document storage/retrieval service with some really cool features for CRUD operations.

But there is one area where Couchbase (and most other NoSQL databases) falls short. And that is transactional operations. Let's say you have to update several documents at once and if any of those updates fail you need to undo your changes. Failure is rare but not inevitable in our world and we need to account for it. You may think that all you need to do is setup a nice little exception handler which undoes your previous changes but what happens when that exception handler fails as well? Are you going to chain an infinite amount of exception handlers? What if your applicatio…