Jump to content
Sign in to follow this  
oktane

RSS Feed for Beta Patches

Recommended Posts

Jman;1426118']Suggestion.

Why not use:

http://www.arma2.com/beta-patch.php

instead of your own page:

http://www.506th-pir.org/scripts/beta-patch.php.htm

that way it will keep the feed up to date.

Wow, snarky aren't you!

I was trying not to pound bis's servers when I was coding the part that scrapes BIS's page, so i saved a local cache of the file, which I forgot to remove late last night. I suspected something was going on with BIS's page because after so many refreshes, it would serve blank on me. I will have to implement a caching mechanism tonight after work. (the log files are already cached of course, since they are ftp'd) I put it back to the proper url now to scrape the data from. Also i'll work on getting the datestamp from the ftp and put it on the XML item.

Edit: the blank pages were caused by me having too short of a timeout value on the curl fetch.

Edited by oktane

Share this post


Link to post
Share on other sites

Don't appear to intentionally be snarky, I was just getting to the point ;)

Nice job oktane gg.

Share this post


Link to post
Share on other sites

Hmm hey, is this now updated, ie working?

I was really happy to get RSS feed for the beta's, then I was really disappointed to see new beta in the forum but nothing on the RSS...

Share this post


Link to post
Share on other sites

Give me a few hours to work the bugs out and implement a caching routine.. I think i'm only going to scrape the page 1/2 or once an hour at max and cache the result in the meantime. Right now its scraping bis's page every time so its really slow. (any calls to an external http host are normally slow in php)

Edit

OK, might want to delete your old messages and resubscribe if you had a bunch of dupes. First time writing an app that generates RSS. A friend said that his reader Thunderbird was making a lot of copies, I think the GUID tag I added should fix that. Also the changelog detection works again, if it doesn't have a changelog, that is noted. And dates are added. The dates represent the file modified date from the log on the ftp server. (which logically will be stamped when the automated build system generates that build)

Also, the page's final output is cached locally and only refreshed every 10 minutes.

Edited by oktane

Share this post


Link to post
Share on other sites

I made your RSS into a Windows sidebar gadget (I actually just edited one I had already made for a forum I work on), it will work with either Windows Vista or Windows 7.

It would be great if someone could add an alternative link for it (Once it's all working right).

2h502yp.png

Download it here

It seems to take a while to show the entries, maybe something to do with your RSS feed. I stuck a couple of links in the settings page too (Control Panel, PMs and BiStudio).

EDIT: Seem to be having problems on it, are you blocking flood attempts? The gadget is set to refresh the list every 5 minuted, which I can change to 1 hour if needed. What's a safe refresh interval to use before being blocked? (You could always edit the gadget yourself if you want to).

Edited by psychokilla

Share this post


Link to post
Share on other sites
Give me a few hours to work the bugs out and implement a caching routine.. I think i'm only going to scrape the page 1/2 or once an hour at max and cache the result in the meantime. Right now its scraping bis's page every time so its really slow. (any calls to an external http host are normally slow in php)

Edit

OK, might want to delete your old messages and resubscribe if you had a bunch of dupes. First time writing an app that generates RSS. A friend said that his reader Thunderbird was making a lot of copies, I think the GUID tag I added should fix that. Also the changelog detection works again, if it doesn't have a changelog, that is noted. And dates are added. The dates represent the file modified date from the log on the ftp server. (which logically will be stamped when the automated build system generates that build)

Also, the page's final output is cached locally and only refreshed every 10 minutes.

Seems to work nicely now, thanx!

Share this post


Link to post
Share on other sites

There's still some bugs to work out. Today in my work Outlook i had an error 'item' from the feed... i need to make some error checking and send a previous version if there is a error or something. (while also notifying me)

If you knew how this thing worked you'd laugh!

See godaddy is very stringent on what you can and can't do with PHP, they don't let your scripts communicated with anything external unless its port 80 or SSL.

This means that I cannot run a game server query script on the web host. It also means I cannot actually get the log files from BIS's FTP from the PHP script, it fails to connect!

So, get this. I end up using another HTTP server (with unmolested PHP) as a go between for FTP traffic, sigh. I had to do this for my sig image server query too. :(

To begin, the Godaddy script scrapes the beta page on BIS's site and parses it with curl. It gets all the URL's and such.

Next the chaos starts, The GoDaddy host (the script the client connects to) query's the unfettered host for the file, it sends the FTP location on the URI too. The unfettered host sees if it has a cached copy, and if not, it gets it via FTP. In either case, it feeds back the changelog along with the file modified date back to godaddy. Lame godaddy server now has the info it needs and bless the godaddy lords, they allow me to write files out so I cache that result (the changelog and timestamp) to a local file.

After that, some array_diff's take place to determine the differences in all the changelogs and generate the XML. And then the whole script output is send to a cache file, which only allows the whole script to run every 10 minutes.

I've tried to make this as simple as possible! (laugh) Damn you godaddy for forcing me to make so many points of failure! I am forced to use them because it is the only 'high capacity' web service available to me. I don't want to use a game server or something, web stealing the bandwidth from the game server would be bad.

I'm also having problems doing my 'continual beta' development method (I didn't learn formally or anything) specifically with RSS. If I make mistakes or some error happens, all the RSS clients querying the feed may get an item (entry) which has errors in it. And even after I fix them, it may not get the updated item. So sorry if that happens anyone. :(

---------- Post added at 10:39 PM ---------- Previous post was at 08:51 PM ----------

I made your RSS into a Windows sidebar gadget (I actually just edited one I had already made for a forum I work on), it will work with either Windows Vista or Windows 7.

It seems to take a while to show the entries, maybe something to do with your RSS feed. I stuck a couple of links in the settings page too (Control Panel, PMs and BiStudio).

EDIT: Seem to be having problems on it, are you blocking flood attempts? The gadget is set to refresh the list every 5 minuted, which I can change to 1 hour if needed. What's a safe refresh interval to use before being blocked? (You could always edit the gadget yourself if you want to).

Hey thats cool, I'll use that.. I have a sidebar gadget that I made for myself that monitors our 506th Arma2 servers, so it can go right next to it. :)

No i don't do any throttling, you can refresh it as much as you like. 5 minutes is reasonable, although you won't get a change since I cache the output every 10 minutes. So i'd set it to 10 minutes. You have to figure once every 10 minutes, times the number of people that install it (who knows, couple hundred?) Its not that much traffic.

If you go to http://www.506th-pir.org/scripts/a2betafeed/feed.xml in your firefox, you can easily see that the feed appears to be working.

In your gadget, i noticed that the url

oXml.open( "GET", "http://www.506th-pir.org/scripts/a2betafeed/feed.xml/", true );

should be

oXml.open( "GET", "http://www.506th-pir.org/scripts/a2betafeed/feed.xml", true );

but that still didn't make it work... hmm. I bet it is javascript pooping out on some character that needs to be escaped. Because it works fine with say Wired Magazine's RSS feed. I ran my feed into the XML/RSS validator and it said it was ok, I don't get it. Debugging gadgets is a pain, Visual studio can attach to them (with IE script debugging on) but for some reason never displays the correct code location even if you have the source files loaded.

---------- Post added at 11:59 PM ---------- Previous post was at 10:39 PM ----------

Okay I think I found out what the problem is. I'll clean up the caching function so it doesn't break the gadget (something about headers I think) and make the gadget a nice net citizen by looking at the last modified date if I can.

Edited by oktane

Share this post


Link to post
Share on other sites

Yeah I'm not sure what's wrong either, the same code works fine with the forum I made it for.

I get this when I try to capture the RSS feed :

oruxxx.png

It's weird tho cos the first time you run it, it captures the feed fine. Then at the next refresh it fails.

See, here it is working :

ezis01.png

The date/time stamps should be useful for tracking progress too ;)

Meh, I'm sure we'll work it out.

Edited by psychokilla

Share this post


Link to post
Share on other sites
Yeah I'm not sure what's wrong either, the same code works fine with the forum I made it for.

It works now after some changes with the chaching code, which was killing it for whatever reason. I'm now sending proper headers and buffering output.

It works like this:

Is page modified since last run or 10 minutes old?

If yes:

Check if BIS page scrape is older than 10 minutes

If yes, grab new version and send to curl

If no, serve cached version to curl

For each entry, check if log file exists locally (no, if new entry)

If no: fetch from BIS's FTP via hackass server transfer because of godaddy

If yes, serve up log since they don't change, no caching needed.

Now generate XML

If no:

Tell browser its already got the right version via headers or send it cached ver if it insists.

So as you can see there are two levels of caching, one for me executing the xml generation code, one for BIS. Both set to 10 minutes.

here is your gadget http://www.506th-pir.org/scripts/a2betafeed/Arma2.gadget

I am actually working on a different gadget, it might not be as fancy as yours but it is based on the default windows 7 rss feed one with the side flyout for the changelog. I just need to make the flyout bigger to accommodate the size and fix the links.

a2beta_flyout.jpg

I will update the first post.

Edited by oktane

Share this post


Link to post
Share on other sites

I believe the 58932 patch release came through OK from the rss feed, although again I found it first on the forum, but I believe that was just a blind luck.

So good work so far, this RSS is indeed appreciated.

Share this post


Link to post
Share on other sites

Very nice work, thanks so much ;)

The thing I like the most is that clicking the link on the gadget actually downloads that beta. I do agree people may prefer your version cos it gives the info for each build but as long as they have the ease of use of a gadget I'm sure it will help ;)

I added a new post for our gadgets, PM me once you complete yours and I'll add the link in there. I've posted the link to your hosting but I'll be uploading my gadget to the Microsoft Gadget Gallery then I'll change the link to that to save your traffic ;) I'd advise you to do the same with yours although they might take unkindly to you editing theirs :P

Edited by psychokilla

Share this post


Link to post
Share on other sites

Haw, its ok, MS can come after me.

I don't mind hosting your version, but if you need me to update it or remove it because of a new version, just pm me.

Yeah for mine and possibly yours I want to add a sound when a new version comes in (like ding) and maybe a highlight on the new item until it is clicked. For the flyout, you can download the file in there.

Very nice work, thanks so much ;)

The thing I like the most is that clicking the link on the gadget actually downloads that beta. I do agree people may prefer your version cos it gives the info for each build but as long as they have the ease of use of a gadget I'm sure it will help ;)

I added a new post for our gadgets, PM me once you complete yours and I'll add the link in there. I've posted the link to your hosting but I'll be uploading my gadget to the Microsoft Gadget Gallery then I'll change the link to that to save your traffic ;) I'd advise you to do the same with yours although they might take unkindly to you editing theirs :P

---------- Post added at 08:10 PM ---------- Previous post was at 08:03 PM ----------

I believe the 58932 patch release came through OK from the rss feed, although again I found it first on the forum, but I believe that was just a blind luck.

So good work so far, this RSS is indeed appreciated.

Something is still going amiss..

If you notice, 58932 has a changelog with two dates in it, that is wrong.

Then the next build 58946 has the full changelog, when it should just have the comparison from the previous one. sigh.

Also the dates aren't GMT maybe, they are BIS time?.. So I think I might have to convert them. I don't know how an RSS feed reader handles that.

Share this post


Link to post
Share on other sites

Something is still going amiss..

If you notice, 58932 has a changelog with two dates in it, that is wrong.

Then the next build 58946 has the full changelog, when it should just have the comparison from the previous one. sigh.

For whatever reason, Bis decided to change their 'build numbers' or whatever they are. If you compare 946 to 932, the numbers are different for identical items.. are these not 'issues' or build numbers? I don't know why they changed them but I'll just ignore that. It does mess up that build #'s diffs but whatever. :bounce3:

Share this post


Link to post
Share on other sites

In log I dont see a fix for medic healing you twice. I mean you tell your medic to heal you and when he is done, your character goes trough same healing animation again. I hope this will be sorted out untill 1.05.

Share this post


Link to post
Share on other sites
In log I dont see a fix for medic healing you twice. I mean you tell your medic to heal you and when he is done, your character goes trough same healing animation again. I hope this will be sorted out untill 1.05.

Wrong thread.

Share this post


Link to post
Share on other sites

Great little tool.

Is it possible to also get the latest patch at the top or something?

So you would have a linkt to 1.04 and all the beta pacthes.

When they switch to let say, 1.05 it will be on top?

Just a suggestion and I don't know if it's useful for any other than me. But I think it would be cool.

Share this post


Link to post
Share on other sites
Great little tool.

Is it possible to also get the latest patch at the top or something?

So you would have a linkt to 1.04 and all the beta pacthes.

When they switch to let say, 1.05 it will be on top?

Just a suggestion and I don't know if it's useful for any other than me. But I think it would be cool.

What do you mean? Like a link to the regular patch 1.14?

If you look at other RSS feeds, each item is an 'event' or 'news item' and I try to adhere to that standard too. Since all of this is generated off of this simple page, I would have to add some other page for the main patch, and I think it would complicate it. It is already held together with lots of tape. :D

Most people know when a new patch comes out because all server admins get the word thru the grapevine and servers start updating.. then you see the red X in the server list, and also it says 'a new patch is available' when you are in the server list I think.

---------- Post added at 01:08 PM ---------- Previous post was at 12:41 PM ----------

Also, I noticed a problem when using IE to view the feed.. it doesn't like FTP urls. So if you use IE favorite as the feed.. you can't click the links to get the beta which sucks, instead it takes you to www.506th-pir.org. Sorry but MS doesn't like FTP urls like every other reader does. I recommend using firefox, a stand alone feed reader, or the gadgets if you can. If you have XP and can't use the gadgets, there are other ways such as Yahoo widgets or Google gadgets. Either of those would have a generic RSS gadget which you could plug in the RSS url into and read it. And if you use iGoogle as your homepage (handy for keeping up to date on armaholic etc), then you can add in the feed there too.

Share this post


Link to post
Share on other sites

ok, thanks for replying!

I usually get the word pretty quick and I always update the servers as long as Steam Clients are up to date.

I have the RSS feed up and going and it seems to work great!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×