demos/kafka/chat
22 months agorefactore: Renamed `ChatroomTo` to `ChatRoomTo` -- Rename
Kai Moritz [Sun, 8 Jan 2023 09:20:56 +0000 (10:20 +0100)]
refactore: Renamed `ChatroomTo` to `ChatRoomTo` -- Rename

22 months agorefactore: Renamed `Chatroom` to `ChatRoom` -- Rename
Kai Moritz [Sun, 8 Jan 2023 09:19:47 +0000 (10:19 +0100)]
refactore: Renamed `Chatroom` to `ChatRoom` -- Rename

22 months agorefactore: Renamed `ChatroomFactory` to `ChatHomeService` -- Rename
Kai Moritz [Sun, 8 Jan 2023 09:17:49 +0000 (10:17 +0100)]
refactore: Renamed `ChatroomFactory` to `ChatHomeService` -- Rename

22 months agorefactore: Renamed `ChatroomFactory` to `ChatHomeService` -- Move
Kai Moritz [Sun, 8 Jan 2023 09:17:34 +0000 (10:17 +0100)]
refactore: Renamed `ChatroomFactory` to `ChatHomeService` -- Move

22 months agorefactore: Renamed `PersistenceStrategy` to `ChatroomService` -- Rename
Kai Moritz [Sun, 8 Jan 2023 09:10:46 +0000 (10:10 +0100)]
refactore: Renamed `PersistenceStrategy` to `ChatroomService` -- Rename

22 months agorefactore: Renamed `PersistenceStrategy` to `ChatroomService` -- Move
Kai Moritz [Sun, 8 Jan 2023 09:10:34 +0000 (10:10 +0100)]
refactore: Renamed `PersistenceStrategy` to `ChatroomService` -- Move

22 months agorefactor: Only `LocalJsonFileStorageStrategy` restores `Chatroom`s
Kai Moritz [Sun, 8 Jan 2023 08:53:03 +0000 (09:53 +0100)]
refactor: Only `LocalJsonFileStorageStrategy` restores `Chatroom`s

22 months agofeat: Added an endpoint that list all messages of a chatroom
Kai Moritz [Sat, 7 Jan 2023 23:47:22 +0000 (00:47 +0100)]
feat: Added an endpoint that list all messages of a chatroom

22 months agorefactor: `LocalJsonFilesStorageStrategy` is now realy reactive
Kai Moritz [Sat, 7 Jan 2023 20:58:27 +0000 (21:58 +0100)]
refactor: `LocalJsonFilesStorageStrategy` is now realy reactive

22 months agofix: The sink is recreated, if it gets canceled
Kai Moritz [Sat, 7 Jan 2023 01:16:57 +0000 (02:16 +0100)]
fix: The sink is recreated, if it gets canceled

- The sink is automatically cancelled, if the last consumer leaves.
- Turning auto-cancel of, is not an option, because this buffers new
  messages, until the buffer overflows, after which new messages are
  droped. Hence, if a new subscriber arrives, it would see some old
  messages and then, after a gap, current messages.
- Because of that, the sink is now automatically recreated, if the
  last subscriber leaves and triggers the automatically cancelation
  of the sink.
- The sink can be recreated without conflicts, because all methods,
  that may access the sink are synchronized.

22 months agofeat: Server sends real Server-Sent-Events
Kai Moritz [Sat, 7 Jan 2023 00:41:34 +0000 (01:41 +0100)]
feat: Server sends real Server-Sent-Events

22 months agofeat: The size buffer for listeners to a chatroom is configurable
Kai Moritz [Sat, 7 Jan 2023 20:05:30 +0000 (21:05 +0100)]
feat: The size buffer for listeners to a chatroom is configurable

22 months agofeat: Allowed the frontend as origin for CORS
Kai Moritz [Fri, 6 Jan 2023 00:45:58 +0000 (01:45 +0100)]
feat: Allowed the frontend as origin for CORS

22 months agofeat: Added a POST-mapping to force the storing of the data
Kai Moritz [Fri, 6 Jan 2023 00:33:51 +0000 (01:33 +0100)]
feat: Added a POST-mapping to force the storing of the data

22 months agorefactor: Fixed return-types of the controller
Kai Moritz [Thu, 5 Jan 2023 23:44:44 +0000 (00:44 +0100)]
refactor: Fixed return-types of the controller

- Renamed and moved `ChatroomInfo` to `ChatroomTo`
- Switched return-types from `Chatroom` to `ChatroomTo`

22 months agofix: `Chatroom`s must not share an instance of `PersistanceStrategy`
Kai Moritz [Sat, 7 Jan 2023 20:00:50 +0000 (21:00 +0100)]
fix: `Chatroom`s must not share an instance of `PersistanceStrategy`

22 months agofeat: The chats are stored as local json-files
Kai Moritz [Thu, 5 Jan 2023 15:09:04 +0000 (16:09 +0100)]
feat: The chats are stored as local json-files

22 months agofeat: `ChatHome` returns an `Optional` for `getChatroom(UUID)`
Kai Moritz [Sat, 7 Jan 2023 19:29:32 +0000 (20:29 +0100)]
feat: `ChatHome` returns an `Optional` for `getChatroom(UUID)`

22 months agofeat: Introduced `ChatHome` that gives multiple `Chatroom`s a home
Kai Moritz [Thu, 5 Jan 2023 18:18:50 +0000 (19:18 +0100)]
feat: Introduced `ChatHome` that gives multiple `Chatroom`s a home

22 months agorefactor: Moved configuration in a separate class and made it more explicit
Kai Moritz [Wed, 28 Dec 2022 18:20:51 +0000 (19:20 +0100)]
refactor: Moved configuration in a separate class and made it more explicit

22 months agorefactor: Introduced `ChatroomFactory`
Kai Moritz [Wed, 28 Dec 2022 17:09:06 +0000 (18:09 +0100)]
refactor: Introduced `ChatroomFactory`

- `ChatBackendController` only has to know of the `ChatroomFactory`.
- `ChatBackendController` does not have to know the `PersistenceStrategy`.

22 months agorefactor: Moved persistence-logic into a pluggable strategy
Kai Moritz [Wed, 28 Dec 2022 16:53:46 +0000 (17:53 +0100)]
refactor: Moved persistence-logic into a pluggable strategy

22 months agorefactor: A `Message` now explicitly has a `MessageKey`
Kai Moritz [Wed, 28 Dec 2022 16:48:01 +0000 (17:48 +0100)]
refactor: A `Message` now explicitly has a `MessageKey`

22 months agorefactor: Streamlined API of `Chatroom` - all return-types are reactive
Kai Moritz [Wed, 28 Dec 2022 16:38:00 +0000 (17:38 +0100)]
refactor: Streamlined API of `Chatroom` - all return-types are reactive

22 months agorefactor: Refined field-names of `Message` and `MessageTo`
Kai Moritz [Wed, 28 Dec 2022 16:23:30 +0000 (17:23 +0100)]
refactor: Refined field-names of `Message` and `MessageTo`

- Choosed longer and more descriptive field-names for the domain-class
  `Message`.
- Choosed short names for the TO-class `MessageTO`, which is serialized as
  JSON.

22 months agofeat: `Chatroom.getMessages()` is fully paginated (takes first and last)
Kai Moritz [Wed, 28 Dec 2022 16:20:53 +0000 (17:20 +0100)]
feat: `Chatroom.getMessages()` is fully paginated (takes first and last)

22 months agorefactor: Refined packaging (renamed packages and classes)
Kai Moritz [Wed, 28 Dec 2022 16:14:28 +0000 (17:14 +0100)]
refactor: Refined packaging (renamed packages and classes)

22 months agorefactor: Refined packaging (moved classes to new folders and files)
Kai Moritz [Wed, 28 Dec 2022 15:58:34 +0000 (16:58 +0100)]
refactor: Refined packaging (moved classes to new folders and files)

22 months agorefactor: Renamed artifact to chat-backend
Kai Moritz [Wed, 28 Dec 2022 15:55:34 +0000 (16:55 +0100)]
refactor: Renamed artifact to chat-backend

22 months agorefactor: Reworked implementation of the problem-details [RFC-7807]
Kai Moritz [Mon, 26 Dec 2022 17:07:57 +0000 (18:07 +0100)]
refactor: Reworked implementation of the problem-details [RFC-7807]

22 months agofeat: Added problem-details [RFC-7807] for a message mutation error
Kai Moritz [Mon, 26 Dec 2022 13:50:51 +0000 (14:50 +0100)]
feat: Added problem-details [RFC-7807] for a message mutation error

22 months agofeat: An `IllegalArgumentException` is thrown, if different messages are added for...
Kai Moritz [Mon, 26 Dec 2022 13:03:52 +0000 (14:03 +0100)]
feat: An `IllegalArgumentException` is thrown, if different messages are added for the same `MessageKey`

22 months agofeat: Added logging for the `listen`-endpoint
Kai Moritz [Mon, 26 Dec 2022 12:48:05 +0000 (13:48 +0100)]
feat: Added logging for the `listen`-endpoint

22 months agofix: fixed the return-type of the `listen`-endpoint
Kai Moritz [Mon, 26 Dec 2022 12:46:53 +0000 (13:46 +0100)]
fix: fixed the return-type of the `listen`-endpoint

22 months agofeat: Implemented an endpoint to get the details of a chatroom
Kai Moritz [Sun, 25 Dec 2022 22:02:47 +0000 (23:02 +0100)]
feat: Implemented an endpoint to get the details of a chatroom

22 months agofeat: implemented a listen-method for the chat-service based on a Flux
Kai Moritz [Wed, 21 Dec 2022 17:57:23 +0000 (18:57 +0100)]
feat: implemented a listen-method for the chat-service based on a Flux

- Switched the return-type of `Chatroom.addMessage()` to `Mono<Message>`.
- Added an inner method, that "persists" the message and also returns
  `Mono<Message>`.
- `addMessage()` calls `persistMessage()`, peeks into the subscription and
  emits the `Message` to an internal `Sink.multy()` of the `Chatroom`.
- `Chatroom.listen()` creates a `Flux` from the internal Sink, so that
  multiple subscribers can listen on the sink and all retrieve the current
  messages in parallel.

22 months agofeat: implemented a simplified chatroom-service
Kai Moritz [Tue, 20 Dec 2022 21:25:42 +0000 (22:25 +0100)]
feat: implemented a simplified chatroom-service

23 months agochore: Switched configuration from *.properties to YAML
Kai Moritz [Tue, 20 Dec 2022 17:27:11 +0000 (18:27 +0100)]
chore: Switched configuration from *.properties to YAML

23 months agorefactor: Simplified the name of the application-class
Kai Moritz [Tue, 20 Dec 2022 17:26:15 +0000 (18:26 +0100)]
refactor: Simplified the name of the application-class

23 months agochore: Removed the Maven-Wrapper
Kai Moritz [Tue, 20 Dec 2022 17:18:45 +0000 (18:18 +0100)]
chore: Removed the Maven-Wrapper

23 months agofeat: Generated empty Spring Boot 3.0.0 App
Kai Moritz [Tue, 20 Dec 2022 17:17:49 +0000 (18:17 +0100)]
feat: Generated empty Spring Boot 3.0.0 App