Skip to content

Instantly share code, notes, and snippets.

View dracarys18's full-sized avatar

Karthikey Hegde dracarys18

View GitHub Profile
@dracarys18
dracarys18 / keywords.json
Last active March 21, 2026 07:36
keywords
[
{
"keyword": "Distributed Systems",
"context_string": "Keyword: Distributed Systems. Context: Architectures, patterns, and principles for coordinating multiple independent computing nodes across a network to operate as a single coherent system. Focuses on data replication, partitioning, and consistency models. CAP theorem, PACELC theorem, eventual consistency, strong consistency, causal consistency, read-after-write consistency, monotonic reads, linearizability, strict serializability. Replication strategies include single-leader, multi-leader, and leaderless replication, strict quorums, sloppy quorums, hinted handoff, read repair, replication lag, active-active deployments. Data partitioning, sharding, consistent hashing, distributed hash tables DHT. Concurrency and time management encompass vector clocks, version vectors, Lamport timestamps, hybrid logical clocks HLC, TrueTime bounded clock uncertainty, clock skew, clock drift, monotonic vs wall clocks, Network Time Protocol NTP, deterministic a
#[derive(Default)]
struct SelectBuilder {
table: String,
}
impl SelectBuilder {
fn new(table: String) -> Self {
Self { table }
}
public class ConcurrencyMgr {
/**
* The global lock table. This variable is static because
* all transactions share the same table.
*/
private static LockTable locktbl = new LockTable();
private Map<BlockId,String> locks = new HashMap<BlockId,String>();
/**
@dracarys18
dracarys18 / xlock.rs
Created November 27, 2024 17:35
Implementation of XLOCK in concurrency manager
/// If the transaction already has an exclusive lock or a shared lock then
/// the lock will not be acquired. Otherwise we acquire the shared lock and
/// then upgrade the lock to Exclusive
pub fn xlock(&mut self, block: &Block) -> DbResult<()> {
if !self.has_x_lock(block) {
self.slock(block)?;
LOCK_TABLE.safe_lock().xlock(block)?;
self.locks.insert(block.clone(), LockTypes::Exclusive);
}
@dracarys18
dracarys18 / myfeed.opml
Last active March 12, 2026 20:05
Tech Blogs I am following
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1" xmlns:feeder="https://nononsenseapps.com/feeder">
<head>
<title>
Feeder
</title>
</head>
<body>
<outline title="Companies" text="Companies">
<outline feeder:notify="false" feeder:imageUrl="https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png" feeder:fullTextByDefault="false" feeder:openArticlesWith="" feeder:alternateId="false" title="The Netflix Tech Blog" text="The Netflix Tech Blog" type="rss" xmlUrl="http://techblog.netflix.com/feeds/posts/default"/>
@dracarys18
dracarys18 / state_population.json
Last active June 7, 2021 17:14
Populations of Indian States from 2019 Census report. Scraped from https://statisticstimes.com/demographics/india/indian-states-population.php
{
"AP": {
"codename": "AP",
"id": 21,
"name": "Andhra Pradesh",
"population": "53,903,393"
},
"AR": {
"codename": "AR",
"id": 32,