This is the best talk I've seen that spanned a lot of concepts in a clear way. 👏👏👏
@srcmake6 жыл бұрын
Your talk was god-tier dude. The entire presentation was amazing, on every level.
@sarveshkumarnasare142020 күн бұрын
While taking notes, at 10:52 i think the syntax should be std::array rather than std::array 🤔
@nancyfalco46425 жыл бұрын
Its wonderful to hear the voice of my wonderful Vinnie. My child prodigy and creator of Bear Share. I miss you so m u c h!
@andrelucas8950 Жыл бұрын
That was worth a thousand pages of documentation, thank you!
@rmpowell775 жыл бұрын
Really great video. So much content that I found myself having to frequently pause and go back to review. Powerfully simple.
@mzimbres6 жыл бұрын
Another great talk from Vinnie. With the networking TS and Beast I would not be surprised to see C++ taking some place from Erlang in realtime communication. Thanks to Vinnie for making this library available to us.
@jordan42204 жыл бұрын
That was quite a rich talk and just what I was looking for. I was really confused with the examples online. That transfer of ownership paradigm with the shared from this was very unintuitive to me. I like the JavaScript lessons and how everyone was so amazed at how easily it was to do the client socket in a higher level language.
@alexeiz6 жыл бұрын
Damn! Networking in C++ used to be complicated. Now everyone is going to know how to do that in relatively few lines of code.
@thevinn6 жыл бұрын
Have no fear, we are far from removing the last remaining complexities from C++ :)
@vladyslav0076 жыл бұрын
It's not actually a complicated though. Just try to write something using boost::asio and then imagine that standard C++ asio will be better (you might not feel that much pain when boost requires handlers to be CopyConstructible, but it's a hell of a pain).
@thevinn6 жыл бұрын
@@vladyslav007 Boost.Asio only requires MoveConstructible handlers now, as of Boost 1.66.
@aryangupta90345 жыл бұрын
@@thevinn I wish that were to be true, but boost still requires CopyConstructible: www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/overview/cpp2011/move_handlers.html ("However, handler types are still required to be copy constructible")
@norikazuoshiro63245 жыл бұрын
30 seconds deadline for session deletion because i didn't want to use shared pointers. i learned something new today.
@starl1ghtsc25 жыл бұрын
whut? Could you explain this please
@norikazuoshiro63245 жыл бұрын
When i first time used asio, i have a session object that handle 2 sockets (2 strand). If one of the sockets closed, i couldn't immediately free the session since the other socket still using share states in their complete hanlde (run async on other thread). I didn't know how to syn this so i made a deadline timmer to let everything clean up before deletion. It is really bad design, but would be easier if i used share pointers. i'm newbie so still have to learn more.
@CristianMarletta2 жыл бұрын
Great talk, super clear and Vinnie keeps it always interesting.
@fourscoreand98844 жыл бұрын
Thanks for all your great work, Vinnie.
@jiwang43422 жыл бұрын
great material! thanks for your great work!
@FabienFabienB2 жыл бұрын
Amazing presentation. It requires multiple listen to fully grasp the full extent which is really necessary to mast low level websocket in C++. Curious about Beast alternate implementation and how they fare in terms of performance / ease of use.
@starriet10 ай бұрын
around 20:40) I think `while(N--)` should be `while(--N)`, since the intent is making the vector contain N-1 threads, not N threads. Anyway, thanks for the wonderful talk!
@sarveshkumarnasare142020 күн бұрын
Nope! it's alright mate. Let's take an example where N is 5 now "while(N--){/*code*/}" will run 5 times but "--N" will run 4 times (integer 0 is considered as false). Hope it helps😊👍
@baumstamp59894 жыл бұрын
printing money as we speak
@stavb940013 күн бұрын
I had to go through the entire talk and 3 hours on stack overflow to understand how to make this work without exceptions for websocket . More examples showcasing real applications with independent writes and reads would make sense make this library more widespread . Or at least a simple wrapper with default implementations that just work and if someone needs to optimize then he can spend his time into the nitty gritty of executors iocontexts and the whole party of implementation details . In Js in 5 lines u can do the same , we should have this possible in c++ as well
@teras4186 жыл бұрын
**claps** great talk! love your code and libs Vinnie !
@xfreeman864 жыл бұрын
Why does ConstBufferSequence require CopyConstructible instead of just MoveConstructible? How many coexistent copies does the write method create internally?
@thevinn4 жыл бұрын
Well, consider an operation X on a buffer sequence which is expressed in terms of two or more calls to operation Y which operates on a subset of the buffer sequence. If this operation X is invoked on a buffer sequence that only supports MoveConstructible, then ownership of the buffer sequence would transfer to the first invocation of operation Y. At this point operation Y could not be invoked again, because operation X no longer has ownership of the buffer sequence (it is in the moved-from state).
@xfreeman864 жыл бұрын
@@thevinn A ConstBufferSequence is just a pointer and a size. Why can't X construct its own move-only view of the same values (e.g. via the overload `const_buffer buffer(const const_buffer & b)`) to pass to Y? As it is requiring CopyConstructible, it doesn't mind constructing a new ConstBufferSequence.
@juryk6666 жыл бұрын
Thanks for making this video! So helpful.
@PixelPulse1686 жыл бұрын
This technology gives me chills.
@immabreakaleg6 жыл бұрын
as in "I hope I won't ever have to use it cuz these apis with fncs like consume and commit suck ass?" or as in it's awesome?
@immabreakaleg6 жыл бұрын
spoke too soon, this talk gets better!!
@jaysistar27116 жыл бұрын
I would really like a talk about Boost.Beast with the Networking TS and the Coroutines TS. If there isn't one, I think we will all get too comfortable with JavaScript async/await. C++ needs coroutines here to simplify the lifetime of the state, not just the control flow, using an allocator that allocates out of a a std::array in the coroutine frame. It would be nice if someone would make this not-yet-done talk.
@jasonenns50763 ай бұрын
Does Boost.Asio not fit the features that you need?
@AYetau6 жыл бұрын
Could someone please explain to me the reasons of the reoccurring Javascript bashing here at cppcon talks? Or how should it be understood if not bashing? Is it just a popular humorous handling of other languages in general, more like a running gag? But if I should keep my hands away from JavaScript in productive code, for what reasons and what's the better alternative?
@thevinn6 жыл бұрын
Well, I wouldn't go so far as calling it "bashing" but the level of expertise required to learn and use JavaScript is far lower than that required to learn and use C++. As a consequence, there are many more JavaScript programmers than there are C++ programmers. Correspondingly, there are many more BAD JavaScript programmers than there are bad C++ programmers. JavaScript is also harder to maintain as the size of the program increases. This doesn't mean that large C++ programs are automatically more maintainable, but C++ gives you more tools to keep software entropy down. In particular, the type system in C++ is quite robust. I'm not making a value judgement here, each language has its own strengths and weaknesses. As you can see from watching my talk, JavaScript let me put up a GUI and implement a multi-user chat client very quickly, with a tiny amount of code. JavaScript definitely has its place we just need to make sure that we are using it for the right things. And of course JavaScript made the two authors I profiled in my talk quite rich, so who can really argue against it? :)
@frydac5 жыл бұрын
Also, keep in mind that, quoting bjarne: "There are only two kinds of languages: the ones people complain about and the ones nobody uses." There is also a lot of complaining about C++ out there, and they are, sometimes :) , not wrong.. it is what it is, it's big, it's complicated, there are good parts, there are not so good parts.. but ppl get things up and running in the real world right now (while complaining non-stop about it (referring to some coworkers)). I guess the same can be said for JavaScript
@thevinn5 жыл бұрын
@@frydac Hah, love it! Bjarne, ever so pragmatic!
@bsuperbrain2 жыл бұрын
it is 2022 and still no standardized networking in c++
@IllumTheMessage6 жыл бұрын
Great talk Vinnie.
@pazdziochowaty6 жыл бұрын
I think Qt5 websocket library seems easier to use (doc.qt.io/qt-5/qtwebsockets-simplechat-example.html does something similar to what is presented here). I would prefer it unless there is a strong need that my application has to use pure standard and boost
@Rust_Rust_Rust2 жыл бұрын
Nope 🙅🏻 Qt5 is bloated
@llothar686 жыл бұрын
The problem is that this is just using the 1970ths old socket API, so it's boring 50 year old stuff. With 40 or 100GBit Network adapters, the Berkley Socket API is just not useable anymore. Once 20 years ago there was talk about 10K program now it's 10M. Do research but we will pull out the whole networking api into user space and assign threads direct to them as handlers. There will be a lot of software changes to make this scale.
@VivekNa6 жыл бұрын
Just because something is old doesn't mean it's bad. There's nothing boring about UNIX sockets - it's run the internet and stuff that predated the internet since decades. Even if you did invent something better, were stuck with sockets unless the new thing has a revolutionary benefit. You can build whatever abstractions you want over and above the sockets layer. The fact that agar.io is able to allow so many players, shows the efficiency of the system. This talk was just a demo to illustrate how to go about wrapping the lower level layer into a higher level API without losing efficiency and a primer of how to use asio
@llothar686 жыл бұрын
@@VivekNa Old == Inefficient for modern technology. The current API doesn't scale. Just use google, there are modern attempts. And i hope we get coroutines soon because they are absolutely required if you just have a few tens of nanoseconds for every frame. Like filesystems (i really fucking hate them) we really need to go away from the classic 50 year old unix design. But it's very hard to talk about this to people who are extremely conservative and blind for real world needs and advantages.
@thevinn6 жыл бұрын
@@llothar68 Coroutines are a notational convenience they do not improve performance relative to callbacks. The Networking TS api scales just fine, plenty of companies are using them with fiber / 100GB backbones with custom drivers.
@videojeroki6 жыл бұрын
great presentation ! too bad i don't use websocket stuff ;)
@aaronr.96446 жыл бұрын
Great talk.
@zhaoli29845 жыл бұрын
Nice, thank you
@kalderify Жыл бұрын
"Every mutable buffer sequence is also a const buffer sequence. So that's that" No wonder c++ is as dead as glam rock.