Commit Graph

68 Commits

Author SHA1 Message Date
rootdarkarchon
674387a26a updates to dependencies 2023-02-05 12:49:05 +01:00
rootdarkarchon
ca16b08a2f Server rework for API change and paradigm shift (#23)
* start with group permissions implementation

* some minor refactoring

* adjust hub for api changes

* fixes and database migration

* fixes sending online/offline message to clients stuff

* remove admin stuff from server

* fixes get server permissions

* send group pair info to client on joining a group

* send online only on sending connection dto

---------

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
2023-01-29 15:15:02 +01:00
rootdarkarchon
0c3bb89456 remove time from linq query 2023-01-27 02:53:00 +01:00
rootdarkarchon
6560b1d70d try catch on cleanup task 2023-01-27 02:46:13 +01:00
rootdarkarchon
91b98d060a do not use request semaphore for check queue requests 2023-01-22 00:11:21 +01:00
rootdarkarchon
d7e664477f Merge branch 'main' of https://github.com/Penumbra-Sync/server 2023-01-18 19:46:36 +01:00
rootdarkarchon
fe80faab6b potentially fix stuck uploads 2023-01-18 19:46:03 +01:00
rootdarkarchon
e97f4cb6d6 enqueue user if they somehow lost the queue but got no positive reply from the server 2023-01-18 11:06:30 +01:00
rootdarkarchon
9b4e298b66 refactor server auth on files server, add checking request queue 2023-01-18 10:20:24 +01:00
rootdarkarchon
20d8970a15 return in RemoveFromQueue always when not in queue 2023-01-15 18:32:48 +01:00
rootdarkarchon
4bd71a5889 Download rework (#22)
* rework server to send download ready back via signalr

* adjust queue handling for removal

* adjust api to main

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
2023-01-15 16:00:38 +01:00
rootdarkarchon
5e0e21ef68 parallel for the queue processing, up request semaphore, remove queue position (unused), bump api version 2023-01-15 01:44:10 +01:00
rootdarkarchon
e968adb7be actually start the queue processing timer 2023-01-15 01:12:46 +01:00
rootdarkarchon
60f6bb5829 ignore queue semaphore when processing queue 2023-01-15 01:10:35 +01:00
rootdarkarchon
b230f12508 decrease parallel request handling 2023-01-15 01:08:44 +01:00
rootdarkarchon
cf6ad890cd try processing queue with timer instead of task 2023-01-15 01:07:45 +01:00
rootdarkarchon
3fc6b01df9 adjust try/catch/finally for semaphore release 2023-01-15 00:52:21 +01:00
rootdarkarchon
b806ef8b7b temporary test limiting parallel requests to 500 2023-01-15 00:48:32 +01:00
rootdarkarchon
aa177583e0 sanitize queue processing 2023-01-14 12:57:34 +01:00
rootdarkarchon
9605be8d4a minor stylefixes 2023-01-14 12:54:11 +01:00
rootdarkarchon
a0cea2432f fixes for activate/finishrequest 2023-01-11 17:22:04 +01:00
rootdarkarchon
c1f329c233 fixes for server auth 2023-01-11 14:31:33 +01:00
rootdarkarchon
42b15cb6b7 Add Server-Side Download Queue (#21)
* test add queueing to file service

* further adjustments to download queueing

* add check for whether the request is still in the queue to CheckQueue

* forcefully release slot if download didn't finish in 15s

* actually cancel the delay task

* add metrics and refactor some of the request queue service

* refactor pathing

* reuse httpclient

* add queue request dto to requestfile, enqueue users immediately if a slot is available

* change startup to include all controllers

* update server pathing

* update pathing, again

* several adjustments to auth, banning, jwt server tokens, renaming, authorization

* update api I guess

* adjust automated banning of charaident and reg

* generate jwt on servers for internal authentication

* remove mvcextensions

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
2023-01-11 12:22:22 +01:00
rootdarkarchon
61111d387a get kestrel server options from config 2023-01-07 23:44:35 +01:00
rootdarkarchon
d7eee2af8f remove configurekestrel 2023-01-07 23:37:32 +01:00
rootdarkarchon
2943e0964e limit connections to 1000 2023-01-07 02:11:14 +01:00
rootdarkarchon
d328056b9b fix claims and logging in files controller 2023-01-07 01:57:16 +01:00
rootdarkarchon
74b7fcdf89 Refactoring using Claims more, add Server Side Messaging (#20)
* add some refactoring based on claims, handle chara ident inside claim, fix discord userid in log

* improve authentication responses, add server side messaging

* update server to mainline api

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
2023-01-04 15:49:18 +01:00
rootdarkarchon
5f0c12ecfa Switch to JWT authentication (#19)
* switch to jwt authentication

* fix delete files

* adjust saving of deletion of all files

* update api to main/jwt

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
2023-01-02 17:07:34 +01:00
rootdarkarchon
bdd8830c8e add healthchecks to docker 2023-01-02 02:50:33 +01:00
rootdarkarchon
3634cccd1e remove check for file existence because of download task might still be around 2022-12-29 14:14:02 +01:00
rootdarkarchon
6a34f88a24 optimize for readability 2022-12-29 14:10:02 +01:00
rootdarkarchon
a9337eda11 wait for all incoming calls in CachedFileProvider 2022-12-29 13:24:49 +01:00
rootdarkarchon
4af69c2a27 add some logging 2022-12-28 04:54:36 +01:00
rootdarkarchon
31550b0aeb move GetFileSize to database 2022-12-28 04:50:37 +01:00
rootdarkarchon
de2defe692 rework MareConfigurationServiceClient 2022-12-28 04:24:53 +01:00
rootdarkarchon
9eb5967935 rework server responsibilities (#18)
* rework server responsibilities
add remote configuration

* start metrics only when compiled as not debug

* add some more logging to discord bot

* fixes of some casts

* make metrics port configurable, minor fixes

* add docker bullshit

* md formatting

* adjustments to docker stuff

* fix docker json files, fix some stuff in discord bot, add /useradd for Discord bot

* adjust docker configs and fix sharded.bat

* fixes for logs, cache file provider repeat trying to open filestream

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
2022-12-27 13:48:05 +01:00
rootdarkarchon
7ee7fdaf48 switch around all iconfiguration usage to ioptions 2022-12-23 01:53:21 +01:00
rootdarkarchon
b8d61b38bd more fixes 2022-12-22 23:48:04 +01:00
rootdarkarchon
3756fef498 fix _isMainServer verification 2022-12-22 22:28:03 +01:00
rootdarkarchon
02353d5ebe add forceful deletion of files 2022-12-20 19:29:25 +01:00
rootdarkarchon
7db72c6030 recalculate all files on cleanup task (wtf metrics discrepancies) 2022-12-20 15:10:47 +01:00
rootdarkarchon
61af3a3da5 add metrics to CachedFileProvider 2022-12-20 14:56:45 +01:00
rootdarkarchon
25aa01c819 rework static files server 2022-12-20 14:20:24 +01:00
rootdarkarchon
ea19231851 remove unnecessary usings from solution, fixes in metrics 2022-12-20 12:00:23 +01:00
rootdarkarchon
7d3297e1e8 add some file statistics metrics 2022-12-20 05:02:03 +01:00
rootdarkarchon
ea344468f2 add http metrics 2022-12-19 17:10:19 +01:00
rootdarkarchon
827acf0282 change StaticFilesServer to use Controller 2022-12-19 16:01:25 +01:00
rootdarkarchon
90ccfe4162 adjust metrics 2022-12-19 15:01:12 +01:00
rootdarkarchon
5c9b15545c add metrics to each shard 2022-12-19 14:12:25 +01:00