Files
rbcs/rbcs-servlet
OpenCode ee7bc7e850 Add optional OpenTelemetry Netty server instrumentation
- Update lys.version to 2026.04.14

- Add optional compileOnly dependency on opentelemetry-netty-4.1 in rbcs-server

- Add runtime guard to only activate instrumentation when OTel classes are on classpath

- Insert OTel combined handler after HttpServerCodec in the Netty pipeline

- Add requires-static JPMS directives for optional module support

- Add enableTelemetry config attribute to rbcs:server with default false

- Update Configuration DTO, XSD schema, Parser, Serializer, and all tests
2026-04-28 14:59:08 +00:00
..
2025-05-01 03:42:37 +08:00
2025-06-13 14:08:46 +08:00
2025-02-26 15:26:18 +08:00

RBCS servlet

This is a minimal implementation of RBCs using Jakarta servlet API, it relies on the servlet container (Tomcat in this example) for authentication, authorization, throttling, encryption and compression. It only supports in-memory caching. The main purpose is to provide a performance comparison for RBCS Netty implementation.

How to run

gradlew dockerBuildImage

then in this directory run

docker run --rm -p 127.0.0.1:8080:8080 -m 1G --name tomcat -v $(pwd)/conf/server.xml:/usr/local/tomcat/conf/server.xml gitea.woggioni.net/woggioni/rbcs/servlet:latest

you can call the servlet cache with this RBCS client profile

    <profile name="servlet" base-url="http://127.0.0.1:8080/rbcs-servlet/cache/" max-connections="100" enable-compression="false">
    	<no-auth/>
    	<connection
	        idle-timeout="PT5S"
	        read-idle-timeout="PT10S"
	        write-idle-timeout="PT10S"
	        read-timeout="PT5S"
	        write-timeout="PT5S"/>
        <retry-policy max-attempts="10" initial-delay="PT1S" exp="1.2"/>
    </profile>

Notes

The servlet implementation has an in memory cache whose maximum size is hardcoded to 0x8000000 bytes (around 134 MB)