Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

How would you go about creating a site like this?

  • 13-11-2013 12:36AM
    #1
    Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭


    Hey,

    I'm working on an application at the moment. It consists of a mobile app, a config website (unimportant for sake of question), and a sort of 'status' site. The status site needs to update whenever the mobile app submits data to the server.

    The mobile app submits its data to a PHP script at the moment. Is there any way for this script to trigger an update on the status site? Like a sort of push notification structure?

    It seems socket.io could do this for me, but I think that would essentially mean having two servers running. Also the other website (that I said was unimportant :pac:) is in PHP so I'd like to stick with this language if possible.

    The alternative is to just have the status page refresh every 2/3 seconds which seems a bit sh*t. Or is it? Maybe a bit of AJAX would be fine?

    Anyone have any insights? Cheers


Comments

  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    If you've no objection to cloud/3rd party services, take a look at firebase.com


  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭carlmango11


    Thanks for the suggestion. Funny I've actually just found a similar service called Pusher which I got doing exactly what I need in <5 minutes. It's not free though :(


  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    If I remember correctly, both have a free plan for low volumes.

    If neither suits your requirements, here's a few more

    http://www.leggetter.co.uk/real-time-web-technologies-guide


  • Moderators, Technology & Internet Moderators Posts: 1,337 Mod ✭✭✭✭croo


    I never actually tried but I had thought this was now easily achieved via HTML5's Server Sent Events


  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    croo wrote: »
    I never actually tried but I had thought this was now easily achieved via HTML5's Server Sent Events

    No Internet Explorer support though which pretty much rules out the entire corporate market in Ireland.


  • Advertisement
  • Moderators, Technology & Internet Moderators Posts: 1,337 Mod ✭✭✭✭croo


    Maybe the OP is lucky and not working in corporate Ireland. :)


  • Registered Users, Registered Users 2 Posts: 2,011 ✭✭✭colm_c


    Depending on what you want to do (and it's only for UI purposes), you could store whatever info you need on the realtime setup in a DB/redis/memecache.

    Then just use a js call to read this every x amount of seconds to get it to be (almost) realtime. Effectively this is what sockets io does (although sockets io provides a server and client and is a bit more sophisticated).


  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭carlmango11


    Thanks for the responses and sorry for the delay in replying - haven't had a chance to even look at the project lately.
    colm_c wrote: »
    Depending on what you want to do (and it's only for UI purposes), you could store whatever info you need on the realtime setup in a DB/redis/memecache.

    Then just use a js call to read this every x amount of seconds to get it to be (almost) realtime. Effectively this is what sockets io does (although sockets io provides a server and client and is a bit more sophisticated).

    Thanks, I'll look into this. Or might end up going with a 3rd party.
    croo wrote: »
    Maybe the OP is lucky and not working in corporate Ireland. :)

    One of the lucky ones :pac:


  • Registered Users, Registered Users 2 Posts: 1,266 ✭✭✭Overflow


    Use Pusher: www.pusher.com


Advertisement