In need of a Push service for Laravel mobile app - php

I am building an iOS/Android app using Laravel as backend and now I need a push service.
I need to push out two types of notifications, when the app is running/background and one when its closed.
I dont mind using two types of services, I mostly want one that is easy to implement into Laravel.
I have already looked at Urban airship, but it seems hard to implement this with Laravel - Might just be my mad skills.
Pusher, looks easy to implement with laravel, and can only handle in-app/background pushes. But their smallest plan only support 100 connections which seems a little. - 100 logged in users?
Parse seems to work, but if I understand their api I also need to log users into parse's API.
So please share your experiences on push services using Laravel.

in-app
Pusher allows 100 users connected simultaneously. So if you unbind the channel on appstate going to background, you should be fine up to 400-500 users (in my case, I had 2000+ users before I had to upgrade my account to startup). You can find out more about their pricing plans here: Pricing Plans
background
Parse: as of writing this, their status is "service is now shut down".
Urban Airship: I found their library the easiest to implement, and they have a ton of customization that you can apply to your notification (including notification actions).
All that being said, I had a hard time finding a library to for laravel to push the notification for Urban Airship. The only one I found is php-library2, but it's not supported any more, so use with caution.

Related

How to build subscription application with own instance

My question title may not appropriate as I am not so aware of how to call it. I will appreciate it if anyone can edit to fits the query.
I am planning to build a web application where users will subscribe. For instance, CRM or Project management application. I want to have a separate instance and database with a custom domain for enterprise subscribers, and I may have a common database or instance for non-enterprise subscribers. The subscription will be handled through a marketing website, where all subscribers will checkout and have their own account.
Marketing website to subscribe
Application instance / website/ database / etc
Once the subscription period is over and it is not renewed, they will lose access. If they do not renew/reactivate for x time, the instance will destroy itself.
I am quite confident with PHP and MySQL, have some knowledge of AWS and Digital Ocean. I am planning to use Laravel for serverside. However, I am open to other languages as well, such as python.`
Can anyone help me to learn the best approach for the system I want to
make. Pros and Cons and things to be considered? Also, approach to make a mobile application for the subscriber where they can access their own instance.

I am using Laravel in order to make a DBMS for a social network. I need it to make an app. can anyone tell me how? i cant find anything on google

Using Laravel for PHP and DBMS. How do I make an app? (for social networking).
I have googled most of the things but I am really an Amateur and need help.
There are many kinds of apps, so before you start to work on your app, you need to carefully determine what exactly you need. You could write desktop apps for various operating systems, or native mobile apps, or hybrids, or a web application... You name it. Anyway, Laravel is the server-side and it should be as agnostic to the apps as possible. You need to create an API and handle the following things:
CRUD for the database
session (log in, log out, register, password change, user settings)
logical API functions
file transfer protocol usage
push notification (if needed)
As per your requirements, you will need to implement the server-side API in Laravel, which is a PHP-based framework and use an RDBMS, which could be MySQL, SQL Server, Oracle, or a NoSQL database, for instance MongoDB.
Before you implement any apps, you should have a proof-of-concept for the API. You should not invest too much time working out the details of the API, as when you are going to work on a real app, you will notice things to be changed anyway. The API should be accompanied by a playground for testing, maybe a very small app without design where you could send requests to the API. Or you can implement a WebSocket API to have a single, duplex connection. It is up to you.
As about how to write an API, there are many tutorials.

Requirements for laravel real-time apps like gmail and Github

For implementing a real-time application in Laravel like Gmail or Github, in which all things (such as opening new page, sending mail, inbox, submit forms and etc) occur in one page, I did a lot of research and found that I should use Laravel Pusher package. But I think it is not free for large projects.
Also I read https://www.codetutorial.io/laravel-5-and-socket-io-tutorial/ article (and many other articles) that uses redis with NodeJs.
Regardless of Laravel Pusher, my Question is what is best and usual way to implement real-time apps via Laravel?
I am using Laravel 5.2
As #gurghet pointed out, there is a difference between a SPA and a realtime application. Gmail is indeed a real time application instead of a SPA.
API Comes first:
If you are looking into creating REALTIME Applications, then first of all you have to create an API (REST/SOAP). Laravel and Lumen both provide an excellent code base to start your api in no time.
Choosing the right JS framework:
Once you have an API, you will need a JS framework. When it comes to REAL TIME applications, there are just a hand full of frameworks that will give you true flexibility. Angular being on the top, followed by REACT, BACKBONE and meteor.
Angular has lots of fan following/community, so it should be the appropriate choice.
The Perfect PHP Stack:
Laravel + Angular stack is great. Laravel is very flexible so you can do almost any kind of server side scripting with it. It also keeps on inspiring you to write cleaner code each time. While angular is very good with 2 way bindings. Which means that when you pass the same data to a view in different places, angular keeps track of all the changes made to the data. It also has features like PROMISES, where angular doesn't wait to get real data from the db, instead it just assumes that the data should have been updated to the db and just shows you the changes (the ones that it keeps track of) in real time.
The Authentication: The most frustrating part of the whole process, is securely authenticating users i.e passing data from angular to laravel. You will have to use OAUTH or JWT for authenticating users. Although both have been around for a while, but you wont find any good code/guides regarding authentication. I have spent lot of time here, but you can always purchase some bootstrapped / properly configured projects on codecanyon.
Sockets are the key:
No Real Time system can exist without sockets, you cant just keep hitting the db on regular intervals to check for updated values. Here sockets save the day by informing the system that updates are available, upon which you can grab the updated values from db.
Now a days services like pusher, have solved most of the problems and laravel also comes with a built-in api-client for pusher. But you are always free to use opensource softwares to create your own socketing system eg. socket.io.
What you are calling real-time apps are really called single page applications or SPAs. Real-time applications are things such as software for airplanes, trains and stock exchanges.
If you want to create SPA you don't necessarily need pushing services. I would suggest you to take a look at these front-end projects:
Angular js
React js
Vue js

What is Equivalent of Google GCM in Blackberry?

I am using Google Cloud Messaging for Android (GCM) to send data from server to Android Devices. It is working properly , Now i have to do same for Blackberry devices .
I have already googled a lot, but not getting solution.
I am working with PHP code in this project, Need some Suggestions to complete this task.
BlackBerry Push Services may be the solution that you are seeking as it provides a seamless connection between content providers and push-enabled BlackBerry devices.
For server side development, there is first the "Standalone option" that provides control and flexibility to making push messages. It is an agnostic back-end system solution therefore can integrate into existing systems that are using either PHP,.NET,JAVA, etc technologies. With this approach, Push Access Protocol (PAP) will need to be implemented along with other items such as subscription management.
There is also the secondary approach using the "Push Service SDK" which provides two types of options that include client/server side samples to reduce complexity.
"Push Essentials" tier in the Push Service SDK option allows for user subscription, user management, push message validation, and managing result notifications. While the "Push Plus" tier in the Push Service SDK option encompasses "Push Essential" features, it also allows storing push requests so if your push solution receives a result notification, it can then perform status queries locally. "Push Plus" as well allows knowledge of if an end user has received a push message. Both tiers of the Push Service SDK require a JAVA implementation as java encapsulates PAP API thus removing the need to implement a PAP protocol.
Depending on your requirements and how you want to design your application you can use either the Standalone or Push Service SDKs approach.
Hope these suggestions help!

Pubnub multiuser chat

I am developing a multi-user chatting system in php.
I know about push and pull, reverse ajax, comet etc. but mostly we have to configure over our server.
However, I can't access my server to install those scripts because I have shared hosting provider.
So after some research I came to know that pusher, pubnub provides api to have push data on browser.
The question is about pubnub, that they are providing channels to send data to clients, but problem is I want to develop multi-user chat in which the data will sent to only one user not like multicasting chat.
As I think one solution is that to make a unique channel per user, so that data will only sent to that user, but this doesn't seems to be efficient. so any other way to implement multi-user chat system with pubnub ?
or any other suggestions that are better ?
Multi-user Chat System with PubNub
Get Started - PubNub best practice: How to manage private rooms?
You are asking about a Multi-user Chat system with PubNub where the communication style is one-to-one between two users with parallel conversations. Great news! PubNub has a service called PubNub PULSE - provides One-to-One style communication ideal for your Multi-user Chat - http://www.pubnub.com/price (see PULSE section).
PubNub Best Practice - How to manage Private Rooms
Also there is a conversation started here which Mikita mentioned on how to create Multiroom Chat Service, likely similar to Facebook Chat, where you are able to join and sit in on multiple chat rooms - PubNub best practice: How to manage private rooms?
EDIT - UPDATED INFO - MARCH 2018
You use of one channel per user is not inefficient. Use as many channels as you like. They cost you nothing more (or less) with respect to how many channels you use.
The pricing plans mentioned above are obsolete. Please review the PubNub Pricing and the Move Away from Device Counting.

Categories