Questions tagged [aleph]

Aleph is a Clojure framework for asynchronous communication, built on top of Netty and Lamina

Aleph allows the creation of both clients and servers that can communicate using an array of protocols (HTTP, WebSockets, TCP, UDP, and others), and represents that communication via a single abstraction, channels. Because of the underlying libraries and the event-driven approach to communication, these clients and servers can be highly scalable.

See more:

22 questions
5
votes
1 answer

How can I get a Netty server to reload a TLS certificate when it is renewed?

I have a Netty-based server that uses PEM-encoded certificate files that are periodically re-issued (by Let's Encrypt). Netty fully supports loading the PEM crypto material, but when the certificate (.cer file) is later re-issued, the server needs…
Matthew Phillips
  • 1,275
  • 1
  • 12
  • 19
5
votes
2 answers

Why doesn't Aleph's HTTP server do anything?

I've written a relatively simple HTTP server using Clojure's Aleph library. It's not very complicated: (ns cxpond.xmlrpc.core (:gen-class) (:require [aleph.http :as http])) (defn handler [req] {:status 200 :headers {"Content-Type"…
mipadi
  • 398,885
  • 90
  • 523
  • 479
4
votes
0 answers

Failed to find a usable hardware address from the network interfaces

I'm getting the following warning when running Aleph (which uses Netty) as a websever inside a Docker container: WARNING: Failed to find a usable hardware address from the network interfaces; using random bytes: 75:62:7f:9b:c6:52:63:4b I'm starting…
Hugo
  • 710
  • 1
  • 10
  • 19
3
votes
1 answer

Clojure. Http stream file

I want to stream large binary files (exe, jpg, ..., all types of files). It seems that the aleph client can do it. I looked at the official sample and understood that if we pass the lazy sequence to the body, the response can be passed a…
user565447
  • 969
  • 3
  • 14
  • 29
2
votes
1 answer

Accessing the Aleph API with PHP, always getting error "No schema is specified for the query."

I'm trying to access the OCCRP Aleph API https://redocly.github.io/redoc/?url=https://aleph.occrp.org/api/openapi.json with the following PHP program $url = 'https://aleph.occrp.org/api/2/entities?q="title:bank"'; $ch = curl_init(); $headeroptions =…
2
votes
1 answer

How to get metrics for manifold bus in the context of aleph

Given a bus created with Aleph/Manifold, how can you measure interesting metrics like throughput, latency, number of errors and timeouts? (manifold.bus/event-bus (fn [] (s/stream 100 )))
Odinodin
  • 2,147
  • 3
  • 25
  • 43
2
votes
1 answer

How to ensure websocket connection is kept alive in Aleph

I'm trying to interface with Slack's RTM API with Aleph. Currently I have this code: (defn connect-socket [] (let [conn @(http/websocket-client (get-websocket-url))] (s/consume #(prn %) conn) (send-message conn {:type "ping"}) ;; just to…
2
votes
1 answer

TCP transport long bytes with Aleph

I am trying to build RCP server based on aleph. It passed on all the test, but when the byte array for send or receive become large, the bytes seems been corrupted. For example. I tried to send a byte array which length is 2936, but I only got 1024…
Shisoft
  • 4,197
  • 7
  • 44
  • 61
2
votes
2 answers

Handling websocket client messages with aleph

During my quest to learn Clojure I am currently facing problems with setting up websocket communitation. After many different approaches, I ended up using aleph. What I managed to achieve: handling of a new client connecting handling a client…
Apo
  • 140
  • 6
1
vote
0 answers

RecallNumber in Aleph mode declarations

Here is the definition of RecallNumber in the Aleph Manual. As I understand it so far RecallNumber defines an upper bound (Either a number or * for unbounded) for "the number of successfull calls" of a given predicate. But I'm lost on the context of…
Cronos
  • 31
  • 2
1
vote
0 answers

Is it possible to develop a custom ALEPH client so that I do not have to use OPAC?

My university's library is using ALEPH 500 as the DB. And it has an old and not-mobile friendly website to query book info. I recently learned that using tools like ODBC or JDBC, we can create websites and apps to connect to databases, such as…
jackxujh
  • 983
  • 10
  • 31
1
vote
1 answer

Aleph/Clojure - How to insert custom headers in the web socket upgrade response?

I am trying to port one of our services to Aleph. The service uses a web socket server (currently runs on http-kit). One of the things I require is the ability to add some custom http headers in the response during the websocket Upgrade process. Do…
msj
  • 143
  • 1
  • 6
1
vote
1 answer

Clojure: Connecting to a TLS enable docker daemon using aleph

I'm trying to connect to a mutually authenticated Docker daemon using aleph. The aleph docs show that you can pass in a netty SSL context for auth purposes. It seems like I'm creating the SslContext correctly, but all requests are closed (require…
bhurlow
  • 2,019
  • 2
  • 16
  • 14
1
vote
1 answer

Clojure - use a core.async channel with Yada/Aleph

I am trying to use Clojure manifold library, and in order to understand it, I need wanted to convert a core.async channel into a manifold stream. I would like to create the equivalent the following using a core.async channel : (require…
nha
  • 17,623
  • 13
  • 87
  • 133
1
vote
1 answer

Compojure/Ring Routing Error: Wrong # of Arguments

The route setup detailed below causes the error: Wrong number of args (0) passed to: PersistentArrayMap Can anyone help me understand this error and how to resolve it? (defn sign-in [req] ({:status 200 :body "hello world" :headers {"content-type"…
Ari
  • 4,121
  • 8
  • 40
  • 56
1
2