[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]

/g/ - Technology

Make /g/ Great Again

Name
Email
Subject
REC
STOP
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Options
dicesidesmodifier

Allowed file types:jpg, jpeg, gif, png, webp,webm, mp4, mov, swf, pdf
Max filesize is16 MB.
Max image dimensions are15000 x15000.
You may upload5 per post.


File: 9521592eafd9be1⋯.jpg (97.66 KB,784x588,4:3,socket.jpg)

 No.12646

Node.js, despite all it's faults supposedly uses the "new" networking method that allows your server to handle millions of connections. Nginx does something similar which is why it's so damn fast. Basically it boils down to throwing the concept of sockets into the fucking trash and bypassing the whole kernel because there's no other way to take full control of the network traffic coming to the program. I believe the concept goes by the terms "kernel bypass networking" or "programmable packet processing".

How do you get this power into a program/server that isn't based on javashit? Let's say you want to make an imageboard server in C++, or a server for your videogame. Are there libraries in C/C++ that do it? Is there some part of the Go ecosystem that does it?

There's systems like DPDK, Netmap, and XDP that supposedly accomplish something along this line, but they seem too low level and hard to research to me, it's very hard to get started with them. I want something higher level, but not so high that I need to install a bloated javascript shit factory.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12652

>bypassing the whole kernel

Like how? The program runs on the OS which runs on the kern-el.

It's about not making system calls in request processing.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12653

>>12652

I don't care what it's called or what exactly it does, I want to know how I can make a server based on it without node.js.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12668

if nginx does it then why don't you just look into their source code you stupid cunt. what are you, 12?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12688

>>12668

Because reverse engineering something like that would be a fucking waste of my life.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12701

>>12688

>Because reverse engineering something like that would be a fucking waste of my life.

If I did that and told you, it would be a fucking waste of my life too, nigger.

Now delete yourself!

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12715

>>12646

Node.js has an event loop built into it by default, and its APIs (especially its I/O operations like anything network related) are built to work with it. It's this event loop that allows a single process to handle many connections efficiently. It's not doing anything weird with the kernel at all. It was kind of novel to default to asynchronous programming when node.js first came out, but event loops have existed long before node.js.

Even the event loop that node.js uses started life out as libev by Marc Lehmann. It's since been made more portable to non-Unix systems and transformed into libuv. It's a C library so you can use it from C or C++ if you want.

https://github.com/libuv/libuv/wiki/Projects-that-use-libuv

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12717

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12719

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12722

>>12715

I want to clarify something. libuv was influenced by libev, but they are distinct libraries with different maintainers and goals. Node.js used libev initially, but moved to libuv later.

libev: http://software.schmorp.de/pkg/libev.html

libuv: https://github.com/libuv/libuv

libuv vs. libev: https://gist.github.com/andreybolonin/2413da76f088e2c5ab04df53f07659ea

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12730

https://github.com/Qihoo360/evpp is the only thing I could find that satisfies your specifications. evpp is a C++ networking library made with speed and efficiency in mind. Their page states that much of their advantage is because of a self implemented IO buffer, in other words; evpp bypass the kernel through userspace IO.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12735

>>12715

>>12722

Oh, then maybe it was only nginx that did what I was thinking about. Either way libuv sounds good, I'll see if I can get that to work, thanks.

>>12730

>those bug runes

Suspicious, but I'll check it out.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12755

>>12735

nginx also uses an event loop which is something it and node.js shared in common. When nginx first came out, using an event loop to handle connections was novel compared to Apache's process-per-connection architecture.

https://www.nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12758

>>12755

I swear I read somewhere that nginx uses some kernel bypass technique, that's how I started looking into the concept. Maybe I misunderstood or mixed something else into it or just remember completely wrong.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.12777

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.13633

>>12646

>Let's say you want to make an imageboard server

first you must get enough traffic lol

even shitty ruby server on rpi would work for this usecase

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.13968

Hello everyone. How are you? I want to chat

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.13969

Hi. I don 't understand anything about software and its development . Therefore, for example, I recently turned to one of these companies https://fortegrp.com/enterprise-software-engineering/ . They created the software for me from the very beginning and it has been working perfectly for like six months. I will even advise their friends

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



[Return][Go to top][Catalog][Nerve Center][Random][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]