Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mirage/irmin-server

A high-performance server for Irmin
https://github.com/mirage/irmin-server

database irmin server

Last synced: 4 days ago
JSON representation

A high-performance server for Irmin

Awesome Lists containing this project

README

        

# irmin-server

A server for [irmin](https://github.com/mirage/irmin) using a custom wire [protocol](#protocol), designed to have minimal overhead.

## Command-line

### Server

To run the server:

```shell
$ dune exec bin/server/server.exe -- --root ./data
```

Run the server with web-based dashboard on port 9999:

```shell
$ dune exec bin/server/server.exe -- --root ./data --dashboard 9999

For more information:

```shell
$ dune exec bin/server/server.exe -- --help
```

`irmin-server` accept `WebSocket` connection.
To run the server:

```shell
$ dune exec -- ./examples/server.exe --uri=ws://localhost:9090/ws
```

`irmin-server` can also be executed using `Docker`:

```shell
$ docker run --env PORT=9999 $(docker build -q .)
```

### Client

`irmin-client` is a command-line application that can be used to send commands to `irmin-server`

For a list of available commands:

```shell
$ dune exec bin/client/client.exe -- --help
```

For help with a specific command (for example, ping):

```shell
$ dune exec bin/client/client.exe -- ping --help
```

`irmin-client` can also send commands to `irmin-server` via WebSocket.
To run an example thats ping the server:

```shell
$ dune exec ./examples/ping.exe ws://localhost:9090/ws
```

## Browser

### Server

`irmin-server` accept `WebSocket` connection which makes communication from a browser possible.
To run the server:

```shell
$ dune exec -- ./examples/server.exe --uri=ws://localhost:9090/ws
```

### Client

`irmin-client-jsoo` is a browser application that can be used to send commands to `irmin-server` via WebSocket
`cd` into examples/js

```shell
$ dune build
```

To run an example thats ping the server from the browser:
Open the file `_build/default/examples/js/index.html` in the browser

## OCaml client

An OCaml client library is provided to interact with the server. Some examples can be
found in the [examples/](/examples) directory.

### Docs

See [src/irmin-client/client_intf.ml](/src/irmin-client/client_intf.ml)

## Protocol

A specification of the wire protocol can be found in [PROTOCOL.md](/PROTOCOL.md)