A running example of the code from:
- http://marcio.io/2015/07/handling-1-million-requests-per-minute-with-golang
- http://nesv.github.io/golang/2014/02/25/worker-queues-in-go.html
Small refactorings made to original code:
#!/bin/bash | |
# install java 8 | |
sudo add-apt-repository ppa:openjdk-r/ppa | |
sudo apt-get -y update | |
sudo apt-get install -y openjdk-8-jdk | |
# install zookeper, mesos, marathon, chronos | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E56151BF | |
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]') |
#!/bin/bash | |
# update | |
sudo apt-get -y update | |
# install dependency | |
sudo apt-get -y install git php5-fpm php5 php5-mcrypt php5-gd php5-cli php5-json php5-curl curl php-pear php5-mysql nginx build-essential mysql-server | |
# enable mcrypt | |
sudo php5enmod mcrypt |
A running example of the code from:
Small refactorings made to original code:
package main | |
import ( | |
"fmt" | |
"github.com/rhinoman/couchdb-go" | |
"time" | |
) | |
type APICall struct { | |
AppId string `json:"appId"` |
#!/bin/bash | |
# install java 8 | |
sudo add-apt-repository ppa:openjdk-r/ppa | |
sudo apt-get -y update | |
sudo apt-get install -y openjdk-8-jdk | |
# install zookeper, mesos, marathon, chronos | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E56151BF | |
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]') |
#!/bin/bash | |
sudo add-apt-repository ppa:openjdk-r/ppa | |
sudo apt-get -y update | |
sudo apt-get install -y openjdk-8-jdk | |
#!/bin/bash | |
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823 | |
sudo apt-get update | |
sudo apt-get install sbt |
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/gocql/gocql" | |
) | |
func main() { |
#!/bin/bash | |
sudo /bin/bash install-java.sh | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E56151BF | |
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]') | |
CODENAME=$(lsb_release -cs) | |
# Add the repository | |
echo "deb http://repos.mesosphere.com/${DISTRO} ${CODENAME} main" | \ |
#!/bin/bash | |
set -o errexit -o nounset -o pipefail | |
########################################################## | |
# DEPRECATION WARNING: This script has been deprecated. # | |
# # | |
# Please use marathon-lb instead: # | |
# https://github.com/mesosphere/marathon-lb # | |
########################################################## |