Create dedicated SessionWriter and SessionReader runnables for Session #9

Closed
opened 2026-03-19 16:58:57 +01:00 by lars.winzer · 15 comments
lars.winzer commented 2026-03-19 16:58:57 +01:00 (Migrated from git.scicore.unibas.ch)

Task

Summary

Threads for reading from and writing to socket buffers.

Context

Session and Transport

Affected Components

Session

Definition of Done

  • Create SessionWriter and SessionReader
  • Make Session use new abstraction.

Notes

Checklist

  • Linked to other issues or branches that must be completed first?
## Task ### Summary Threads for reading from and writing to socket buffers. ### Context Session and Transport ### Affected Components Session ### Definition of Done - [x] Create `SessionWriter` and `SessionReader` - [x] Make Session use new abstraction. ### Notes <!--Optional: implementation hints, links to prior design discussions, etc.--> ### Checklist - [x] Linked to other issues or branches that must be completed first?
lars.winzer commented 2026-03-19 16:59:08 +01:00 (Migrated from git.scicore.unibas.ch)

marked this task as related to #8

marked this task as related to #8
lars.winzer commented 2026-03-19 16:59:14 +01:00 (Migrated from git.scicore.unibas.ch)

removed the relation with #8

removed the relation with #8
lars.winzer commented 2026-03-19 16:59:25 +01:00 (Migrated from git.scicore.unibas.ch)

marked this task as related to #8

marked this task as related to #8
lars.winzer commented 2026-03-19 17:02:16 +01:00 (Migrated from git.scicore.unibas.ch)

created branch feat/session-reader-and-writer-thread to address this issue

created branch [`feat/session-reader-and-writer-thread`](/cs108-fs26/Gruppe-13/-/compare/main...feat%2Fsession-reader-and-writer-thread) to address this issue
lars.winzer commented 2026-03-19 17:02:32 +01:00 (Migrated from git.scicore.unibas.ch)

changed title from Create SessionWriter and SessionReader for Session to Create dedicated SessionWriter and SessionReader runnables for Session

<p>changed title from <code class="idiff">Create SessionWriter and SessionReader for Session</code> to <code class="idiff">Create <span class="idiff left addition">dedicated </span>SessionWriter and SessionReader <span class="idiff right addition">runnables </span>for Session</code></p>
lars.winzer commented 2026-03-19 17:04:11 +01:00 (Migrated from git.scicore.unibas.ch)

assigned to @lars.winzer

assigned to @lars.winzer
lars.winzer commented 2026-03-19 17:14:30 +01:00 (Migrated from git.scicore.unibas.ch)

Both the SessionReader and SessionWriter are going to be managed by the SessionManager .

Currently the NetworkManager creates the Session object and starts its.

Session session = new Session(new TcpTransport(clientSocket), eventBus);
sessionManager.addSession(session);
session.start();

Even though the NetworkManager already has a relation to the SessionManager.


After this modification, the SessionManager will create the Session and the worker threads and manage thier lifecycle.

Both the `SessionReader` and `SessionWriter` are going to be managed by the `SessionManager` . Currently the NetworkManager creates the Session object and starts its. ```java Session session = new Session(new TcpTransport(clientSocket), eventBus); sessionManager.addSession(session); session.start(); ``` Even though the `NetworkManager` already has a relation to the `SessionManager`. --- After this modification, the SessionManager will create the Session and the worker threads and manage thier lifecycle.
lars.winzer commented 2026-03-19 19:11:22 +01:00 (Migrated from git.scicore.unibas.ch)

added 2h 5m of time spent at 2026-03-19 12:00:00 +0100

added 2h 5m of time spent at 2026-03-19 12:00:00 +0100
lars.winzer commented 2026-03-19 21:00:37 +01:00 (Migrated from git.scicore.unibas.ch)

marked the checklist item Make Session use new abstraction. as completed

marked the checklist item **Make Session use new abstraction\.** as completed
lars.winzer commented 2026-03-19 21:00:38 +01:00 (Migrated from git.scicore.unibas.ch)

marked the checklist item Create SessionWriter and SessionReader as completed

marked the checklist item **Create SessionWriter and SessionReader** as completed
lars.winzer commented 2026-03-19 21:05:35 +01:00 (Migrated from git.scicore.unibas.ch)

New implementation has been testet (at 19:11 already) via the debugger to confirm that the threads for the SessionReader and SessionWriter are correctly interrupted if the client disconnects.

New implementation has been testet (at 19:11 already) via the debugger to confirm that the threads for the `SessionReader` and `SessionWriter` are correctly interrupted if the client disconnects.
lars.winzer commented 2026-03-20 17:38:30 +01:00 (Migrated from git.scicore.unibas.ch)

mentioned in merge request !42

mentioned in merge request !42
lars.winzer commented 2026-03-20 17:39:33 +01:00 (Migrated from git.scicore.unibas.ch)

added 1h 10m of time spent at 2026-03-20 12:00:00 +0100

added 1h 10m of time spent at 2026-03-20 12:00:00 +0100
lars.winzer commented 2026-03-20 17:39:45 +01:00 (Migrated from git.scicore.unibas.ch)

mentioned in commit 8d72a67b5e

mentioned in commit 8d72a67b5e674301642ea4137c76c57d44cc151f
lars.winzer (Migrated from git.scicore.unibas.ch) closed this issue 2026-03-20 17:39:45 +01:00
lars.winzer commented 2026-03-23 10:18:06 +01:00 (Migrated from git.scicore.unibas.ch)

mentioned in issue #11

mentioned in issue #11
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: University-of-Basel-Studentprojects/Programmierprojekt#9