forked from lavina/lavina
1
0
Fork 0
Commit Graph

141 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 c69513f38b xmpp: use mutable namespace and event in parser coroutines 2024-04-28 17:19:31 +02:00
Nikita Vilunov 72f5010988 clean up http.rs a little 2024-04-26 12:28:13 +02:00
Nikita Vilunov 4ff09ea05f tracing otlp exporter and instrumentation annotations (#57)
Resolves #56

Reviewed-on: lavina/lavina#57
2024-04-26 10:16:23 +00: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 0105a5b710 persistent memberships (#49)
Reviewed-on: lavina/lavina#49
2024-04-15 09:06:10 +00:00
Nikita Vilunov 878ec33cbb apply uniform formatting 2024-03-20 19:59:15 +01:00
Nikita Vilunov 77d175ccd9 update hyper to 1.0 and other libs 2023-12-10 22:22:26 +01:00
JustTestingV 9582160d2c xmpp: logopass auth (#19)
Reviewed-on: lavina/lavina#19
Co-authored-by: JustTestingV <JustTestingV@gmail.com>
Co-committed-by: JustTestingV <JustTestingV@gmail.com>
2023-10-08 13:53:39 +00:00
Nikita Vilunov 2f034284cf rename telemetry mod to http 2023-10-01 01:50:04 +02:00
Nikita Vilunov dc0a101fe6 split xmpp projection into a separate crate 2023-10-01 01:47:18 +02:00
Nikita Vilunov 854a244dbc split irc proejction into a separate crate (#18) 2023-09-30 23:34:35 +00:00
Nikita Vilunov a1db17c779 split core into a separate crate (#17) 2023-09-30 23:12:11 +00:00
Nikita Vilunov 444b608e96 split proto xmpp defs into its own crate (#14)
Reviewed-on: lavina/lavina#14
2023-09-30 15:43:46 +00:00
Nikita Vilunov 58f6a5d90a add management API endpoints 2023-09-24 22:59:34 +02:00
Nikita Vilunov df6cdd4861 add a bit more logging 2023-09-23 01:12:03 +02:00
Nikita Vilunov 3d59f6aae5 read config path from cli args 2023-09-22 17:24:36 +02:00
Nikita Vilunov ad49703714 split proto irc defs into its own crate (#13)
Reviewed-on: lavina/lavina#13
2023-09-22 13:20:47 +00:00
JustTestingV 87d73af811 [irc] used nonempty prefixed nicks in 353 reply (#9)
Reviewed-on: lavina/lavina#9
Co-authored-by: JustTestingV <JustTestingV@gmail.com>
Co-committed-by: JustTestingV <JustTestingV@gmail.com>
2023-09-15 16:33:25 +00:00
Nikita Vilunov 3de7a131f0 add dockerfile 2023-09-15 17:11:29 +02:00
JustTestingV 53f218c58f [irc] send 502 if not sender tries to change mode for other users (#4)
Reviewed-on: lavina/lavina#4
Co-authored-by: JustTestingV <JustTestingV@gmail.com>
Co-committed-by: JustTestingV <JustTestingV@gmail.com>
2023-09-06 18:43:07 +00:00
Nikita Vilunov 377d9c32d2 fix message sending 2023-09-06 16:34:20 +02:00
JustTestingV e9fc74b46b used regex_static in Jid (#1)
Reviewed-on: lavina/lavina#1
Co-authored-by: JustTestingV <JustTestingV@gmail.com>
Co-committed-by: JustTestingV <JustTestingV@gmail.com>
2023-08-26 15:50:05 +00:00
Nikita Vilunov b9724cd995 stop player fibers on shutdown 2023-08-24 14:10:31 +02:00
Nikita Vilunov 5c07c8368d persistence of chat messages 2023-08-18 16:45:48 +02:00
Nikita Vilunov f401aa786e Fix Storage closing during app shutdown.
Storage was still co-owned by the RoomRegistry, which did not allow us to shut it down gracefully. Dropping RoomRegistry explicitly helps.
2023-08-17 18:35:50 +02:00
Nikita Vilunov 1b5ac1491a persistence for rooms 2023-08-17 15:41:28 +02:00
Nikita Vilunov f8151699db implement irc auth via PASS 2023-08-16 16:30:02 +02:00
Nikita Vilunov c39928799d fix tls key parsing usage 2023-08-05 00:38:56 +02:00
Nikita Vilunov 9f0bcb9279 storage module init 2023-08-05 00:06:48 +02:00
Nikita Vilunov 4b04696a4f fix for windows 2023-07-30 18:59:33 +02:00
Nikita Vilunov c1a461a09e fix irc tests 2023-07-23 15:21:26 +02:00
Nikita Vilunov 50915afcf6 end server msgs in \r\n 2023-07-22 21:11:01 +02:00
Nikita Vilunov 51d7278617 add sender to ping response 2023-07-22 16:22:49 +02:00
Nikita Vilunov 8efbacc4d0 fix irc parsing
it's not required to start trailing arg with : if it doesn't contain spaces
2023-07-03 22:26:37 +02:00
Nikita Vilunov daf05869a3 tune irc logging 2023-07-03 22:25:57 +02:00
Nikita Vilunov f2ab963f7b add a new nightly flag 2023-05-02 15:41:18 +02:00
Nikita Vilunov 4057b4a910 clean up ByteVec type aliases 2023-04-14 00:38:26 +02:00
Nikita Vilunov 55b69f4c8a rewrite irc projection to use str 2023-04-13 21:15:48 +02:00
Nikita Vilunov d0c579863e feat(xmpp): list muc rooms in disco 2023-04-11 18:28:03 +02:00
Nikita Vilunov c44101d5d0 feat(xmpp): send muc messages to clients 2023-04-11 16:42:09 +02:00
Nikita Vilunov 58582f4e51 feat(xmpp): handle sending messages to muc 2023-04-09 23:31:43 +02:00