08:18 <+bridge_> [ddnet] Find Girls Of Your Hottest Dreams Here! - https://privatepage.vip/QYHhZv?tx=x5 08:25 <+bridge_> [ddnet] Find Girls Of Your Hottest Dreams Here! - https://nakedphotos.club/QYHhZv?tx=x5 08:25 <+bridge_> [ddnet] @snail 08:38 <+bridge_> [ddnet] @archimede67 ty 08:45 <+bridge_> [ddnet] np ^^ 09:43 <+bridge_> [ddnet] @snail if i randomly tag you do i also get a thank you? 13:40 <+bridge_> [ddnet] @n000b i guess that's a no 😂 13:59 <+bridge_> [ddnet] thank you 14:28 <+bridge_> [ddnet] @n000b#1857 14:29 <+bridge_> [ddnet] @n000b#1857 17:14 <+bridge_> [ddnet] ty all 17:15 <+bridge_> [ddnet] except ryozuki 17:24 <+bridge_> [ddnet] mean 17:36 <+bridge_> [ddnet] naem 17:55 <+bridge_> [ddnet] @heinrich5991 I remember you talking about a spec for the http masters somewhere, is that correct? 17:58 <+bridge_> [ddnet] @Learath2 not really, don't remember 18:00 <+bridge_> [ddnet] Well does using a PATCH as a heartbeat sound reasonable to you? 18:01 <+bridge_> [ddnet] I'd use a POST 18:02 <+bridge_> [ddnet] patch sounds more obscure 18:03 <+bridge_> [ddnet] @Learath2 make sure to include proper IPv6 support for these masters 18:22 <+bridge_> [ddnet] I was thinking POST to list a server, then something like a PATCH with the current timestamp as a heartbeat 18:27 <+bridge_> [ddnet] Why not trying instead of thinking? 😂 18:28 <+bridge_> [ddnet] Because I'd rather do it right once then trying 50 different variations 18:29 <+bridge_> [ddnet] @Learath2 I'd just send a POST request every time, no difference between the first and later ones 18:29 <+bridge_> [ddnet] (like currently) 18:29 <+bridge_> [ddnet] But you will not be sure until you do it 18:29 <+bridge_> [ddnet] @archimede67 APIs like these I prefer designing first, then implementing according to a spec 18:30 <+bridge_> [ddnet] Which spec? 18:30 <+bridge_> [ddnet] the one we think of 18:30 <+bridge_> [ddnet] @heinrich5991 is that really efficient though, if we keep the packets smaller the server would be more equipped to handle attacks 18:30 <+bridge_> [ddnet] @archimede67 the spec I prefer to design, as stated in the first half of the sentence 😛 18:34 <+bridge_> [ddnet] Also do you think we should keep it just `ip:port`? We could have the masters store more 18:34 <+bridge_> [ddnet] I think we should store more 18:34 <+bridge_> [ddnet] I liked this sample register request: 18:35 <+bridge_> [ddnet] ``` 18:35 <+bridge_> [ddnet] { 18:35 <+bridge_> [ddnet] "info": { 18:35 <+bridge_> [ddnet] "clients": [ 18:35 <+bridge_> [ddnet] { 18:35 <+bridge_> [ddnet] "name": "heinrich5991", 18:35 <+bridge_> [ddnet] "clan": "", 18:35 <+bridge_> [ddnet] "country": null, 18:35 <+bridge_> [ddnet] "score": 123, 18:35 <+bridge_> [ddnet] "team": -1 18:35 <+bridge_> [ddnet] } 18:35 <+bridge_> [ddnet] ], 18:35 <+bridge_> [ddnet] "max_players": 64, 18:35 <+bridge_> [ddnet] "max_clients": 64, 18:35 <+bridge_> [ddnet] "passworded": false, 18:35 <+bridge_> [ddnet] "game_type": "DDRaceNetwork", 18:35 <+bridge_> [ddnet] "name": "DDNet RUS - Moderate [DDraceNetwork]", 18:35 <+bridge_> [ddnet] "map": { 18:35 <+bridge_> [ddnet] "name": "Sunreal", 18:35 <+bridge_> [ddnet] "crc": "0abcdef1", 18:35 <+bridge_> [ddnet] "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", 18:35 <+bridge_> [ddnet] "size": 12345 18:35 <+bridge_> [ddnet] }, 18:35 <+bridge_> [ddnet] "version": "0.6.4, 11.2.1" 18:35 <+bridge_> [ddnet] }, 18:35 <+bridge_> [ddnet] "port": 1234, 18:35 <+bridge_> [ddnet] "secret": "abcdef" 18:35 <+bridge_> [ddnet] } 18:35 <+bridge_> [ddnet] ``` 18:35 <+bridge_> [ddnet] i.e. complete info that the masterserver can distribute 18:35 <+bridge_> [ddnet] Yeah I had something similar in mind 18:36 <+bridge_> [ddnet] The only difference I had in mind was to have the future messages be a PATCH 18:36 <+bridge_> [ddnet] don't overthink that, we can add that later 18:36 <+bridge_> [ddnet] with the secret and a timestamp 18:36 <+bridge_> [ddnet] better get a working version first IMO 18:36 <+bridge_> [ddnet] oh yea, a version is still missing 18:36 <+bridge_> [ddnet] from that json 18:36 <+bridge_> [ddnet] (so that lingering old requests don't override newer ones) 18:37 <+bridge_> [ddnet] a timestamp or a counter should be fine for that 18:38 <+bridge_> [ddnet] yea, counter I'd think 18:38 <+bridge_> [ddnet] a unix timestamp would be better as we can use that to expire entries aswell 18:39 <+bridge_> [ddnet] Also I'm thinking of implementing the masterserver in python, any objections to that? 😛 18:40 <+bridge_> [ddnet] no, can reimplement it in rust later 18:40 <+bridge_> [ddnet] (if the need arises) 18:40 <+bridge_> [ddnet] yeah, was also thinking rust later if we need the performance 18:40 <+bridge_> [ddnet] we can't trust the client either way, so timestamp doesn't help there 18:40 <+bridge_> [ddnet] (use flask!) 18:41 <+bridge_> [ddnet] yeah already using flask 18:41 <+bridge_> [ddnet] and write the server list to a static file to be served by a real http server 18:41 <+bridge_> [ddnet] ok, so one complete https request with little payload data has 2.5kb of data, with data say 4kb 18:42 <+bridge_> [ddnet] or let's say 3kb with data 18:42 <+bridge_> [ddnet] 1000 servers doing this, 3kb each, every 15 seconds (as we currently do), I get 200kb/s 18:43 <+bridge_> [ddnet] that's quite managable 18:43 <+bridge_> [ddnet] which seems fine (also, it should be less because we re-use https connections, so the 2.5kb overhead per connection should go away), yielding <50kb/s 18:43 <+bridge_> [ddnet] which seems fine (also, it should be less because we re-use https connections, so the 2.5kb overhead per connection should go away, yielding <50kb/s) 18:44 <+bridge_> [ddnet] I had one more concern in mind, do you think we should account for horizontal scaling? 18:44 <+bridge_> [ddnet] (i doubt we'd ever need it given we'd put this behind some run of the mill ddos protection service anyways) 18:45 <+bridge_> [ddnet] e.g. should we support multiple masters? 18:45 <+bridge_> [ddnet] I'd say no to horizontal scaling 18:45 <+bridge_> [ddnet] I'd like multiple masters 18:45 <+bridge_> [ddnet] "The HTTP PATCH request method applies partial modifications to a resource." i think it has nothing to do with a heartbeat 18:45 <+bridge_> [ddnet] each server registers at each master, clients request one 18:46 <+bridge_> [ddnet] why not just a GET request? 18:46 <+bridge_> [ddnet] @Ryozuki it'd be modifying the "timestamp" in the server entry 18:46 <+bridge_> [ddnet] because it modifies state, and that would be against the HTTP spec 18:46 <+bridge_> [ddnet] POST for registering 18:46 <+bridge_> [ddnet] GETs are supposed to never modify state 18:46 <+bridge_> [ddnet] what means heartbeat? 18:46 <+bridge_> [ddnet] the server says it's still alive 18:46 <+bridge_> [ddnet] updting the info? 18:46 <+bridge_> [ddnet] a message to show that the server is still alive 18:46 <+bridge_> [ddnet] only alive? 18:46 <+bridge_> [ddnet] hmm 18:46 <+bridge_> [ddnet] well would also modify the data in this case 18:46 <+bridge_> [ddnet] still i dont think patch fits 18:47 <+bridge_> [ddnet] you want to make the master server be like a rest api? 18:47 <+bridge_> [ddnet] yes 18:47 <+bridge_> [ddnet] thats a cool idea 18:47 <+bridge_> [ddnet] anyway, what do you think about my multiple masters proposal, @Learath2 ? 18:47 <+bridge_> [ddnet] I think matricks originally proposed it ^^ 18:48 <+bridge_> [ddnet] I don't really see a problem with it, the increase of traffic for the server is negligible to register at all masters 18:48 <+bridge_> [ddnet] I think we shouldn't hardcode the masters this time 18:48 <+bridge_> [ddnet] maybe a request to `/masters` to get a list of all the masters 18:49 <+bridge_> [ddnet] "The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is no side effect), where successive identical POST may have additional effects, like passing an order several times." 18:49 <+bridge_> [ddnet] does sending a heartbeat has diferent effects over time? 18:49 <+bridge_> [ddnet] meh, not sure I like that @Learath2 18:49 <+bridge_> [ddnet] but I'd definitely like a masters.cfg, one url per line where the master servers are 18:49 <+bridge_> [ddnet] its better heinrich way 18:49 <+bridge_> [ddnet] that way u dont rely on one point 18:49 <+bridge_> [ddnet] which can be ddosed 18:49 <+bridge_> [ddnet] what I was proposing is a way to get that masters.cfg 18:49 <+bridge_> [ddnet] e.g. https://master1.ddnet.tw/v1 18:50 <+bridge_> [ddnet] if you can't reach the master, you just use your old masters.cfg 18:50 <+bridge_> [ddnet] yea, I think self-update ought to be enough 18:50 <+bridge_> [ddnet] ah 18:50 <+bridge_> [ddnet] I don't know 18:50 <+bridge_> [ddnet] what use-case do you have in mind, @Learath2 ? 18:50 <+bridge_> [ddnet] e.g. we add a new master 18:50 <+bridge_> [ddnet] but where whould u implement master servers? at ddnet level or at teeworlds 0.6? 18:50 <+bridge_> [ddnet] will u make it backwards compatible? 18:50 <+bridge_> [ddnet] it's unreasonable to expect users that can't figure out how to change their names to add a new master 18:51 <+bridge_> [ddnet] yeah 18:51 <+bridge_> [ddnet] yes. that'd be done with the update 18:51 <+bridge_> [ddnet] like the updated client 18:51 <+bridge_> [ddnet] oh, that's true, maybe letting the update handle it is a better idea 18:51 <+bridge_> [ddnet] hmm, it's not quite as real-time 18:51 <+bridge_> [ddnet] we specify https://master1.ddnet.tw/ to https://master4.ddnet.tw/ and that gives us some room to spare 18:52 <+bridge_> [ddnet] also yeah, how general should I keep this? 18:52 <+bridge_> [ddnet] also maybe some versioning 18:52 <+bridge_> [ddnet] https://master1.ddnet.tw/v1 18:52 <+bridge_> [ddnet] it would be cool if the master server can also provide custom endpoints for data such as total players, total amount of servers and amount of servers per gamemode etc 18:52 <+bridge_> [ddnet] but thats secondary i guess 18:53 <+bridge_> [ddnet] @Ryozuki yeah, I was thinking of that aswell 18:53 <+bridge_> [ddnet] that way u make it someone who wants to interact weith masters not make so many calls 18:53 <+bridge_> [ddnet] or whathever 18:53 <+bridge_> [ddnet] @Learath2 yea, add a version to the top of the path 18:54 <+bridge_> [ddnet] @heinrich5991 do we really need to output to a static file? 18:54 <+bridge_> [ddnet] @Learath2 what lang will u use for the rest sv 18:54 <+bridge_> [ddnet] I think we should do that. serving from database is a bad idea IMO 18:54 <+bridge_> [ddnet] @Ryozuki flask python for now 18:54 <+bridge_> [ddnet] hmm serving from database with a cache is better IMO 18:54 <+bridge_> [ddnet] update it once per second or so 18:55 <+bridge_> [ddnet] yeah we could configure nginx to cache a little 18:55 <+bridge_> [ddnet] @Learath2 i think PUT fits heartbeat 18:56 <+bridge_> [ddnet] @Learath2 no u would use memcached or smth like that, i would rely more in the server directly managing the cache than nginx 18:56 <+bridge_> [ddnet] or I could output to a static file, and we could do some nginx configuration black magic to only serve one endpoint as a file and the rest goes to flask 18:56 <+bridge_> [ddnet] but thats just me 18:57 <+bridge_> [ddnet] @Learath2 that's not particularly hard to configure 18:57 <+bridge_> [ddnet] so that'd be fine 18:57 <+bridge_> [ddnet] I think 18:58 <+bridge_> [ddnet] memcached also sounds like a decent idea, I'll just get a draft implementation for now 18:58 <+bridge_> [ddnet] we can think about caching after I get the thing working 18:58 <+bridge_> [ddnet] managing the cache urself directly allows u to renew it when u get a updated resource btw 18:58 <+bridge_> [ddnet] nginx cant know much 18:59 <+bridge_> [ddnet] yeah, it does sound more reasonable that we should be managing the cache if we don't write out to a static file 18:59 <+bridge_> [ddnet] but with a static file we can just update that 18:59 <+bridge_> [ddnet] idk about flask, i would personally use nodejs but i know u hate js xd 18:59 <+bridge_> [ddnet] i'm not sure whether nginx is optimized enough to cache a non-changed file 18:59 <+bridge_> [ddnet] im making quite a big rest api lately :p 19:00 <+bridge_> [ddnet] what are you using? express.js? 19:00 <+bridge_> [ddnet] idk how nginx cache works 19:00 <+bridge_> [ddnet] the framework i use uses it yes 19:00 <+bridge_> [ddnet] im using https://nestjs.com/ 19:00 <+bridge_> [ddnet] I was thinking node at the beginning, but I didn't want to introduce a new language to ddnet and didn't want the bloat of npm and all that stuff 19:00 <+bridge_> [ddnet] (with typescript) 19:01 <+bridge_> [ddnet] @Learath2 its easy to implement cache and ratelimiting with it 19:01 <+bridge_> [ddnet] btw u will also want rate limiting 19:01 <+bridge_> [ddnet] I'll let nginx handle the rate-limiting 19:02 <+bridge_> [ddnet] well yeah, but u wont be able to implement rate limiting per endpoint 19:03 <+bridge_> [ddnet] nginx has zones for rate limiting 19:03 <+bridge_> [ddnet] :o 19:03 <+bridge_> [ddnet] does this rest api need some auth 19:03 <+bridge_> [ddnet] i think they are called location blocks instead of zones tho 😛 19:03 <+bridge_> [ddnet] no need for auth 19:04 <+bridge_> [ddnet] well if u need help ill be glad to help 19:04 <+bridge_> [ddnet] :p 19:04 <+bridge_> [ddnet] i used flask time ago too 19:04 <+bridge_> [ddnet] I have a feeling you'd use JWTs 😛 19:04 <+bridge_> [ddnet] im using jwt 19:04 <+bridge_> [ddnet] xd 19:04 <+bridge_> [ddnet] yeah, knew it, you are the kind to use the fancy new stuff 😛 19:04 <+bridge_> [ddnet] i love it 19:04 <+bridge_> [ddnet] :monkaS: 19:04 <+bridge_> [ddnet] I usually just go for good old tokens with a key value store 19:05 <+bridge_> [ddnet] ¯\_(ツ)_/¯ 19:06 <+bridge_> [ddnet] im also using a ORM but i end up making lot of raw sql calls cuz it just cant cover my complexity sadly 19:07 <+bridge_> [ddnet] ORMs are good if you are doing bog standard stuff 19:07 <+bridge_> [ddnet] yeah 19:07 <+bridge_> [ddnet] JWTs are good if you have multiple backends that use the same auth, great for microservice architectures 19:08 <+bridge_> [ddnet] as a session token though, not really useful, bloated, and creates a potential security issue 19:09 <+bridge_> [ddnet] :ninja: 19:09 <+bridge_> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/592763125959360523/unknown.png 19:09 <+bridge_> [ddnet] sql :pepeH: 19:09 <+bridge_> [ddnet] @archimede67 arent u a web dev 19:09 <+bridge_> [ddnet] making your own social network? 😄 19:09 <+bridge_> [ddnet] @Learath2 kinda 19:09 <+bridge_> [ddnet] something weeb 19:09 <+bridge_> [ddnet] ye sql worst thing ever 19:10 <+bridge_> [ddnet] sql is nice 19:10 <+bridge_> [ddnet] no 19:10 <+bridge_> [ddnet] that's a pretty weak ORM if it cant do those, what is it? 19:10 <+bridge_> [ddnet] nosql better 19:10 <+bridge_> [ddnet] @Learath2 well i probs cant do it 19:10 <+bridge_> [ddnet] but i cant bother waste 1 hour 19:10 <+bridge_> [ddnet] to find out how 19:10 <+bridge_> [ddnet] xd 19:11 <+bridge_> [ddnet] i mainly relly on the orm to have easy objects and it creates me all the tables and relation tables 19:11 <+bridge_> [ddnet] i probs can do it* 19:11 <+bridge_> [ddnet] also migrations, if you have those 19:11 <+bridge_> [ddnet] makes it a breeze to extend your schema 19:11 <+bridge_> [ddnet] not yet since i dont have prod yet 19:12 <+bridge_> [ddnet] yeah it has migration support 19:14 <+bridge_> [ddnet] wait 19:14 <+bridge_> [ddnet] @Learath2 hates js? xd 19:14 <+bridge_> [ddnet] he hates new stuff 19:14 <+bridge_> [ddnet] and systemd 19:14 <+bridge_> [ddnet] 😂 19:14 <+bridge_> [ddnet] xd 19:14 <+bridge_> [ddnet] xd 19:15 <+bridge_> [ddnet] oof 19:15 <+bridge_> [ddnet] 19:15 <+bridge_> [ddnet] https://cdn.discordapp.com/attachments/293493549758939136/592764667546566659/unknown.png 19:15 <+bridge_> [ddnet] it doesnt exist 19:15 <+bridge_> [ddnet] hm 19:15 <+bridge_> [ddnet] well it does but its a domain that probs points to ddnet.tw 19:15 <+bridge_> [ddnet] and its not added to the cert 19:15 <+bridge_> [ddnet] ye 19:43 <+bridge_> [ddnet] I like typescript better then js 20:11 <+bridge_> [ddnet] i only code in typescript @Learath2 20:43 <+bridge_> [ddnet] oh bois unicode 20:43 <+bridge_> [ddnet] how to get rid of ^M ? -.- 20:43 <+bridge_> [ddnet] http://puu.sh/DKeps/40f9943e22.png 20:43 <+bridge_> [ddnet] i tried dos2unix.exe and unix2dos.exe nothing worked 20:43 <+bridge_> [ddnet] delteting the line rewriting it 20:44 <+bridge_> [ddnet] if i edit the file it messes it up 20:45 <+bridge_> [ddnet] even vim from git bash messes it up 20:51 <+bridge_> [ddnet] this isn't unicode btw, likely plain ascii 😛 20:51 <+bridge_> [ddnet] which file @ChillerDragon 20:52 <+bridge_> [ddnet] stats.h 20:52 <+bridge_> [ddnet] vanilla master 20:52 <+bridge_> [ddnet] http://puu.sh/DKeBZ/f15bbd4fbb.png 20:52 <+bridge_> [ddnet] any idea? I dont want to switch to linux and redo my changes -.- 20:57 <+bridge_> [ddnet] @ChillerDragon it's probably fine 20:57 <+bridge_> [ddnet] the file has windows file endings for some weird reason 20:57 <+bridge_> [ddnet] but then unix2dos.exe shoudl do the thin.. 20:57 <+bridge_> [ddnet] ah 20:57 <+bridge_> [ddnet] then i get changes in all linex 20:58 <+bridge_> [ddnet] hum? 20:58 <+bridge_> [ddnet] maybe i have to edit it with notepad editor from windows? :troll: 20:58 <+bridge_> [ddnet] send me the file in the small-diff version 21:02 <+bridge_> [ddnet] [sent via PM] 21:02 <+bridge_> [ddnet] @ChillerDragon file looks good, just commit it like that I guess 21:02 <+bridge_> [ddnet] :c 21:02 <+bridge_> [ddnet] looks messed up 21:03 <+bridge_> [ddnet] if my git gets triggered github git will show this as well 21:03 <+bridge_> [ddnet] nah 21:03 <+bridge_> [ddnet] not necessarily 21:03 <+bridge_> [ddnet] I actually think I never saw these on github 21:04 <+bridge_> [ddnet] grr 21:05 <+bridge_> [ddnet] i want to atleast fix the #endif but git reset --hard path doesnt work 21:05 <+bridge_> [ddnet] how to only reset one file? 21:09 <+bridge_> [ddnet] are yo kidding me i have the bug on linux as well 21:10 <+bridge_> [ddnet] what is wrong with this file 21:10 <+bridge_> [ddnet] flag.cpp also has wrong endings 21:10 <+bridge_> [ddnet] it's probably not a bug 21:10 <+bridge_> [ddnet] it's just that the file has windows line endings 21:10 <+bridge_> [ddnet] git probably only shows these ^M on changed lines 21:11 <+bridge_> [ddnet] ^M is `\r` 21:11 <+bridge_> [ddnet] it triggers me 21:11 <+bridge_> [ddnet] it's not shown on github 21:12 <+bridge_> [ddnet] make a separate PR updating the windows line endings to unix ones 21:12 <+bridge_> [ddnet] :justatest: 21:12 <+bridge_> [ddnet] ya was thinking about that 21:17 <+bridge_> [ddnet] git converts them to unix endings usually 21:18 <+bridge_> [ddnet] iirc 21:30 <+bridge_> [ddnet] i think thats something you can choose on windows git installation 21:30 <+bridge_> [ddnet] (YEs i UsE wiNdoWs :justatest: ) 21:30 <+bridge_> [ddnet] windows is good 21:30 <+bridge_> [ddnet] u 21:30 <+bridge_> [ddnet] ikr 21:30 <+bridge_> [ddnet] no kek emoji 22:03 <+bridge_> [ddnet] windows is bad 22:03 <+bridge_> [ddnet] :monkaS: 22:50 <+bridge_> [ddnet] do you have your autocrlf properly set? 23:00 <+bridge_> [ddnet] what ever that is pr is published and github didnt show it 23:00 <+bridge_> [ddnet] also tested on linux so i blame the file not my setup 23:00 <+bridge_> [ddnet] tested 4 editors and 2 operating systems