Installation - synchrony/smsn GitHub Wiki
Installing Semantic Synchrony
Semantic Synchrony comes in two parts. The "front end" is the application the user interacts with (smsn-mode for Emacs), and the "back end" is the server that manages and persists your knowledge graph.
Quick Start
The SmSn server is a Java application with file-based storage (SQLite + Lucene indices, plus .smsn text files for each note).
Step 1: Build the Server
git clone https://github.com/synchrony/smsn.git
cd smsn
./gradlew :smsn-server:shadowJar
The result is smsn-server/build/libs/smsn-server-*.jar (approximately 63MB).
Step 2: Create Configuration
Create a smsn.yaml configuration file in the directory where you'll run the server:
# Index directory for SQLite and Lucene indices
indexDirectory: /path/to/index
# Activity log (optional)
activityLog: /path/to/activity.log
# Data sources - each source is a directory of .smsn atom files
sources:
- location: /path/to/public-notes
name: public
code: s
color: 0x00e000
- location: /path/to/personal-notes
name: personal
code: r
color: 0xffc000
- location: /path/to/private-notes
name: private
code: a
color: 0xff0000
# Optional settings
verbose: false
thingNamespace: http://example.org/things/
Each source location should be a directory containing .smsn atom files (one per note). These directories can be Git repositories for version control.
Step 3: Start the Server
Using the helper scripts (run from the directory containing smsn.yaml):
/path/to/smsn/bin/start-server.sh
Or run directly:
java -Xmx500M -jar /path/to/smsn-server/build/libs/smsn-server-*.jar
The server starts on 0.0.0.0:8182 and accepts WebSocket connections at /smsn. On first startup, it will build the index from your .smsn files (this may take a few minutes for large graphs).
To stop the server:
/path/to/smsn/bin/stop-server.sh
Step 4: Install Emacs and smsn-mode
Emacs 23 or higher is required. Download and install it, then clone smsn-mode:
git clone https://github.com/synchrony/smsn-mode.git
Add smsn-mode to your Emacs load path. Create a directory under ~/.emacs.d and symlink to smsn-mode:
mkdir ~/.emacs.d/elisp
ln -s /path/to/smsn-mode/lisp ~/.emacs.d/elisp/smsn-mode-lisp
Add to your ~/.emacs:
(let ((default-directory "~/.emacs.d/elisp/"))
(normal-top-level-add-subdirs-to-load-path))
(require 'smsn-mode)
If the server is not at the default 127.0.0.1:8182:
(defvar smsn-server-host "example.org")
(defvar smsn-server-port 8182)
Step 5: Start Using SmSn
With the server running, start Emacs and type:
M-x smsn
To start, create a root atom with C-c n.
See the howto for everything you need to know to use Semantic Synchrony.
Using the Shared Graph
To try SmSn without running your own server, you can connect to the shared graph at fortytwo.net. Just install Emacs and smsn-mode (Steps 4-5 above), then add to your .emacs:
(defvar smsn-server-host "fortytwo.net")
Rebuilding the Index
To rebuild the index from source files (useful after external edits to .smsn files or to recover from corruption):
- Stop the server
- Delete or move the index directory
- Start the server (it will rebuild automatically)
Legacy Documentation
For historical documentation about the previous TinkerPop/Neo4j-based backend, see Legacy TinkerPop Backend.
Meta
Note to SmSn developers: a copy of this wiki page can be found in the graph at :JwGnhoHw23PfCIyp:. However, GitHub is currently the source of truth.