Vishal Reddy
04/07/2025, 12:56 PMwakingrufus
04/09/2025, 1:15 PMShadman
04/27/2025, 5:41 PMGradle Flavors
instead of feature based modules for a ktor
backend and I still have the advantages of a real microservice
structure (For example independent deploy)?
I don't think so right?🤔
Can't we somehow trick it? Like giving different port for each flavor
, for both server port and database port?배규민
05/06/2025, 7:45 AMMohammad Zaki
05/11/2025, 9:46 AMOlufemi Adeojo
05/13/2025, 10:00 PMOlufemi Adeojo
05/13/2025, 10:01 PMOlufemi Adeojo
05/13/2025, 10:02 PMsdeleuze
05/26/2025, 6:20 AMAnonymike
05/26/2025, 11:19 PMUnable to find method ''org.gradle.internal.buildoption.BuildOption$Value org.gradle.api.internal.StartParameterInternal.getIsolatedProjects()''
Small addition: This occurs in all of my projects...server, simple cli utilities, libraries, etc. Anywhere I use 2.1.21
I get the same error.
Thanks for any help in advance.nadi
05/27/2025, 6:33 AMMark lindsay
05/27/2025, 4:42 PMlouiscad
05/28/2025, 9:04 AMEdgar Avuzi
05/30/2025, 8:16 AMBernhard
06/02/2025, 6:56 AMMane De Mel
06/03/2025, 1:00 PMSatyam Gondhale
06/04/2025, 2:33 PMMikhail Nikitin
06/09/2025, 9:59 AMMohammad Zaki
06/13/2025, 1:09 PMsuspend inline fun <reified T : Any> PipelineContext<*, ApplicationCall>.getBodyContent(): T {
return call.receive()
}
i cant access it inside post block.
Can anyone helpMohammad Zaki
06/13/2025, 1:32 PMYorgos S.
06/16/2025, 8:46 AMactor4k
.
actor4k
is a small actor system written in kotlin using Coroutines.
The actor model is a design paradigm for building concurrent systems where the basic unit of computation, known as an actor, encapsulates its own state and behavior and interacts with others solely through asynchronous message passing. Each actor processes messages sequentially, which simplifies managing state changes and avoids common pitfalls like race conditions and deadlocks that arise with traditional multithreading approaches.
This model is particularly useful for highly concurrent, distributed, and fault-tolerant systems. Its scalability and resilience come from the ability to isolate errors within individual actors through supervision strategies, making it a fitting choice for applications such as real-time data processing, microservices architectures, and any system that requires robust fault isolation and maintainability.
Check it out here:
https://github.com/smyrgeorge/actor4kKanon
06/17/2025, 10:21 PMNicolas
06/18/2025, 12:16 PMfun Application.configureWebSocket(){
install(WebSockets) {
pingPeriod = 15.seconds
timeout = 15.seconds
maxFrameSize = kotlin.Long.MAX_VALUE
masking = false
}
}
routing {
webSocket("ws") {
val token = call.request.queryParameters["token"]
if (token == null) {
close(CloseReason(CloseReason.Codes.VIOLATED_POLICY, "No Token"))
return@webSocket
}
val decodedJWT = try { JwtFactory.buildverifier().verify(token) }
catch (e: Exception) {
close(CloseReason(CloseReason.Codes.VIOLATED_POLICY, "Invalid Token: ${e.message}"))
return@webSocket
}
val userId: UUID = try { UUID.fromString(decodedJWT.getClaim(JwtClaimConstant.claimUserId).asString()) }
catch (e: Exception) {
close(CloseReason(CloseReason.Codes.VIOLATED_POLICY, "Invalid Token: ${e.message}"))
return@webSocket
}
val sessionId = decodedJWT.id?.let {
runCatching { UUID.fromString(it) }.getOrNull()
} ?: run {
close(CloseReason(CloseReason.Codes.VIOLATED_POLICY, "Invalid or missing sessionId (jti)"))
return@webSocket
}
<http://logger.info|logger.info>("$userId is connected")
try {
println("$userId start")
incoming.consumeEach {
when (it) {
is Frame.Text -> {
val text = it.readText()
println("tototot $userId Received: $text")
}
is Frame.Close -> {
println("tototot $userId WebSocket closed by server with reason: ${it.readReason()}")
}
is Frame.Ping -> {
println("tototot $userId ping: $it")
}
is Frame.Pong -> {
println("tototot $userId pong: $it")
} else -> {
println("tototot $userId else: $it")
}
}
}
} catch (e: Exception) {
println("$userId error $e")
} finally {
println("$userId finally remove")
}
println("$userId end")
}
}
and I found something weird If I open a websocket on my iOS phone, turnoff the internet (and close my phone) I keep logging this on KTOR:
io.ktor.websocket.WebSocket - WebSocket Pinger: received valid pong frame Frame PONG
For me if I close my phone the webscket should try a ping and should not receive a pong and close, For me the goal of ping pong is to avoid all this. I am not sure if I have doing everything good 🙂
I am hosting my server on Render
Thank you in advance for your timedave
06/18/2025, 12:27 PMNicolas
06/23/2025, 9:27 AMAsadullah Nadeem
06/24/2025, 8:43 AMBharat Kumar
06/26/2025, 10:26 AMAlina Dolgikh [JB]
bk9735732777
07/03/2025, 6:36 AM# Stage 1: Cache Gradle dependencies
FROM gradle:latest AS cache
RUN mkdir -p /home/gradle/cache_home
ENV GRADLE_USER_HOME=/home/gradle/cache_home
COPY build.gradle.* gradle.properties /home/gradle/app/
COPY gradle /home/gradle/app/gradle
WORKDIR /home/gradle/app
RUN gradle clean build -i --stacktrace
# Stage 2: Build Application
FROM gradle:latest AS build
COPY --from=cache /home/gradle/cache_home /home/gradle/.gradle
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
# Build the fat JAR, Gradle also supports shadow
# and boot JAR by default.
RUN gradle buildFatJar --no-daemon
# Stage 3: Create the Runtime Image
FROM amazoncorretto:22 AS runtime
EXPOSE 8080
RUN mkdir /app
COPY --from=build /home/gradle/src/build/libs/*.jar /app/ktor-docker-sample.jar
ENTRYPOINT ["java","-jar","/app/ktor-docker-sample.jar"]
This is my docker file
Thread in Slack ConversationOhiorenua Aigboje
07/08/2025, 12:47 PM