Blog A DHT gives you a dictionary-like interface, but the nodes are distributed across the network. The trick with DHTs is that the node that gets to store a particular key is found by hashing that key, so in effect your hash-table buckets are now independent nodes in a network. This gives a lot of… Continue reading Distributed Hash Table (DHT)
Tag: Design
Zookeeper vs Redis
Also Read: How to do distributed locking. Link , Link SO By default, Zookeeper replicates all your data to every node and lets clients watch the data for changes. Changes are sent very quickly (within a bounded amount of time) to clients. You can also create "ephemeral nodes", which are deleted within a specified time if a… Continue reading Zookeeper vs Redis
Design a Meeting Scheduler
SO Lately, I took an interview. I was asked to design a meeting scheduler, just like in the Microsoft outlook calendar or the gmail calendar. I proposed that I will create an array of 48 for each day. Every 30 min representing the array entry. I have to make sure that the next appointment does… Continue reading Design a Meeting Scheduler
Cab Scheduling Algo
Link 1. Pure greedy Dispatch every idle car to pick up the closest passenger that is waiting for a ride. This is probably the most straight-forward approach, nonetheless quite effective. I’d venture to say that this is probably the most common approach for taxi companies because of its simplicity and ease of execution. 2. Greedy… Continue reading Cab Scheduling Algo
Microservices
Imp Link - How to breakdown microservices YouTube Talk link Components - A component is a unit which is independently replaceable and independently upgradeable. Like imagine a music system where you could change the amplifier without affecting the other system. Like if a service needs to be moved to Java 8 but the other part of… Continue reading Microservices
SOA, Microservices & RESTFul
In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare… Continue reading SOA, Microservices & RESTFul
Design a highly consistent and is network partition tolerant DB
Link to original IntervieBit article Q: What is the amount of data that we need to store? Anwer: Let's assume a few 100 TB. Q: Do we need to support updates? A: Yes. Q: Can the size of the value for a key increase with updates? A: Yes. In other words, its possible a sequence of keys could co-exist on one server previously,… Continue reading Design a highly consistent and is network partition tolerant DB
Design a High Availability DB
This post is copied from InterviewBit. The peer to peer concept described below is implemented in Casandra. Q: What is the amount of data that we need to store? A: Let's assume a few 100 TB. Q: Do we need to support updates? A: Yes. Q: Can the size of the value for a key increase with updates? A: Yes. In… Continue reading Design a High Availability DB
CTCI: Given an input file with four billion integers, provide an algorithm to generate an integer which is not contained in the file.
Given an input file with four billion integers, provide an algorithm to generate an integer which is not contained in the file. Assume you have 1 GB of memory FOLLOW UP What if you have only 10 MB of memory? Solution There are a total of 2^32, or 4 billion, distinct integers possible. We have… Continue reading CTCI: Given an input file with four billion integers, provide an algorithm to generate an integer which is not contained in the file.
CTCI: A simple feed analysis
If you were integrating a feed of end of day stock price information (open, high, low, and closing price) for 5,000 companies, how would you do it? You are responsible for the development, rollout and ongoing monitoring and maintenance of the feed De- scribe the di erent methods you considered and why you would recommend… Continue reading CTCI: A simple feed analysis
You must be logged in to post a comment.