Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

creating a real time application in laravel without nodejs

I am using a shared hosting in which i can't use node js.

But I want to create a real time application using laravel as per there https://laravel.com/docs/5.3/broadcasting doc they provide drivers they all uses node if I am not wrong.

I have also searched about https://github.com/Askedio/laravel-ratchet which works with laravel but it requires a ZMQ which I can't install on my shared hosting.

What should I do any ideas.

like image 861
codenut Avatar asked Jan 20 '17 06:01

codenut


1 Answers

You could use Pusher and combine it with Laravel Echo. Echo is a front-end JS framework, so just include the assets and you should be fine.

I think it should be said that it's probably not a good idea to develop these kinds of apps on shared hosted servers, due to a couple of reasons:

  1. You almost never have SSH access, so deploying and debugging is an immense pain
  2. You can't install additional software you need, like NodeJS
  3. Shared hosted servers often aren't build to run heavy php applications, they are build to serve simple websites (that's why they're so cheap)
  4. Depending on your host, all other ports than 80 and 443 are closed, so usage of external services can be blocked

All in all, I think it's better to just get a cheap VPS (i.e. a DigitalOcean $10 plan) in which you can actually do all those things. Yes it's more expensive than shared hosting, but if that's really the game-changer, find a sponsor or partner. $120 is a piece of cake compared to the pains of using shared hosting, and that's speaking out of experience.

like image 198
Loek Avatar answered Oct 07 '22 07:10

Loek