Social Network Analysis application written in Erlang
Erlang Python Perl R Shell Scala
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



erlsna is a proof-of-concept application for my Computer Scince undergraduate thesis: Social Network Analysis software for longitudinal node experience analysis on dynamic networks. paper

erlsna follows Agent-based model where individuals (vertices on graph) are mapped to agent processes.

Though not highlighed in detail in the paper, erlsna provides a PubSub mechanism for real-time notifications on individuals. See below.

Eren Güven


erlsna has limited functionality and lacks documentation. Feel free to reach out to me if you need assistance. I intend to improve on this subject whenever I can.


  • Erlang R13B03 or newer (not tested with older releases)
  • Rebar (not mandatory but advised)

  • TCP port 8082 (configurable in

Optional Requirements

Python3 (for python driver and nntp_collector) MongoDB (for nntp_collector storage) R (for some charts) & zoo package (I think)

Running erlsna

./autorebar # rebar clean, compile and generate
./rel/mynode/bin/mynode console

For info on TCP message syntax, see the paper, APPENDIX B. For information on analyses and example graphs, see the paper, Chapter 5.

erlsna Python3 driver

import os
import erlsna
api = erlsna.ERLSNA(live=True)
png_path = os.path.expanduser("~/engagement_graph.png")
api.engagement_analysis("", with_graph_png=png_path)

For available keywords and further driver uses, refer to the source code.

PubSub and real time capabilities

This was developed for a demo. Currently PubSub is only available for Closeness Centrality metric. One can subscribe to an agent (through Python driver or raw TCP message over Telnet) with a condition and get notified whenever it holds true. An example:


# Telnet
subscribe > 0.123

Will notify the Telnet client whenever the agent's ("") closeness centrality goes over 0.123. The publish will only happen once per going over threshold.


api = ERLSNA()
api.subscribe("", "<", 0.02)
  • > : goes over given value
  • < : goes below given value
  • = : becomes equal to given value
  • * : every time a change happens (a dummy value is expected after eg: subscribe * 0)


Used to collect data from NNTP servers for testing and demonstration, requires MongoDB to be running.

collect: collect (from where it left off) new articles from given server & group emailfixer: to fix dual-line "From:" header issue in NNTP responses, will prompt user for fixes livedump: push data to running erlsna node