Elite killerz official server

Started by EK.IceFlake, Jun 13, 2016, 10:53 AM

Previous topic - Next topic

KAKAN

Quote from: . on Jun 15, 2016, 10:07 AMWTF does Node.JS have to do here? Since we're probably dealing with a shared host and hosting forum scripts. Besides, multi-threading is the way to go to achieve performance in the web-hosting world. Didn't your mom teach you that?

I seriously hope that post was a joke and I simply got it wrong. Either way, we're going off-topic and it's not polite.
multi-threading is good, I believe, but not on hosts where the RAM and CPU is limited.
Okay, lets stop here :D
oh no

EK.IceFlake

Quote from: . on Jun 15, 2016, 10:07 AMWTF does Node.JS have to do here? Since we're probably dealing with a shared host and hosting forum scripts. Besides, multi-threading is the way to go to achieve performance in the web-hosting world. Didn't your mom teach you that?

I seriously hope that post was a joke and I simply got it wrong. Either way, we're going off-topic and it's not polite.
Shared host? No.

Thijn

Quote from: ext-d.CrystalBlue on Jun 15, 2016, 11:53 AM
Quote from: . on Jun 15, 2016, 10:07 AMWTF does Node.JS have to do here? Since we're probably dealing with a shared host and hosting forum scripts. Besides, multi-threading is the way to go to achieve performance in the web-hosting world. Didn't your mom teach you that?

I seriously hope that post was a joke and I simply got it wrong. Either way, we're going off-topic and it's not polite.
Shared host? No.
Yes. Your forum is hosted on a shared host that has around 230 other websites on the same IP.

Quote from: KAKAN on Jun 15, 2016, 11:42 AM
Quote from: . on Jun 15, 2016, 10:07 AMWTF does Node.JS have to do here? Since we're probably dealing with a shared host and hosting forum scripts. Besides, multi-threading is the way to go to achieve performance in the web-hosting world. Didn't your mom teach you that?

I seriously hope that post was a joke and I simply got it wrong. Either way, we're going off-topic and it's not polite.
multi-threading is good, I believe, but not on hosts where the RAM and CPU is limited.
Okay, lets stop here :D
You clearly don't know anything about web development and running webservers. Why do you keep bringing up NodeJS to host a forum on?
Just for your information, 96% of the internet run on normal webservers like apache, nginx, ISS etc.
0.2% uses NodeJS. That's even less then the ugly old Tomcat java server.

Yes, NodeJS has it's uses. But not for front end things like forums. It has its advantages for serving webservices, not full pages.

EK.IceFlake

Quote from: Thijn on Jun 15, 2016, 03:53 PM
Quote from: ext-d.CrystalBlue on Jun 15, 2016, 11:53 AM
Quote from: . on Jun 15, 2016, 10:07 AMWTF does Node.JS have to do here? Since we're probably dealing with a shared host and hosting forum scripts. Besides, multi-threading is the way to go to achieve performance in the web-hosting world. Didn't your mom teach you that?

I seriously hope that post was a joke and I simply got it wrong. Either way, we're going off-topic and it's not polite.
Shared host? No.
That's ghost fault, it turned out ghost has an external hosting plan. I configured apache for virtual hosting and told him where to put the files. He read my PM, but no reply :/

KAKAN

Quote from: Thijn on Jun 15, 2016, 03:53 PMYou clearly don't know anything about web development and running webservers. Why do you keep bringing up NodeJS to host a forum on?
Just for your information, 96% of the internet run on normal webservers like apache, nginx, ISS etc.
0.2% uses NodeJS. That's even less then the ugly old Tomcat java server.

Yes, NodeJS has it's uses. But not for front end things like forums. It has its advantages for serving webservices, not full pages.
Well, you didn't understand me. Apache uses one thread for one client, so, if you got many clients on your webhost, then you got many threads, and that means, more resource usage. So, your webhost will deny more clients.

But, nodejs, it keeps all the clients in one thread, which is a plus point here.

I got this from somewhere:-
QuoteNode.js was created explicitly as an experiment in async processing. The theory was that doing async processing on a single thread could provide more performance and scalability under typical web loads than the typical thread-based implementation.

And you know what? In my opinion that theory's been borne out. A node.js app that isn't doing CPU intensive stuff can run thousands more concurrent connections than Apache or IIS or other thread-based servers.

The single threaded, async nature does make things complicated. But do you honestly think it's more complicated than threading? One race condition can ruin your entire month! Or empty out your thread pool due to some setting somewhere and watch your response time slow to a crawl! Not to mention deadlocks, priority inversions, and all the other gyrations that go with multithreading.

In the end, I don't think it's universally better or worse; it's different, and sometimes it's better and sometimes it's not. Use the right tool for the job.
And NodeJS, seems to be perfect here as it's a shared host.
And it can actually prevent this kind of errors
And about the 96% things, yes, but, forums which are extremely popular are hosted on powerful, dedicated VPS machines.
:edit: Another plus point:-
QuoteApache is thread and process based i.e each request is handled by a separate thread or process (depending upon configuration), which means if the process is waiting for the I/O, whole thread is blocked. Node JS has asynchronous, even driven I/O. Every nodejs instance runs in a single thread and due to its asynchronous nature, it can handle far more number of concurrent requests as compared to apache.
Hope you understand me this time
oh no

.

#20
And why do you think Apache creates one thread/process for each connection? To handle a large amount of clients simultaneously without any of them having to wait on a single thread to process requests. So yes, more threads/processes are the way to go.

NGINX for example, spawns a number of persistent processes in advance called workers, because those processes have a high chance of each running on a different core. Then, each of those workers, start a number of sub-threads which it can manage, called connection workers. So for example if you have 4 cores than you can make the most use of that CPU with 4 workers.

Example nginx.conf
worker_processes 2;

events {
    use kqueue;
    worker_connections 2048;
}

2 processes/workers each of those processes/workers would handle 2048 threads that are used to process connections.

Then you making the claim that Node.Js is not multi-threaded is incorrect. That would mean that Node.Js executes code synchronously. Which again, is bad when dealing with simultaneous clients.

The only correct claim about Node.Js is that it only starts one process. But internally, Node.Js executes code asynchronously. The libuv library was designed for Node.Js to replace libav.

Quote from: KAKAN on Jun 15, 2016, 06:01 PMWell, you didn't understand me. Apache uses one thread for one client, so, if you got many clients on your webhost, then you got many threads, and that means, more resource usage. So, your webhost will deny more clients.

No. You didn't understand how Apache works. It creates a new process to handle new requests not threads. But that depends on how it was configured. Node.Js is the one that creates threads.

Quote from: KAKAN on Jun 15, 2016, 06:01 PMBut, nodejs, it keeps all the clients in one thread, which is a plus point here.

Again, wrong. Once process but many threads. There's a difference between a thread and a process.

Quote from: KAKAN on Jun 15, 2016, 06:01 PMAnd NodeJS, seems to be perfect here as it's a shared host.

Again, I hope that was a joke.



Who gave you the idea that Node.Js executes code synchronously in one thread? Whenever it comes to handling multiple clients simultaneously, more threads/processes/cores = better performance.

And why dafuq are we even debating on this?
.

DizzasTeR

Quote from: . on Jun 15, 2016, 06:53 PMAnd why dafuq are we even debating on this?
+

Because he learned NodeJS and now everything seems shit to him.

KAKAN

That was a nice read though.
Quote from: . on Jun 15, 2016, 06:53 PMWho gave you the idea that Node.Js executes code synchronously in one thread? Whenever it comes to handling multiple clients simultaneously, more threads/processes/cores = better performance.
I never said it does synchronously.
But well, I never knew that more threads = better performance, because NodeJS seems much faster to me. I made a todo app in PHP and in NodeJS. NodeJS was getting loaded in less than 5 seconds, but PHP took more than 5 seconds. Same goes to the forum, have a PHP and a NodeJS forum hosted on your computer, call your 100 friends to visit it and then compare it.

Quote from: Doom_Kill3R on Jun 15, 2016, 09:05 PM
Quote from: . on Jun 15, 2016, 06:53 PMAnd why dafuq are we even debating on this?
+
Because he learned NodeJS and now everything seems shit to him.
Point.
Okay, lets stop here.
oh no

NewK

There seems to be some confusion here. Node.js by itself is indeed single-threaded, the I/O system calls it makes through libuv are what's asynchronous. Node.js by itself lacks any sort of multithreading capabilities, you can't really spawn any new thread by yourself if you want to or need to, like in managed languages like C# or Java (although there are some hacky ways to do it using node, it's still not supported officially). Since node.js has no support for threads, it has to make those calls to the system/OS through the libuv library (as already said above), the system does all the multi-thread work and management by itself, but it's important to note here, that all of that is done on the OS level by libuv, it has nothing to do with node.js. Node.js simply asks to be notified when the work is done through callbacks. Node.js's event loop is still single-threaded though, there is a difference between parallelism and threading. Node.js runs code asynchronously when those I/O calls are made. So while the new threads are not spawned by node.js itself, they're still spawned on the OS level. This just shields node.js programmers from having any knowledge about how threads work. In managed languages like Java or C# if someone wants to spawn a new thread he has to do this himself, he won't make any system calls to an external library like node.js does, people actually need to have a basic understanding of how threads work, implementing proper locking, dealing with race conditions, thread safety, etc... All of that is abstracted for node.js developers. This seems to be the way of the node.js/javascript developer, abstract anything no matter how simple! Really, there's no limits to how many silly javascript dependencies there is, just earlier this year, a simple 11 line left-padding algorithm was being used by thousands of projects as a dependency from npm and once this was pulled from npm, thousands of projects failed to build,  widespread chaos ensued... but anyway, I'm getting super off-offtopic so I'm just going to cut my rant here.

EK.IceFlake

Hi can we talk about the server here?
Kthxbye

EK.IceFlake

UPDATE - Added Quran radio stream. Thanks to Salah Bukhatir for reciting the Quran :)
Currently only Surat ul Haaqqah (69) to Surat un Nooh (71) are available

Murdock

Quote from: ext-d.CrystalBlue on Jun 19, 2016, 12:04 PMUPDATE - Added Quran radio stream. Thanks to Salah Bukhatir for reciting the Quran :)


Finch Real

My Snipet Showroom

http://pastebin.com/5KKuU5cg

DizzasTeR

Someone tried to be funny but failed miserably.

EK.IceFlake

Quote from: Doom_Kill3R on Jun 24, 2016, 08:34 AMSomeone tried to be funny but failed miserably.
I know exactly where you got that.