
Sign up to save your podcasts
Or
[00:00:00] Caleb: Okay. This is a big one. This is one that deserves more than the amount of time. I'm giving it but and more planning but I'm kind of on a roll and I want to just get the conversation started but does it scale this is the question that has haunted me since day one of Livewire and my journey. I live where Journey has been a massive lesson in overcoming doubts really pushing through them and just doing it consistently over a long period of time.
so live? Where was a proof of concept in PHP for tool that exists in elixir in Phoenix Elixir is. Great at concurrency and by concurrency. I mean like a process running on the server that's continuing and that a user is connecting to over websockets on the front end and has a consistent connection to a concurrent connection and the user can.
Make a request on the front end to the back end to change a [00:01:00] real runtime object and it will change in real runtime metal, you know, so that's what I started out building live wire as the proof of concept was that and I'm like there was some video I post on Twitter at one point that I'm like laughing to myself like this is crazy.
There's a counter that exists in PHP like a count variable that exists. And when you hit plus you tell the server to change that variable in real-time. Okay, so that at first it was this like toy project that was just super attractive to me, but it wasn't attractive to me because of the Cool Tech behind it.
What was attractive to me was the concept? Of not having to deal with all the glue code of Ajax and everything because basically in my mind Live Wire is just taking care of all of the all of that glue code nonsense you're dealing with when you're dealing with UJS because you're doing a lot of the same things you're listening to events.
You're reacting to them. You're sending Ajax requests and updating data or fetching data and changing the page, but you're doing it all [00:02:00] yourself. So what if there was something that did it all for you and you could not have to deal with specific with separate endpoints that return Json. In a standard format that's restful and tested and all that stuff.
What if you could just access PHP from JavaScript wouldn't that just be freaking magical and that's that's the whole concept that just drove me. Everything else is just an implementation implementation detail even websockets as a core concept. Which was you know sort of came a bit later anyway, so does it scale first?
That's like. Oh boy. I looked at every possible websocket implementation for PHP and I always had this scared feeling of like man, if people can't just use Pusher for this like this is going to be this is going to [00:03:00] be potentially not viable for a lot of people what I want to deal with websocket infrastructure for PHP know I definitely wouldn't what I want to do that in production.
It's over like this isn't viable as a legit awesome solution for like real production apps like for everybody so why am I wasting my time like this is you know, when I would always tell people like oh, you know, I'm just kind of working over now, but who knows he has probably not gonna you know, but it's like deep down.
I thought like oh, this is one of those things like the inline script tag like oh, this is just like bad. This is just to to janky like I'm not going to actually ship with this with people aren't going to use that because Ajax all it's so slow. You know, that's just be crazy. But I used it myself then I was at Epcot and I basically realized I had this Moment of clarity.
I was like, the only way forward is the Ajax driver. Like that's the only way forward the web sockets thing. I'll keep it around but I need to own a Jack's like I need to make it because if I owned a Jack's then the [00:06:00] tech I'm requiring people to have to use Live Wire is Ajax, which. Every browser has and everybody uses.
There's this Moment of clarity and I felt amazing. I was on like top of the world. I was like I fixed it in my brain. I fixed it. I fixed the thing the answer the question I had that was like Livewire has a timeline on it and it has like a death an expiration date. The date where I figure out that this websockets things not going to work.
So. I find it to actually be a more practical approach and and it affords us all sorts of cool things and there's lots of creativity to be smart with resources. Anyway, d...
4.7
1717 ratings
[00:00:00] Caleb: Okay. This is a big one. This is one that deserves more than the amount of time. I'm giving it but and more planning but I'm kind of on a roll and I want to just get the conversation started but does it scale this is the question that has haunted me since day one of Livewire and my journey. I live where Journey has been a massive lesson in overcoming doubts really pushing through them and just doing it consistently over a long period of time.
so live? Where was a proof of concept in PHP for tool that exists in elixir in Phoenix Elixir is. Great at concurrency and by concurrency. I mean like a process running on the server that's continuing and that a user is connecting to over websockets on the front end and has a consistent connection to a concurrent connection and the user can.
Make a request on the front end to the back end to change a [00:01:00] real runtime object and it will change in real runtime metal, you know, so that's what I started out building live wire as the proof of concept was that and I'm like there was some video I post on Twitter at one point that I'm like laughing to myself like this is crazy.
There's a counter that exists in PHP like a count variable that exists. And when you hit plus you tell the server to change that variable in real-time. Okay, so that at first it was this like toy project that was just super attractive to me, but it wasn't attractive to me because of the Cool Tech behind it.
What was attractive to me was the concept? Of not having to deal with all the glue code of Ajax and everything because basically in my mind Live Wire is just taking care of all of the all of that glue code nonsense you're dealing with when you're dealing with UJS because you're doing a lot of the same things you're listening to events.
You're reacting to them. You're sending Ajax requests and updating data or fetching data and changing the page, but you're doing it all [00:02:00] yourself. So what if there was something that did it all for you and you could not have to deal with specific with separate endpoints that return Json. In a standard format that's restful and tested and all that stuff.
What if you could just access PHP from JavaScript wouldn't that just be freaking magical and that's that's the whole concept that just drove me. Everything else is just an implementation implementation detail even websockets as a core concept. Which was you know sort of came a bit later anyway, so does it scale first?
That's like. Oh boy. I looked at every possible websocket implementation for PHP and I always had this scared feeling of like man, if people can't just use Pusher for this like this is going to be this is going to [00:03:00] be potentially not viable for a lot of people what I want to deal with websocket infrastructure for PHP know I definitely wouldn't what I want to do that in production.
It's over like this isn't viable as a legit awesome solution for like real production apps like for everybody so why am I wasting my time like this is you know, when I would always tell people like oh, you know, I'm just kind of working over now, but who knows he has probably not gonna you know, but it's like deep down.
I thought like oh, this is one of those things like the inline script tag like oh, this is just like bad. This is just to to janky like I'm not going to actually ship with this with people aren't going to use that because Ajax all it's so slow. You know, that's just be crazy. But I used it myself then I was at Epcot and I basically realized I had this Moment of clarity.
I was like, the only way forward is the Ajax driver. Like that's the only way forward the web sockets thing. I'll keep it around but I need to own a Jack's like I need to make it because if I owned a Jack's then the [00:06:00] tech I'm requiring people to have to use Live Wire is Ajax, which. Every browser has and everybody uses.
There's this Moment of clarity and I felt amazing. I was on like top of the world. I was like I fixed it in my brain. I fixed it. I fixed the thing the answer the question I had that was like Livewire has a timeline on it and it has like a death an expiration date. The date where I figure out that this websockets things not going to work.
So. I find it to actually be a more practical approach and and it affords us all sorts of cool things and there's lots of creativity to be smart with resources. Anyway, d...
283 Listeners
693 Listeners
57 Listeners
624 Listeners
55 Listeners
24 Listeners
982 Listeners
211 Listeners
50 Listeners
8 Listeners
16 Listeners
2 Listeners
7 Listeners
0 Listeners
3 Listeners