Post B4G8rZfsxdYdl1vgXo by kirby@freerobuxextremist.com
 (DIR) More posts by kirby@freerobuxextremist.com
 (DIR) Post #B4G8FsqNF4LKCnrYw4 by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       how the fuck is a chat server supposed to work with an asynchronous socket model?
       
 (DIR) Post #B4G8OvsDLa9SCy2SBs by Goalkeeper@nicecrew.digital
       1 likes, 0 repeats
       
       @kirby :animu_wut:
       
 (DIR) Post #B4G8VuAE6LFKvvmwF6 by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @Goalkeeper So you set up an event and it accepts things. Every time that event is fired, a new thread is made. For that individual connection. This does not. I just can't wrap my head around how you're supposed to do with chat server with the sort of thing
       
 (DIR) Post #B4G8be6IjldSqqgpY8 by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @Goalkeeper I mean for like one-on-one connections between the client and the server. Yeah it makes sense but you can't do group conversations with that very well. Like what are you supposed to do? F****** constantly? Query a SQL database for new messages?
       
 (DIR) Post #B4G8rZ9ctZkm8ypvGK by dps910@freedombits.org
       0 likes, 0 repeats
       
       @kirby are u using socketio? I have only used that before i am p sure that's how discord works. its like asynchronous or something
       
 (DIR) Post #B4G8rZRLpfvp1x84tE by dps910@freedombits.org
       0 likes, 0 repeats
       
       @kirby because asynchronous is always waiting for something right but it also does other things as well idk
       
 (DIR) Post #B4G8rZfsxdYdl1vgXo by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @dps910 The asynchronous model makes sense like in general but for group chat servers not so much
       
 (DIR) Post #B4G957warK2Ho6CtCy by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @Goalkeeper another idea would be having like a Unix socket or something you know just on the system and multiple threads writing to it, but then you're just over complicating the s*** out of the problem and now I love my state machines
       
 (DIR) Post #B4G97FPA5hj3Wda3QO by dps910@freedombits.org
       0 likes, 0 repeats
       
       @kirby well if it was synchronous, wouldnt that mean you couldn't send messages at the same time as someone else? so u would have to wait until someone else send a message first before sending yours
       
 (DIR) Post #B4G97FZnSAEU3cYY08 by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @dps910 If you're doing things synchronous you've got to do things without blocking b*******
       
 (DIR) Post #B4G97z36O3Pd5Xc5QW by Goalkeeper@nicecrew.digital
       1 likes, 0 repeats
       
       It's a really roundabout and clunky way to do it.
       
 (DIR) Post #B4G9KgpBSMUkKZA68O by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @Goalkeeper that's also one thread or maybe some amount of thread if the language is like super f****** efficient per connection. This is not efficient. Like seriously, it's not why like oh God, what a disaster
       
 (DIR) Post #B4G9PLuUdvScuirv28 by Goalkeeper@nicecrew.digital
       1 likes, 0 repeats
       
       @kirby It's going to rape your entire system just to try to function.
       
 (DIR) Post #B4GANqx0MdFSYjtODY by menherahair@eientei.org
       0 likes, 1 repeats
       
       @kirby @Goalkeeper just internet relay your chat
       
 (DIR) Post #B4GAOShO19KldIsS9I by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @menherahair @Goalkeeper goodness me why didn't I think of this before
       
 (DIR) Post #B4GAUv9v7FpbddIt9s by menherahair@eientei.org
       0 likes, 1 repeats
       
       @kirby @Goalkeeper just mesh your group and chat
       
 (DIR) Post #B4GAenA5hjbjjO5fOK by menherahair@eientei.org
       0 likes, 1 repeats
       
       @kirby @Goalkeeper just write to world readable /tmp/chat
       
 (DIR) Post #B4GAuqhUJcX9L6Mt5U by menherahair@eientei.org
       1 likes, 0 repeats
       
       @Goalkeeper @kirby this is not a joke this is how some high-trust pubnixes do it and more likely than not with a world writable /tmp/chat rather than some socket
       
 (DIR) Post #B4GAwuT3HR2dbObAMC by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @menherahair @Goalkeeper direct messages cannot go through a world readable file
       
 (DIR) Post #B4GB3JaulwDnGkKYEK by dps910@freedombits.org
       0 likes, 0 repeats
       
       @kirby maybe i am dumb. idk how twitch chat works but in popular streams, there is ppls sending messages at the same time and it can be difficult to keep up with it
       
 (DIR) Post #B4GB3JkUCLsTkQoC9I by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @dps910 in normal tcp land the kernel will handle ordering incoming packets from clients/receiving new connections and all you have to worry about is stat(2)ing your listening file descriptor and accepting new connections if data is ready to be ready from that particular descriptor, stat(2)ing your clients is also possible too. a single threaded state machine model would be able to handle things fine if there's an upper limit on number of connections that can be accepted and it is either known the delay your program has when being flooded by the maximum amount of client sockets or you just never have a ton of clients connectedthe minecraft game server still lives with this model and it is serving people reasonably well. though you start to feel the limits in high scale scenarios that anarchy servers need
       
 (DIR) Post #B4GBIGmJWb9AsXnFCK by menherahair@eientei.org
       1 likes, 0 repeats
       
       @kirby @Goalkeeper no but on a pubnix you can just do plain old unix mail for goated dmsor talk(1) or some shit
       
 (DIR) Post #B4GBIOB2164tpEPaCG by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @menherahair @Goalkeeper i dont want to run a pubnix
       
 (DIR) Post #B4GBRxjFCmnMh3ymLw by menherahair@eientei.org
       1 likes, 0 repeats
       
       @kirby @Goalkeeper obviously or you wouldn't have gay non pubnix issues (none of these solutions work well even in a pubnix scenario)
       
 (DIR) Post #B4GCIoXs4zplYkrT5U by deadheat@freesoftwareextremist.com
       3 likes, 0 repeats
       
       @kirby
       
 (DIR) Post #B4GCNdxOsEuoAW6ZtI by kirby@freerobuxextremist.com
       1 likes, 0 repeats
       
       @deadheat this is a classiiccccc. i want korone to lap dance on me
       
 (DIR) Post #B4GJjzCvFHXM7pxydc by fiore@rentseeking.quest
       1 likes, 0 repeats
       
       wdym ??  irc is  an inherently  async protocol  to implementCC: @dps910@freedombits.org
       
 (DIR) Post #B4GJmDa4mC3THbrPt2 by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @fiore @dps910 event based socket accepts. flying spaghetti monster
       
 (DIR) Post #B4GJtS4NJ2U8FJTwJM by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @fiore @dps910 ipc could help. but it overcomplicates the problem. a state machine approach would be easy and probably be more efficient for a non scaling scenario
       
 (DIR) Post #B4GJwzu1yIvm2wKmjQ by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @dps910 @fiore ipc is forced to be part of the flying spaghetti monster, why did i name it
       
 (DIR) Post #B4GK9k0OOBQKVRO1KK by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @dps910 @fiore ill admit it, the flying spaghetti monster is probably the norm. and you know what? that disappoints me, that disappoints me heavily