[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/r9k/ - ROBOT9001


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


Any nerds online?

I'm making my own Discord in PHP. Getting things to update automatically is kinda hard.
I made it so that JGuery sends a check to the database every 3 seconds to check for new messages. If new messages are found, the discussion is refreshed.
My friend said this kind of periodical SQL bombing is basically dossing. But isn't 3 seconds a long enough period? How dangerous and resource heavy do you think this practice is?

>just use websocks
I dont know how. Coding a websocket system is hard. My current system is like 2 short functions and that's it.
>>
coding isn't "hard", more like there are 100s of little fiddly things you need to add to the program which you can understand easily but have to keep track of and code perfectly

this is why there are so many 'jeet coders, they can demonstrate their skills to a boomer by performing a few simple tasks but there is no structure to it, they just keep slapping on more and more willy nilly
>>
>>83267633
Isn't PHP ancient? I'm pretty sure most modern sites use NodeJS or some other framework.
>>
>>83267698
You are well beyond what I know. Good job and good luck.

>>83267698
Remember that guy that said not to use a bunch of javascript frameworks? I don't know who is right, but I do recommend you be careful not to get sidetracked
>>
>>83267633
just use websockets, literally designed for this use case
why are you using php anyways, don't you know that stuff will rot your brain
>>
>>83267698
>>83267723

I use "le ancient shit haha" for many reasons. One, I'm not a zoomer so I dont have an aversion towards old tech because it's not old to me.
Second, it's been tried and tested. I'm not gonna adopt some new shit that will be replaced within 5 years when PHP has proven itself time and time and time again.
>>
File: 1764455524018140.jpg (159 KB, 871x800)
159 KB
159 KB JPG
>>83267698
>I'm pretty sure most modern sites use NodeJS or some other framework.

Yes, they do. And most modern websites absolutely suck.
You love 4chan and guess what 4chan uses? It's 100% PHP.
>>
>>83267740
>You love 4chan and guess what 4chan uses? It's 100% PHP.
Isn't that why the sharty hacked them earlier this year?
>>
>>83267755

Not quite, it's not PHP's fault. 4chan is just a god awful website through and through.
And if I remember correctly it was some SQL database thing. 4chan uses some obsolete database that doesn't encrypt passwords or something.
Everything about 4chan is obsolete and spaghetti. This entire website is a single 10,000-line long PHP file with no comments or anything. Nobody knows how it works or what holds it together.
>>
4chan does update posts automatically but it can only do it periodically every 10 seconds which is a very primitive approach.
>>
>>83267633
Just learn how to do the websockets shit. If you're doing this to try to get a job, half-assing it won't help.

>>83267764
No, there was a vulnerability in some PS or PDF library they were using.
>>
>>83267784
>If you're doing this to try to get a job
There are no jobs in IT anymore
All the people in IT are people who got in before 2018 or so
>>
>>83267740
4chan code is notoriously shit
>>
>>83268376
It's crazy a site can rake in 7 figures a year with code that shit
>>
>>83268566
That's nothing, Microsoft, Amazon, and Google rake in billions with shit code.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.