Skip to content

Instantly share code, notes, and snippets.

@wu-wuxl
wu-wuxl / shell-script-cheat-sheet.md
Last active October 12, 2018 08:29
shell-script-cheat-sheet

Shell Script

Loop

For Loop

#!/bin/bash

for i in 1 2 3 4 5
@wu-wuxl
wu-wuxl / functional-programming-in-Java.md
Last active August 15, 2018 04:43
Book Notes - Functional Programming in Java

What is functional programming?

Functional programming is a programming paradigm. It isn't the opposite of object-oriented programming. It's not the language that makes programming functional. It's the way you write the code. But some languages are more funcitonal-friendly than others.

What funcitonal programming may be opposed to is the imperative programming paradiam.

# wget -i this_file
http://www.oreilly.com/programming/free/files/files/microservices-for-java-developers.pdf
http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.pdf
http://www.oreilly.com/programming/free/files/object-oriented-vs-functional-programming.pdf
http://www.oreilly.com/programming/free/files/java-the-legend.pdf
http://www.oreilly.com/programming/free/files/functional-programming-python.pdf
http://www.oreilly.com/programming/free/files/reactive-microservices-architecture-orm.pdf
http://www.oreilly.com/programming/free/files/migrating-cloud-native-application-architectures.pdf
http://www.oreilly.com/programming/free/files/software-architecture-patterns.pdf
@wu-wuxl
wu-wuxl / graph-tinker-pop.md
Last active June 20, 2018 07:28
Graph - TinkerPop

[Apache TinkerPop]

Apache TinkerPop™ is a graph computing framework for both graph databases (OLTP) and graph analytic systems (OLAP).

Property Graph

A graph is a structure composed of vertices and edges. Both vertices and edges can have an arbitrary number of key/value-pairs called properties. Vertices denote discrete objects such as a person, a place, or an event. Edges denote relationships between vertices.

Gremlin

@wu-wuxl
wu-wuxl / distributed-storage.md
Last active May 21, 2018 06:29
Distributed Storage

Theory

CAP

Solution

Consistent Hash

Real World

  1. Epidemic algorithms for replicated database maintenance
@wu-wuxl
wu-wuxl / redis-essentials-part-1.md
Last active May 8, 2018 10:55
Redis Essentials - Part I

[Redis Essentials]

Redis stands for REmote DIctionary Server. The official Redis documentation can be found at http://redis.io.

Data Types

Strings

A String can behave as an iteger, float, text string, or bitmap based on its value and the commands used.

@wu-wuxl
wu-wuxl / emr-dynamodb-connector.md
Last active May 2, 2018 11:26
EMR DynamoDB Connector

EMR DynamoDB Connector

InputFormat

DynamoDB specific [InputFormat] defines InputSplit[] and RecordReader.

InputSplit

InputSplit depends on two properties: number of segements and number of mappers avaiable in the cluster.

@wu-wuxl
wu-wuxl / System Design.md
Created April 25, 2018 06:45 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

What 's CDN?

https://www.webopedia.com/TERM/C/CDN.html

What's compoenents?

A Content Delivery Network (CDN) consists of two components: The Origin Server(s) – where the content to be distributed over Internet is originally stored & Cache Server(s) – where the content is duplicated. There is generally one Origin Server

How does CDN work?