Skip to content

Commit

Permalink
Big migration from httpkit to jetty and lots more
Browse files Browse the repository at this point in the history
  • Loading branch information
atdixon committed Jan 5, 2023
1 parent aed1478 commit 1519b8f
Show file tree
Hide file tree
Showing 27 changed files with 948 additions and 325 deletions.
2 changes: 1 addition & 1 deletion .java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17
16.0.2
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ dependency-sources:

.PHONY: run
run:
clj -J-Dlogback.configurationFile=conf/logback.xml -M -m me.untethr.nostr.app
clj \
-J-Dlogback.configurationFile=conf/logback.xml \
-J-Xms1g -J-Xmx1g \
-M -m me.untethr.nostr.app

.PHONY: uberjar
uberjar:
Expand Down
10 changes: 9 additions & 1 deletion conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,17 @@
<appender-ref ref="FILE"/>
</root>

<!--
<logger name="org.eclipse.jetty.websocket.core.internal"
level="debug"
additivity="false">
<appender-ref ref="FILE"/>
</logger>
-->

<!-- p6spy -->
<logger name="p6spy" additivity="false">
<appender-ref ref="FILE_P6SPY" />
</logger>

</configuration>
</configuration>
5 changes: 5 additions & 0 deletions conf/relay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ max-content-length: 1048576
# If specified, events with a created_at more than the current system's
# epoch millis *plus* this delta will be accepted.
max-created-at-delta: 2700

websockets:
max-outgoing-frames: 5000
disable-permessage-deflate: false
enable-batch-mode: true
6 changes: 3 additions & 3 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{:deps
{org.clojure/clojure {:mvn/version "1.11.1"}

http-kit/http-kit {:mvn/version "2.6.0"}
metosin/reitit-core {:mvn/version "0.5.18"}
metosin/reitit-ring {:mvn/version "0.5.18"}
org.eclipse.jetty/jetty-server {:mvn/version "11.0.13"}
org.eclipse.jetty.websocket/websocket-jetty-api {:mvn/version "11.0.13"}
org.eclipse.jetty.websocket/websocket-jetty-server {:mvn/version "11.0.13"}

org.xerial/sqlite-jdbc {:mvn/version "3.40.0.0"}
com.github.seancorfield/next.jdbc {:mvn/version "1.3.847"}
Expand Down
4 changes: 4 additions & 0 deletions doc/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ You can query for server metrics:

```shell
$ curl https://<relay-host>/metrics

# with jq installed
$ curl -sS http://<relay-host>/metrics | jq '.meters | ."app.event.duplicate"
$ watch "curl -sS http://<relay-host>/metrics | jq '.meters | .\"app.event.duplicate\"'"
```
And issue basic non-websocket queries over your relay's data:
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ git tag "v${VERSION}"
git push origin "v${VERSION}"

# probably non-os portable sed command (works on mac):
sed -i '' 's/"SNAPSHOT"/"'"${VERSION}"'"/g' src/me/untethr/nostr/version.clj
sed -i '' 's/"SNAPSHOT"/"'"${VERSION}"'"/g' src/me/untethr/nostr/common/version.clj

make clean uberjar

Expand Down
Loading

0 comments on commit 1519b8f

Please sign in to comment.