Skip to content

Commit 7431511

Browse files
authored
Replace jetty with ktor. (#1178)
* chore: Update jicoco to 1.1-142-gfed0320. * feat: Add a ktor server, move /metrics to it. * feat: Move /about/version to ktor. * ref: Move health to ktor. * wip: Port ConferenceRequest to ktor. * wip: Organize ktor exceptions. * ref: Move MoveEndpoints to ktor. * ref: Move RtcStats to ktor. * ref: Move RestConfig to the ktor package. * ref: Move Debug to ktor. * ref: Move Pin to ktor. * ref: Move stats to ktor. * ref: Remove jetty, move ktor to 8888. * chore: Remove jetty dependencies. * chore: Bump jicoco to 1.1-143.
1 parent c88a392 commit 7431511

File tree

20 files changed

+514
-860
lines changed

20 files changed

+514
-860
lines changed

jicofo-common/pom.xml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
</exclusion>
2525
</exclusions>
2626
</dependency>
27-
<dependency>
28-
<groupId>org.eclipse.jetty</groupId>
29-
<artifactId>jetty-server</artifactId>
30-
</dependency>
3127
<dependency>
3228
<groupId>org.igniterealtime.smack</groupId>
3329
<artifactId>smack-tcp</artifactId>
@@ -75,22 +71,6 @@
7571
<groupId>org.slf4j</groupId>
7672
<artifactId>slf4j-api</artifactId>
7773
</dependency>
78-
<dependency>
79-
<groupId>org.glassfish.jersey.containers</groupId>
80-
<artifactId>jersey-container-jetty-http</artifactId>
81-
</dependency>
82-
<dependency>
83-
<groupId>org.glassfish.jersey.containers</groupId>
84-
<artifactId>jersey-container-servlet</artifactId>
85-
</dependency>
86-
<dependency>
87-
<groupId>org.glassfish.jersey.inject</groupId>
88-
<artifactId>jersey-hk2</artifactId>
89-
</dependency>
90-
<dependency>
91-
<groupId>org.glassfish.jersey.media</groupId>
92-
<artifactId>jersey-media-json-jackson</artifactId>
93-
</dependency>
9474
<dependency>
9575
<groupId>com.fasterxml.jackson.module</groupId>
9676
<artifactId>jackson-module-kotlin</artifactId>
@@ -123,39 +103,6 @@
123103
<artifactId>mockito-core</artifactId>
124104
<scope>test</scope>
125105
</dependency>
126-
<dependency>
127-
<groupId>org.glassfish.jersey.test-framework</groupId>
128-
<artifactId>jersey-test-framework-core</artifactId>
129-
<scope>test</scope>
130-
<exclusions>
131-
<exclusion>
132-
<groupId>junit</groupId>
133-
<artifactId>junit</artifactId>
134-
</exclusion>
135-
</exclusions>
136-
</dependency>
137-
<dependency>
138-
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
139-
<artifactId>jersey-test-framework-provider-jetty</artifactId>
140-
<scope>test</scope>
141-
<exclusions>
142-
<exclusion>
143-
<groupId>junit</groupId>
144-
<artifactId>junit</artifactId>
145-
</exclusion>
146-
</exclusions>
147-
</dependency>
148-
<dependency>
149-
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
150-
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
151-
<scope>test</scope>
152-
<exclusions>
153-
<exclusion>
154-
<groupId>junit</groupId>
155-
<artifactId>junit</artifactId>
156-
</exclusion>
157-
</exclusions>
158-
</dependency>
159106
<dependency>
160107
<groupId>io.kotest</groupId>
161108
<artifactId>kotest-runner-junit5-jvm</artifactId>

jicofo-selector/pom.xml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
</exclusion>
3030
</exclusions>
3131
</dependency>
32-
<dependency>
33-
<groupId>org.eclipse.jetty</groupId>
34-
<artifactId>jetty-server</artifactId>
35-
</dependency>
3632
<dependency>
3733
<groupId>org.igniterealtime.smack</groupId>
3834
<artifactId>smack-tcp</artifactId>
@@ -80,22 +76,6 @@
8076
<groupId>org.slf4j</groupId>
8177
<artifactId>slf4j-api</artifactId>
8278
</dependency>
83-
<dependency>
84-
<groupId>org.glassfish.jersey.containers</groupId>
85-
<artifactId>jersey-container-jetty-http</artifactId>
86-
</dependency>
87-
<dependency>
88-
<groupId>org.glassfish.jersey.containers</groupId>
89-
<artifactId>jersey-container-servlet</artifactId>
90-
</dependency>
91-
<dependency>
92-
<groupId>org.glassfish.jersey.inject</groupId>
93-
<artifactId>jersey-hk2</artifactId>
94-
</dependency>
95-
<dependency>
96-
<groupId>org.glassfish.jersey.media</groupId>
97-
<artifactId>jersey-media-json-jackson</artifactId>
98-
</dependency>
9979
<!-- https://mvnrepository.com/artifact/com.github.spotbugs/spotbugs-annotations -->
10080
<dependency>
10181
<groupId>com.github.spotbugs</groupId>
@@ -123,39 +103,6 @@
123103
<artifactId>mockito-core</artifactId>
124104
<scope>test</scope>
125105
</dependency>
126-
<dependency>
127-
<groupId>org.glassfish.jersey.test-framework</groupId>
128-
<artifactId>jersey-test-framework-core</artifactId>
129-
<scope>test</scope>
130-
<exclusions>
131-
<exclusion>
132-
<groupId>junit</groupId>
133-
<artifactId>junit</artifactId>
134-
</exclusion>
135-
</exclusions>
136-
</dependency>
137-
<dependency>
138-
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
139-
<artifactId>jersey-test-framework-provider-jetty</artifactId>
140-
<scope>test</scope>
141-
<exclusions>
142-
<exclusion>
143-
<groupId>junit</groupId>
144-
<artifactId>junit</artifactId>
145-
</exclusion>
146-
</exclusions>
147-
</dependency>
148-
<dependency>
149-
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
150-
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
151-
<scope>test</scope>
152-
<exclusions>
153-
<exclusion>
154-
<groupId>junit</groupId>
155-
<artifactId>junit</artifactId>
156-
</exclusion>
157-
</exclusions>
158-
</dependency>
159106
<dependency>
160107
<groupId>io.kotest</groupId>
161108
<artifactId>kotest-runner-junit5-jvm</artifactId>

jicofo-selector/src/main/resources/reference.conf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,9 @@ jicofo {
330330
}
331331

332332
rest {
333+
enabled = true
333334
port = 8888
334-
tls-port = 8843
335+
host = "0.0.0.0"
335336

336337
prometheus {
337338
// Enable the prometheus /metrics endpoint.
@@ -345,6 +346,12 @@ jicofo {
345346
// Enable the move-endpoint API.
346347
enabled = true
347348
}
349+
debug {
350+
enabled = true
351+
}
352+
pin {
353+
enabled = true
354+
}
348355
}
349356

350357
sctp {

jicofo/pom.xml

Lines changed: 23 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,29 @@
3939
<artifactId>commons-lang3</artifactId>
4040
</dependency>
4141
<dependency>
42-
<groupId>org.eclipse.jetty</groupId>
43-
<artifactId>jetty-server</artifactId>
42+
<groupId>io.ktor</groupId>
43+
<artifactId>ktor-server-core-jvm</artifactId>
44+
<version>${ktor.version}</version>
45+
</dependency>
46+
<dependency>
47+
<groupId>io.ktor</groupId>
48+
<artifactId>ktor-server-netty-jvm</artifactId>
49+
<version>${ktor.version}</version>
50+
</dependency>
51+
<dependency>
52+
<groupId>io.ktor</groupId>
53+
<artifactId>ktor-server-content-negotiation-jvm</artifactId>
54+
<version>${ktor.version}</version>
55+
</dependency>
56+
<dependency>
57+
<groupId>io.ktor</groupId>
58+
<artifactId>ktor-serialization-jackson-jvm</artifactId>
59+
<version>${ktor.version}</version>
60+
</dependency>
61+
<dependency>
62+
<groupId>io.ktor</groupId>
63+
<artifactId>ktor-server-status-pages-jvm</artifactId>
64+
<version>${ktor.version}</version>
4465
</dependency>
4566
<dependency>
4667
<groupId>org.igniterealtime.smack</groupId>
@@ -93,22 +114,6 @@
93114
<groupId>org.slf4j</groupId>
94115
<artifactId>slf4j-api</artifactId>
95116
</dependency>
96-
<dependency>
97-
<groupId>org.glassfish.jersey.containers</groupId>
98-
<artifactId>jersey-container-jetty-http</artifactId>
99-
</dependency>
100-
<dependency>
101-
<groupId>org.glassfish.jersey.containers</groupId>
102-
<artifactId>jersey-container-servlet</artifactId>
103-
</dependency>
104-
<dependency>
105-
<groupId>org.glassfish.jersey.inject</groupId>
106-
<artifactId>jersey-hk2</artifactId>
107-
</dependency>
108-
<dependency>
109-
<groupId>org.glassfish.jersey.media</groupId>
110-
<artifactId>jersey-media-json-jackson</artifactId>
111-
</dependency>
112117
<dependency>
113118
<groupId>com.fasterxml.jackson.module</groupId>
114119
<artifactId>jackson-module-kotlin</artifactId>
@@ -146,39 +151,6 @@
146151
<artifactId>mockk-jvm</artifactId>
147152
<scope>test</scope>
148153
</dependency>
149-
<dependency>
150-
<groupId>org.glassfish.jersey.test-framework</groupId>
151-
<artifactId>jersey-test-framework-core</artifactId>
152-
<scope>test</scope>
153-
<exclusions>
154-
<exclusion>
155-
<groupId>junit</groupId>
156-
<artifactId>junit</artifactId>
157-
</exclusion>
158-
</exclusions>
159-
</dependency>
160-
<dependency>
161-
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
162-
<artifactId>jersey-test-framework-provider-jetty</artifactId>
163-
<scope>test</scope>
164-
<exclusions>
165-
<exclusion>
166-
<groupId>junit</groupId>
167-
<artifactId>junit</artifactId>
168-
</exclusion>
169-
</exclusions>
170-
</dependency>
171-
<dependency>
172-
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
173-
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
174-
<scope>test</scope>
175-
<exclusions>
176-
<exclusion>
177-
<groupId>junit</groupId>
178-
<artifactId>junit</artifactId>
179-
</exclusion>
180-
</exclusions>
181-
</dependency>
182154
<dependency>
183155
<groupId>io.kotest</groupId>
184156
<artifactId>kotest-runner-junit5-jvm</artifactId>

jicofo/src/main/java/org/jitsi/jicofo/rest/Application.java

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)