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.