Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

How would you go about creating a site like this?

  • 12-11-2013 11:36pm
    #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,643 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,643 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,336 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,643 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,336 Mod ✭✭✭✭croo


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


  • Registered Users, Registered Users 2 Posts: 2,032 ✭✭✭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