Invent

Module


Bouncy Radio Center 9 RAJAX Module

So I’ve been working a lot on a feature that has been requested for a LONG time, a feature which seen an early implementation in old versions for a brief period. That’s right, AJAX refreshing of radio data “in page”. Basically this is updating details such as the current song playing, DJ, listeners etc. without having to refresh the page.

This is where i would like to introduce to you the brand spanking new RAJAX module for Bouncy Radio Center v9. RAJAX is short for ‘Radio Asynchronous JavaScript and XML’ and comes bundled with the new Radio Center App.

CaptureRAJAX comes with 2 modes, Auto & Manual, quite simple really, Auto Mode will update the radio data every ‘x’ amount of seconds after the page has loaded, while Manual Mode provides buttons to the right of each block of data, which when clicked, will update the relative information, However, Auto Mode also includes the refresh buttons, allowing for you to check the current song for example as you wish.

In addition to this some protection has been put into place for those people who visit the page, fall asleep and forget all about it. This comes in the form of a Decay time. What this basically does is double the wait time if data has not been updated on a certain RAJAX element. Let me show you in detail, lets assume this check is for the name of the current song playing.

Check Time Since Load Starting Decay Did Data Change? Ending Decay Time To Wait Comments
1 00:00 1 N/A 1 30sec Data is deemed changed as there is no prior response to compare to
2 00:30 1 YES 1 30sec song name changed so decay is reset to default which was already 1
3 01:00 1 NO 2 60sec song name not changed, decay and wait time doubled
4 02:00 2 NO 4 120sec still no change, double again
5 04:00 4 NO 8 240sec no change again, double again
6 08:00 8 YES 1 30Sec ahh, data changed, reset the decay and wait times to default

 

So as you can see, if somebody sits on the page, and the radio goes offline for example, rather than there browser making a request every 30 seconds, it will double the wait and decay time if nothing has changed. This means idle users wont hog up resources making un-needed requests.

In regards to how this works if you have a song for example which is 6 minutes long playing on the radio, it should be caught and updated by check 6, if however you have a song which is say 9 minutes long, check 6 would detect no change and would have to wait an additional 8 minutes before the next check picks up the change, this is not a serious problem, as you could just click the refresh button to update that element and the decay and wait time is reset again.

So that’s most of the technical side sorted, well, at least all you need to know for now. Oh yes, RAJAX will also feed any custom radio hooks, apps, modules that users may create letting you take full advantage of it in your own custom modules whether its inside of the forum scripting or not, RAJAX is there to feed you, and your there to be fed.

Thanks for reading and feel free to leave me your thoughts and comments.

oh, and before i forget you can test RAJAX live over at our development forums http://dev.bouncyservers.co.uk

Until next time, keep it bouncy! (poor attempt at a sign of line)

Read more...

Visit also our social profiles:

Scroll to top