Skip to content

Instantly share code, notes, and snippets.

@ankithooda
ankithooda / gist:b0d624aec9b3ed2882713d59feba4b11
Last active October 25, 2024 15:38
SimpleDB setup instructions from terminal - NO IDE
# Get SimpleDB_3.4.zip from here - http://www.cs.bc.edu/~sciore/simpledb/
# Tested using OpenJDK 17.0.2
# Unzip SimpleDB_3.4
> unzip SimpleDB_3.4.zip
> cd SimpleDB_3.4
# Create bin folder to store the compiled .class files
> mkdir -p bin/server
@ankithooda
ankithooda / gist:6313a460679b080c0f045a68180a53db
Last active June 24, 2024 13:20
Infinite Stream Objects in Javascript
//Infinite steams implemented in Javascript as described in Chapter 3 of SICP.
////////////////////////////// Start of Program ///////////////
// This is cons function of lisp
function pair(a, b) {
return [a, b];
}
// this is car function of lisp
@ankithooda
ankithooda / gist:6f3a7fd65996c3023bc9057316d9d335
Created April 1, 2024 07:15
High Performance Web Server - Jeff Darcy
Introduction
The purpose of this document is to share some ideas that I've developed over the years about how to develop a certain kind of application for which the term "server" is only a weak approximation. More accurately, I'll be writing about a broad class of programs that are designed to handle very large numbers of discrete messages or requests per second. Network servers most commonly fit this definition, but not all programs that do are really servers in any sense of the word. For the sake of simplicity, though, and because "High-Performance Request-Handling Programs" is a really lousy title, we'll just say "server" and be done with it.
I will not be writing about "mildly parallel" applications, even though multitasking within a single program is now commonplace. The browser you're using to read this probably does some things in parallel, but such low levels of parallelism really don't introduce many interesting challenges. The interesting challenges occur when the request-handling infrastructure it