use wormhole to solve inconsistency caused by cache

https://www.facebook.com/notes/facebook-engineering/wormhole-pubsub-system-moving-data-through-space-and-time/10151504075843920

 

all applications subscribe to the wormhole which published logs in order to invalidate cache

Advertisements

replication types

http://dev.mysql.com/doc/refman/5.1/en/replication-sbr-rbr.html

 

Replication works because events written to the binary log are read from the master and then processed on the slave. The events are recorded within the binary log in different formats according to the type of event.

Two types: row-based replication and statement-based replication

create symlink

http://www.cyberciti.biz/faq/unix-creating-symbolic-link-ln-command/

How do I create soft link / symbolic link?

To create a symbolic link in Unix or Linux, at the shell prompt, enter the following command:
ln -s {target-filename} {symbolic-filename}

For example create softlink for /webroot/home/httpd/test.com/index.php as /home/vivek/index.php, enter the following command:
ln -s /webroot/home/httpd/test.com/index.php /home/vivek/index.php
ls -l

Output:

lrwxrwxrwx 1 vivek  vivek    16 2007-09-25 22:53 index.php -> /webroot/home/httpd/test.com/index.php

git patch

https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/

workflow

  1. git format-patch HEAD^n..HEAD  (it patches the commit excludes the last nth and includes the head; e.g., n = 1, then it patches only the last commit), then you will see a file usually beginning with 00.
  2. scp the patched file to the destination, another machine or maintainer
  3. on the destination, git am patch_file_path (the patched file has directory information of the repository, so it does not matter under which directory you run this command)

screen

http://www.computerhope.com/unix/screen.htm

screen workflow:

  1. screen : open a new window2 in an existing window1
  2. run commands on that window2
  3. ctrl + a then +d : de-attach the window2 and back to the old window1
  4. screen -x : at window1, go to the de-attached window2

Terminate a screen: ctrl+d

open a new screen: screen

deattach to a screen: ctrl+a, d

go to an existing screen: screen -x

go to a specific screen: screen -x 12335