ChatGPT - How Long Till They Realize I’m a Robot?

Image
I tried it first on December 2nd... ...and slowly the meaning of it started to sink in. It's January 1st and as the new year begins, my future has never felt so hazy. It helps me write code. At my new company I'm writing golang, which is new for me, and one day on a whim I think "hmmm maybe ChatGPT will give me some ideas about the library I need to use." Lo-and-behold it knew the library. It wrote example code. It explained each section in just enough detail. I'm excited....It assists my users. I got a question about Dockerfiles in my teams oncall channel. "Hmmm I don't know the answer to this either"....ChatGPT did. It knew the commands to run. It knew details of how it worked. It explained it better and faster than I could have. Now I'm nervous....It writes my code for me. Now I'm hearing how great Github Copilot is - and it's built by OpenAI too...ok I guess I should give it a shot. I install it, and within minutes it'...

Consistency in Redis



Most uses of Redis will focus more on latency and availability rather than consistency - that’s because at its core, Redis is essentially a cache. Generally speaking, you store things in Redis in memory and you update or read them extremely quickly. You need to make sure that the cache is always available, so in most cases you’d only choose Redis if you’re leaning towards an A class system (A for Availability) rather than a C class system (Consistency).



However, it’s important to know that a replicated instance of Redis is capable of giving you different levels of consistency up to and including read-after-write consistency - the kind of consistency that guarantees data reads from anywhere that happen after a successful response to a write will receive that write. Even if the read goes to a different replica than the write did. What Redis can’t give you is linearizability - the guarantee that any set of observers of the system will only be able to see a single copy of the system at any point in time. Redis doesn’t offer distributed transactions out-of-the-box and therefore can’t provide this along with a replicated instance. And if the instance is NOT replicated but is sharded, then linearizability can only be achieved for writes to the same machine.

The way to get read-after-write consistency with a replicated Redis distribution is to:

1.) enable WAIT, and specify all replicas - this means writes will not succeed on the client side until all replicas have received the write and responded successfully.
2.) enable AOF and set it to ‘always’ - Append Only File means that writes will be pushed to a file using a fast algorithm. Always means that every single write will hit that file on disk.

These settings trade availability almost entirely for as much consistency as Redis can offer - if any replica is down, NO writes can go through. Though reads could still succeed for some users. However, considering that you still can’t get linearizability, there’s only a narrow swath of applications that would be best served by this configuration in Redis.

Nonetheless, it’s possible, and adds another degree of flexibility to Redis.

Comments

Popular posts from this blog

ChatGPT - How Long Till They Realize I’m a Robot?

My experience with Udacity

Architectural Characteristics - Transcending Requirements