Commit Graph

22 Commits

Author SHA1 Message Date
Mikhail 381b5650bc xmpp, core: Send message history on MUC join (#68)
Re-send the entire message history on MUC join. Contributes to #5.

Reviewed-on: lavina/lavina#68
Co-authored-by: Mikhail <mikhail@liamets.dev>
Co-committed-by: Mikhail <mikhail@liamets.dev>
2024-05-26 11:20:26 +00:00
Nikita Vilunov 26720a2a08 core: separate the model from the logic implementation (#66)
This separates the core in two layers – the model objects and the `LavinaCore` service. Service is responsible for implementing the application logic and exposing it as core's public API to projections, while the model objects will be independent of each other and responsible only for managing and owning in-memory data.

The model objects include:
1. `Storage` – the open connection to the SQLite DB.
2. `PlayerRegistry` – creates, stores refs to, and stops player actors.
3. `RoomRegistry` – manages active rooms.
4. `DialogRegistry` – manages active dialogs.
5. `Broadcasting` – manages subscriptions of players to rooms on remote cluster nodes.
6. `LavinaClient` – manages HTTP connections to remote cluster nodes.
7. `ClusterMetadata` – read-only configuration of the cluster metadata, i.e. allocation of entities to nodes.

As a result:
1. Model objects will be fully independent of each other, e.g. it's no longer necessary to provide a `Storage` to all registries, or to provide `PlayerRegistry` and `DialogRegistry` to each other.
2. Model objects will no longer be `Arc`-wrapped; instead the whole `Services` object will be `Arc`ed and provided to projections.
3. The public API of `lavina-core` will be properly delimited by the APIs of `LavinaCore`, `PlayerConnection` and so on.
4. `LavinaCore` and `PlayerConnection` will also contain APIs of all features, unlike it was previously with `RoomRegistry` and `DialogRegistry`. This is unfortunate, but it could be improved in future.

Reviewed-on: lavina/lavina#66
2024-05-13 14:32:45 +00:00
Nikita Vilunov 6749103726 scalability: initial support for remote rooms (#61)
Reviewed-on: lavina/lavina#61
2024-05-10 20:44:24 +00:00
Nikita Vilunov 7f2c6a1013 continue propagated traces in http request handlers 2024-05-05 19:24:58 +02:00
Nikita Vilunov bb0fe3bf0b use borrows in http endpoint handlers 2024-05-05 19:24:42 +02:00
Nikita Vilunov 8ac64ba8f5 get rid of storage usages in projections 2024-05-05 19:24:23 +02:00
Nikita Vilunov 9a09ff717e management api endpoints for rooms 2024-05-01 17:30:31 +02:00
Nikita Vilunov 25605322a0 player shutdown API (#58)
Reviewed-on: lavina/lavina#58
2024-04-29 17:24:43 +00:00
Nikita Vilunov 72f5010988 clean up http.rs a little 2024-04-26 12:28:13 +02:00
Nikita Vilunov d805061d5b refactor auth logic into a common module (#54)
Reviewed-on: lavina/lavina#54
2024-04-23 10:10:10 +00:00
Nikita Vilunov ddb348bee9 refactor lavina core by grouping public services into a new LavinaCore struct.
this will be useful in future when additional services will be introduced and passed as dependencies
2024-04-21 19:45:50 +02:00
Nikita Vilunov 77d175ccd9 update hyper to 1.0 and other libs 2023-12-10 22:22:26 +01:00
Nikita Vilunov 2f034284cf rename telemetry mod to http 2023-10-01 01:50:04 +02:00
Nikita Vilunov 08fe958d60 clean stuff, move metrics endpoint onto a separate port 2023-02-09 19:19:03 +01:00
Nikita Vilunov f9a6d8bdfc reorder modules a bit 2023-02-04 02:01:49 +01:00
Nikita Vilunov b7995584f0 implement multiple rooms 2023-02-03 23:43:59 +01:00
Nikita Vilunov dd8cf0fbf0 add integration tests for ws, rewrite ws handling 2023-01-31 18:32:35 +01:00
Nikita Vilunov f4dda9fb4b simple broadcast of messages 2023-01-31 13:55:47 +01:00
Nikita Vilunov d6b2289221 prometheus example usage 2023-01-28 00:43:20 +04:00
Nikita Vilunov 0b0c432bb8 add a simple router 2023-01-27 01:11:28 +04:00
Nikita Vilunov 31ffe41929 websocket basic implementation 2023-01-25 16:50:14 +04:00
Nikita Vilunov 734ca6c423 http server 2023-01-19 18:18:41 +01:00