Can Sente be used in a server-only configuration?

159 views Asked by At

I'm looking to replace an existing Websocket-based server with a new version written in Clojure. It seems like the Sente library might be an appropriate choice for this. One thing that isn't clear to me, however, is to what extent Sente relies on a private internal protocol for its operation.

In my case, I have an existing server and client which use JSON-over-websockets, and I'd like to replace the server without modifying any client code. It seems like Sente has a lot of specific expectations about the nature of client requests -- for example, it expects clients to specify a client-id parameter and to accept :chsk/handshake messages from the server.

Is my use case simply outside of the design space that Sente targets? If so, is there a less opinionated implementation of websockets for Clojure that would be more appropriate?

1

There are 1 answers

0
Derek Thurn On BEST ANSWER

After more investigation, I found that Sente is a poor fit for server-only, since it has a lot of implicit assumptions about the protocol it uses. I found that HTTP-Kit was more suitable for my use case.