Skip to content

Instantly share code, notes, and snippets.

@Aetherus
Aetherus / nvidia-elementaryos-loki.md
Created Sep 28, 2019 — forked from Jiab77/nvidia-elementaryos-loki.md
nVidia drivers installation on ElementaryOS - Loki (ubuntu 16.04 based distrib)
View nvidia-elementaryos-loki.md

nVidia drivers installation on ElementaryOS - Loki

Introduction

ElementaryOS - Loki is an amazing ubuntu based distribution, I've just felt in love on it BUT they've removed what's required to install easily the nVidia Proprietary drivers. So here is the reason of this gist, to store the install instructions in one place inside a crystal clear documentation.

Check your device

View writing-a-tsung-plugin.md

Writing a Tsung plugin

This is a simple tutorial on writing a tsung plugin and a repost of our ProcessOne tutorial.

Since tsung is used to test servers lets define a simple server for testing. myserver.erl provides 3 operations: echo, add and subtract.

myserver.erl assumes the first byte to be a control instruction followed by 2 or more byte data. The echo operation merely returns the byte data while add and subtract performs these operations on the 2 byte data before returning the results. See the code of myserver.erl for details.

We assume the source files for tsung-1.2.1 are available. This example was compiled using Erlang OTP R11B-3.

@Aetherus
Aetherus / scale-out-phoenix-with-websocket.md
Last active Jun 6, 2021
How to scale out a Phoenix application with websocket
View scale-out-phoenix-with-websocket.md

How to scale out a Phoenix application with websocket

Foreword

It's relatively easy to scale out stateless web applications. You often only need a reverse proxy. But for those stateful web applications, especially those applications that embeds websocket services in them, it's always a pain to distribute them in a cluster. The traditional way is introducing some external services like Redis to handle pubsub, however, in such way, you often need to change your code. Can Erlang/Elixir, the "concurrency oriented programming languages", best other languages in this use case? Has Phoenix framework already integrated the solution of horizontally scaling websocket? I'll do an experiment to prove (or disprove) that.

Resources