Realtime PHP Using Websockets - Jeff Kolesnikowicz @jkolez

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 31

  • @osaigbovoemmanuel1
    @osaigbovoemmanuel1 8 หลายเดือนก่อน

    I love an excellent talk and this is definitely one! Thank you and well done ❤

  • @himbary
    @himbary 5 ปีที่แล้ว +6

    Awesome presentation! I wish I would have found this earlier.

  • @taymazmostafaei3883
    @taymazmostafaei3883 3 ปีที่แล้ว +2

    if theres no client can we stop server auto and when some one connect then start running ??!?

  • @tedchou12
    @tedchou12 4 ปีที่แล้ว +2

    insightful and well-explained!

    • @domxon
      @domxon 3 ปีที่แล้ว

      @Ted chau th-cam.com/video/746xBN3Fs9k/w-d-xo.html

  • @sugameltpastriescoffee7186
    @sugameltpastriescoffee7186 4 ปีที่แล้ว +4

    man wish I had ratchet back five years ago. had to write ws server in C

  • @vincseize
    @vincseize 5 ปีที่แล้ว +2

    You re great, perfect logic !

  • @cristianandresriveramontoy8351
    @cristianandresriveramontoy8351 4 ปีที่แล้ว

    saludos, amigo, desde Medellin Colombia, gracias :D

  • @talsibony
    @talsibony 6 ปีที่แล้ว +1

    well done nice presentation

  • @alok88joshi
    @alok88joshi 2 ปีที่แล้ว

    I have a websocket configurations done using ratchet, I am seeing it taking 50% of my CPU and because of other process it is reaching 100%. Any leads on how to troubleshoot? Machine Specs: 8 Core CPU, 4Gigs of RAM

  • @user-vu6vf4ev4m
    @user-vu6vf4ev4m 6 ปีที่แล้ว +3

    So awkward, but i loved this

    • @purduetom90
      @purduetom90 4 ปีที่แล้ว

      yes, difficult to listen to but thankfully he was presenting very useful information.

  • @davidmeissner5010
    @davidmeissner5010 3 ปีที่แล้ว

    Wish I was there. I have a lot of questions. Can I email you Jeff?

  • @bendo01
    @bendo01 7 ปีที่แล้ว

    great, thank you

  • @kp8752
    @kp8752 7 ปีที่แล้ว +1

    About 12:30 he said that theres socket support built into node. Which module is he referring to!

    • @stephandevries5069
      @stephandevries5069 7 ปีที่แล้ว

      nodejs.org/api/net.html#net_class_net_socket

    • @felixcenteno2003
      @felixcenteno2003 6 ปีที่แล้ว +1

      socket.io

    • @VectorNodes
      @VectorNodes 5 ปีที่แล้ว

      You should use ws instead of socket.io if you want a lighter option. This example is exactly what I use for my ws configuration. Here it only listens for 'message' and sends it back to each socket stored in an array
      //--- begin server side ---//
      const Server = require('ws').Server
      const portTCP = 8093
      var wss = new Server({port: portTCP})
      var sockets = []
      wss.on('connection', function (ws) {
      console.log('connected')
      ws.on('message', function (msg) {
      var message = JSON.parse(msg)
      for(i = 0; i < sockets.length; i++) {
      sockets[i].send(JSON.stringify(message))
      }
      })
      sockets.push(ws)
      ws.on('close', function () {
      // on socket close
      })
      })
      //--- begin client side ---//
      const socket = new WebSocket('ws://ip.address.here:8093')
      sendMessage()
      function sendMessage() {
      var messageType = 'text'
      socket.send(JSON.stringify({"messageType": messageType,"userName": userName,"message": messageBox.value, "socket": 0}))
      }
      socket.onmessage = function(msg) {
      var message = JSON.parse(msg.data)
      console.log('Message: ' + message.message)
      }

    • @cd78
      @cd78 4 ปีที่แล้ว

      @@millersj socket.io is a node product. This is php

  • @kapitannwel
    @kapitannwel 7 ปีที่แล้ว

    nice, thanks!

  • @JyotiEntertainmentProduction
    @JyotiEntertainmentProduction ปีที่แล้ว

    Nobody asked how to start the 'server.php' file without terminal.! Well I dont know!

  • @crnisrb
    @crnisrb 4 ปีที่แล้ว

    Why not increase number of file descriptors for PHP?

    • @m3hdim3hdi
      @m3hdim3hdi ปีที่แล้ว

      how can you do that?

  • @ar_xiv
    @ar_xiv 5 ปีที่แล้ว +3

    this guy is like "some websites still use this" about standard http requests like 95% of websites actually have any need for ajax. good talk anyway!

  • @flueepwrien6587
    @flueepwrien6587 4 ปีที่แล้ว +3

    I see, php with websockets is painfull

  • @user-bc6ue3ri7o
    @user-bc6ue3ri7o 5 ปีที่แล้ว +1

    webSocket with php is full of issues !

    • @FinlayDaG33k
      @FinlayDaG33k 4 ปีที่แล้ว

      Well... I mean... PHP is not meant to do so...

    • @khalil_art
      @khalil_art ปีที่แล้ว

      I'm a beginner with WebSocket and I'd like to use it for notification and commenting on my website... Since I'm using PHP for my backend, does Ratchet fits my needs?

  • @mekniwassime2098
    @mekniwassime2098 4 ปีที่แล้ว

    Why does everyone show the same fucking shit ass chat example, literally the easiest thing to ever make, been looking for a way to implement server push communication with no progress