Search Results


23 matches found for 'consistency'

CAP Patterns

... choose between CP or AP. CP - Consistency/Partition Tolerance You enforce consistency with this pattern. Waiting for a response from the partitioned node might result in a timeout error.


Sharding Techniques

Introduction Sharding can be summarized as a technique in which a database table can be split into multiple database servers to optimize read/write performance. Benefits include: Optimized query time Instead of having one huge database table, you have multiple smaller tables in more than one machine.


Distributed scaling with Relational Databases

... on distributed systems and you want to keep the same ACID guarantees such as atomicity or strong consistency. Instead, most articles will just point you to the alternatives to SQL (i.


Data stores in Software Architectures

... of large amounts of unstructured data with very good latency and availability, at the cost of consistency. These databases are suitable for real-time operations. Normally, this kind of data is also stored behind a distributed cache, to reduce the network calls to databases.


Data Sharding: Twitter Posts

Scenario Let's begin with a Twitter-like service that allows you to tweet new posts. The service has very high read and write traffic , we'll say ~10k read TPS, or transactions-per-second for starters.


NoSQL - the Radical Databases

NoSQL NoSQL is a category of databases that aren't relational. For example, MySQL would be a relational database, where as MongoDB would be a NoSQL database. Back then, relational databases were the tried-and-true, prevalent and reliable data stores.


Design Concepts

In this article, I want to go over some fundamental design concepts that are useful for coming up with system design. Requirements Functional Requirements Describes specific behaviors i.e. If a URL is generated, it is composed of a Base64 encoded alias Non-functional Requirements Describes architectural requirements i.


RDBMS Optimization

Indexing Probably the easiest tweak to implement. It can usually be done with one SQL command. However, an index should be made based on a good column. For example, if you are frequently querying your rows by timestamp, then the timestamp can be chosen for an index.


Scaling Instragram Infrastructure

... to store user feeds, activities, etc. All replicas have the same copy of data, with eventual consistency Image conversion is done at read time, not upload time Scaling Used a pod or group of Django, RabbitMQ to represent the application stack for one region Problem #1: Initially memcached would be in each local pod, but that lead to data staleness (memcached data from pod #1 could be stale vs.


Working with Production at Amazon Retail Website

A short background Prior to working at Amazon, I was developing software at a couple of startups, mostly working with products that were in the conceptual phase or the development phase. One of the things I desired the most was to have exposure to products that were live in production or to bring a development project to production.


Ether and Ethereum is not the same thing

Ether vs. Ethereum Ethereum is... A network built on blockchain technology It's focus is to have decentralized apps (DAPPS) Based on Smart Contracts: A self-executing contract where given an input, a certain is output is guaranteed.


Find the duplicate number

Problem Given an array nums containing \(n + 1\) integers where each integer is between \(1\) and \(n\) (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find the duplicate one.


Validate a BST

Problem With a binary tree as input, determine if the tree is a BST or not Input node: Has 3 properties .val: Integer value of the node .left: A pointer to another node object, or None if null .


Symmetry in a Tree

var jsav = new JSAV("av-sym"); jsav.label("Symmetric tree"); var bt = jsav.ds.binarytree(); bt.root("5"); // set the value of the root bt.root().left("3"); // set left child bt.


Intro to Python Lambda

Lambdas are simply anonymous functions for Python. We often don't want to write a whole new function with a name if the function itself only consists of one line of code. It is tedious, even though it might be less scary to see.


Web Development 101

HTTP vs. HTTPS HTTP stands for Hypertext Transfer Protocol. It typically runs on TCP port 80. It is a protocol for sending data through browsers in the form of webpages and such. One major flaw with HTTP is that it is vulnerable to man in the middle attacks.


Big Data Processing: Batching vs. Streaming

Intro In data processing, we often have to work with large amounts of data. The way in which this data is gathered comes in a few variants: batching, where we aggregate a collection of data (e.g., by hourly time), streaming for data that needs to be processed in real-time, and a unified variant which simply does not distinguish the technical difference between batching and streaming, allowing you to programmatically use the same API for both.


Greedy Algorithms

There are many definitions of greedy algorithms, but in general, they have two properties: You build the solution by finding the most optimal answer at each local step. As you go through each local step, you do not backtrack; the answer you've picked for all of the previous steps remain the same.


Phone Number Mnemonics in Python

Recursion is a great way to come up with permutations of strings or elements. Not necessarily because of the performance (iterative styles are usually faster) but because of simplicity and organization - like many algorithms with functional programming languages like Scala, recursive functions in general look neater, nicer, and easier to categorize.


Misconceptions of ASCII and Unicode

Myth: ASCII characters take up one byte ASCII represented characters using numbers between 32 and 127. This accounted for characters used in the English language (lowercase and uppercase) and the numbers between 1-32 were reserved control characters.


Composite Pattern

The Composition design pattern helps you unify individual objects and nested objects. Here is one use case for the composition design pattern. Meet Frank A man named F. Frank decides to write an autobiography of himself.


Javascript Essentials

... scope gets changed at runtime, then the interpreter can no longer rely on the lexical scope for consistency; code references may be re-arranged, added, or removed. Object.create() Similar to new, it takes a prototype as an argument and creates a new object with a reference to that prototype and returns it.


What is DDD? What is CQRS?

Domain Driven Design DDD is an approach to developing software systems that is large and complex, and has ever-changing business rules. DDD captures the sweet spot between the business knowledge and the code.