Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Laravel News:
New Community Project: Laravel Notification Channels
Aug 15, 2016 @ 15:53:13

On the Laravel News site there's a new post talking about a new community effort that's been started in the Laravel ecosystem centering around notification channels. A "notification channel" is a method used to interact directly with your users - in this case using Pusher notifications via a simplified interface.

Laravel 5.3 will ship with a notification system that includes a Nexmo SMS driver, a Mail driver, and the ability to include custom drivers. Now that we have this system built-in we can use the new Pusher service from inside our Laravel applications.

All we need to do is to create a custom driver and that’s it, we’ll be able to send Push notifications to our Mobile devices right away. With the help of Freek Van der Herten and Marcel Pociot we managed to build an easy to use driver for Pusher Push Notifications.

The Pusher system not only allows sending messages to you users via the web but also push notifications to mobile devices (iOS and Android). A simple code snippet is included showing the Laravel-centric interface to the functionality and a link to more code examples on a GitHub repository. The post ends with a brief section about creating customer drivers as well.

tagged: laravel community project notification channel pusher ios android

Link: https://laravel-news.com/2016/08/new-community-project-laravel-notification-channels/

James Morris:
A WebSockets, Ratchet, Silex and Redis PubSub Implementation
Jan 23, 2013 @ 18:09:33

James Morris has an interesting new post to his site about the creation of a real-time web service that could be used for iOS applications via Websockets. He chose Ratchet for the handling (a PHP-based websocket tool) combined with Redis and Silex.

I was approached by a betting/gambling development company who potentially needed a middleware building that would pull from an existing gambling web service and basically transmit to connected iPhone clients the changes from the web service. At first, the obvious answer might be to create another REST web service that the iPhone clients could just ping for changes. However, one of the devs explained that this wouldn’t be fast enough, or scale – they’d need changes to be transmitted as soon as possible, as the app would be a real-time betting app and there’d be thousands of connections to the server.

His solution involved hooking together Ratchet, Redis, Silex and Predis-async to create this sample tool for handling the websocket requests. it uses the "pubsub" mechanism of Redis to push the updates out to listening clients.

tagged: realtime websockets silex pubsub redis ios application api

Link:


Trending Topics: