Achieving Failover using Docker, Kubernetes, Apache Kafka and ZooKeeper

In today’s world, the cloud dominates most of what we access online. Rarely are websites still hosted on a single server in a single location. Most of the time, software is written with clustering and cloud in mind.

Developing clustered web based systems requires some unique thinking about architecture and synchronization. In this post I’d like to outline a project I have written in summer 2018 to achieve automatic recovery for a clustered system when one of it’s components blacks out.

Continue reading “Achieving Failover using Docker, Kubernetes, Apache Kafka and ZooKeeper”

Some C, finally

After this Winter Semester I can now finally count C as one of the languages I am comfortable in.

I learned programming C in a course that could loosely translate to “programming close to system” or “machine oriented programming”.

We devised a virtual machine for the ninja programming language that was designed from the ground up as a stack machine. A stack machine is a easy start as you can quickly design the stack and binary operations that consume operands from the stack and produce one new result to be pushed on the stack.

We started with a purely integer based stack, because we wanted the encoding of instructions to be conceptualized before we added an object based stack.

The encoding of instructions went like so: Continue reading “Some C, finally”

Component based Entity System

Notice: This is a post I reposted from my old website.

Started development of a basic Entity-Component-Framework where Entities are limited to an abstract implementation where no actual “Entity” exists. An Entity is made up of different components.

Components have no real “logic” included in them. They are merely containers for values. E.g. a PositionComponent only holds x,y values, whereas a ImageComponent contains a image variable of some sort.

Systems operate on Entities which contain the apropriate number and type of component. A MovementSystem only operates on Entities that have a PositionComponent as well as a VelocityComponent.

Real simple stuff. But it really helps because it lays heavy emphasis on composition instead of inheritance which can make many things a lot simpler 🙂

I will put it on bitbucket later so everyone can check out the code.

Edit: You can now find the code at my bitbucket –click-.