Implement real time features into a symfony2 application? (live dashboard) - php

I have a symfony2 app what stores data in MySql. It's a simple app, I mainly use just php.
In the app there are some administrators and they got a dashboard where they see every activity in the app. You have to refresh the page to see the new activities.
Now I have to make the dashboard real time.
There are some event specific notifications, for example you push a red button on your panel, and in 3 days you have to push it again. If 3 days past and you didn't push it, the administrator who is watching the dashboard now instantly get a notification. The other admins see it too after they watch the dashboard.
And there is the "real real-time" things, you push a blue button on the website and every administrator instantly get a notification on their dashboard, no time delay.
I never worked with real time apps before, so I read a bit in the topic.
I read about pubnub (and its brothers),socket.io and node.js but I'm not sure abou the most efficent model.
Pubnub have SDKs for PHP and socket.io, so I think I can do the real time part, but have no idea how to start the time specific notifications.
On the other hand, maybe I should go with the node.js, and do a long pooling solution, so I constantly read my MySql server with node and push notifications to Socket.io ,but I'm not sure countinously read my database is a good idea.
I know php is not really the language for deamons, I know nothing how it's going with node.
I'm not really asking for code, but for logic, how could I implement this in a smart and efficent way?

Related

Make Android Quiz Multiplayer

I have a Quiz App for Android, it has the API made in php.
It run good for one player, but I need to implement a multiplayer option, my idea is that one user send invitation to a friend, then this friend accept her invitation and the two mobiles start to the same time.
I'm googling and I know that I've to use a room of Google API, but is it true that I have to pay $ 25 to access GCM API?
For can access to API GCM credentials i have use this console (https://play.google.com/apps/publish/signup/) and make developer account...
It's okay? or i don' t understood well?
If i understood well, how can i implement the service that create a Room, i want say, When can i start googling?, if i didn't undestood well, could you explain to me how do?
Please a need help, i'm losing on this theme :(
If you're trying to access Google Play Developer Console, where you can Publish or Manage your apps, you need to pay a one-time fee of $25.
The calls to the Google Play Games Services are free. Since you seem to be creating a real-time multiplayer, check the Quick Game option for Android. However, if you're going to implement REST calls they have the Get Started with Play Games Services for Web guide.

Twitch API Live Callback Service

I am integrating the Twitch user account API into my platform and had a look through the API to see if there was a callback section of some sort to send an update to my server when a user starts streaming, but I can't seem to find any reference for one.
Is there currently any services that offer this sort of thing? If not, what would be the best way of running regular checks on all of my users in my Database to see when they are streaming, of course doing this alone would kill the server with database queries, so I'm stuck as to where to go now.
What I am looking to do is receive a callback and then create a post in a social feed that the user has started streaming.
Based on the discussions at the links below, the API doesn't support webhooks and won't anytime soon. Instead, they expect you to use polling. Basically you would set up a worker process that makes requests periodically, such as every five minutes, then creates appropriate social feed posts, etc. You can batch them together if you have a bunch of channels to check (exaple from from the github issue):
https://api.twitch.tv/kraken/streams?channel=riotgames,dota2ti,machinima,esltv_hearthstone
https://github.com/justintv/Twitch-API/issues/211
https://discuss.dev.twitch.tv/t/notifications-using-twitch-api-and-php/1009

How To Add "User Account" Functionality To Basic PHP Software?

I hired a programmer to make a basic program in for me that is written in PHP.
I am hosting it on my own web host.
It is basically a web crawler that returns data on certain websites that are entered into the database.
This software was created without any "user account" functionality- it is just a single instance that is not even properly protected by a login/password button.
I want to finish developing this cloud-hosted software and then be able to sell it to people on a monthly subscription. Obviously I will need a way to create an account for every person that signs up- so they can each access their own account of the software with their own database of whatever websites they want to enter into the software(in other words just how every cloud software works).
My question is definitely a newb one, but basically I want to know, what technology is used to do this? What kind of program/service/code is used to add simple "user account functionality to a basic cloud software?
P.S. I would ask the guy who made it but he took my money and ran after making a a piece of junk.
The way that this is done is to modify the PHP to add a login feature. There is unlikely to be an out of the box solution that will work. Rather than having to create a new database every time someone signs up, you would modify the existing database to add a user column to each table, and then update the code to only display the data for the currently logged in user.
Unless you want to spend a few months learning PHP and whatever database you are using, you're going to want to hire another programmer to do this for you. Someone good would charge $200-300 for this. Or you can try taking the lowest bidder for $50 or so, and hope they don't run off too.

Sound notification push direct to my users

This question is not a 'do it for me question' I have spend ages and ages on google trying to find a solution or service
I am basically trying to create a notification on my website that I can push to the server and play to my users as and when I need to alert them,
I have a website where my users will react when I have posted information and I need to alert them with sound increasing their reaction time.
Im using a Joomla 3.2.3 based website
This is previously dicussed here and here
I think it is probably most viable to write an ajax-based module that query the server every X seconds, and pop up notifications if there are any. Using websockets is probably a lot more work,
regards Jonas

Regularly polling multiple API for a push notification iOS App

I apologize in advance if this question is too subjective.
I am working on an iOS app that allows users to search through multiple API's to find a result, and then get a push notification when results similar to the ones the user signed up for are found in those APIs.
I am comfortable with the iOS part of the app, but what I am curious about is how should I handle polling multiple API's regularly to see if any of the signed up for topics have received a new item.
The first thing that I imagine is that if a user signs up, for example, to receive notifications when a new X is available, I would have a web server that would go through each of the signed up topics for each user every X minutes, if there is a new result then send a push notification to the user. Even though I have little experience doing such a thing, I know that this will probably be very taxing on the server, and will only get worse as the user base expands.
So rather than periodically querying the API's in the background, how could I go about doing this? As far as I know, the API's I would be use do not allow for push notifications to my server from the API.
Thanks in advance,
Will

Categories