CppCon 2018:Vinnie Falco“快速致富!使用Boost.Beast WebSocket和网络TS”



http://CppCon.org

演示幻灯片,PDF,源代码和其他演示者资料可在以下网址获得:https://github.com/CppCon/CppCon2018

你想赚很多钱吗?您将看到一些免费的基于浏览器和基于服务器的WebSocket程序的示例,这些示例程序立刻使各自的作者赚了几千万美元。亲自看完这个演讲后,也许您将编写下一个非常成功的WebSocket应用程序!

WebSocket协议通过启用浏览器和Web服务器之间的双向消息传递来为交互式Web供电。 Boost.Beast库在行业标准Boost.Asio库的顶部实现此协议,该库对为ISO C ++标准提议的网络技术规范建模。

本演示文稿介绍了Networking TS概念和算法,如何阅读其要求以及如何在程序中使用它们。我们将使用Beast从零开始在C ++ 11中构建一个多用户聊天服务器,并在HTML和JavaScript中使用相应的基于浏览器的聊天客户端。不需要事先了解或了解Beast或Asio,该讲座适合所有人。

在https://github.com/vinniefalco/CppCon2018上访问此演讲的源代码和幻灯片。

文妮·法尔科(Vinnie Falco)
C ++联盟主席
我是BearShare,DSPFilters以及最重要的Boost.Beast的作者-一个仅提供C ++标头的库,提供HTTP和WebSockets的实现,位于:https://github.com/boostorg/beast/

由Bash电影公司拍摄和编辑的视频:http://www.BashFilms.com。

25 comments
  1. 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.

  2. In my experience it's not the http / websockets lib which is the issue but how you handle the messages in your own code, on what thread and the actual messages you're sending around being fit for purpose.

  3. 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.

  4. Thanks for creating beast Vinnie. I am already using it in a greenfield c++ server for a crypto exchange company. Development has been painless. You're a hero to of the community.

  5. 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?

  6. 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.

  7. 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.

  8. everyone is cheering.. I have a unpopular perspective.. this presentation shows biggest problem with CPP to date:( there is no transparency.. there is so much knowledge you have to swallow, so mutch code you have to write that programmers in modern language will be done before you actually starty implementing business logic.
    And don't get me 'performance' talk..

  9. Damn! Networking in C++ used to be complicated. Now everyone is going to know how to do that in relatively few lines of code.

Comments are closed.