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 | |
sudo apt-get update -y | |
sudo apt-get install -y apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
sudo echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list | |
sudo apt-get -y update | |
sudo apt-get -y install linux-image-extra-$(uname -r) | |
sudo apt-get -y update |
#!/bin/bash | |
sudo apt-get install python-pip | |
sudo pip install virtualenv | |
mkdir dcos && cd dcos | |
curl -O https://downloads.dcos.io/dcos-cli/install.sh | |
bash install.sh . http://192.168.50.30:8080 | |
dcos config prepend package.sources https://github.com/mesosphere/universe/archive/version-2.x.zip |
#!/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 # | |
########################################################## |
#!/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" | \ |
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/gocql/gocql" | |
) | |
func main() { |
#!/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 |
#!/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 | |
# 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:]') |
package main | |
import ( | |
"fmt" | |
"github.com/rhinoman/couchdb-go" | |
"time" | |
) | |
type APICall struct { | |
AppId string `json:"appId"` |
A running example of the code from:
Small refactorings made to original code: