BATTLEZONE COMMUNITY FORUMS

Battlezone I & II Download, Gaming & Development
It is currently November 21st, 2017, 1:35 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: August 19th, 2015, 4:10 pm 
User avatar
Offline

Joined: October 19th, 2011, 3:11 pm
Posts: 1837
Location: Tier 1.99
Never lol


Top
 Profile  
 
PostPosted: August 19th, 2015, 5:05 pm 
User avatar
Moderator
Offline

Joined: November 28th, 2010, 4:03 am
Posts: 1985
Location: Stafford, UK
Likely never. They're down until further notice.

_________________
Image
The Battlezone Wiki needs your help!


Top
 Profile  
 
PostPosted: August 31st, 2015, 5:18 am 
User avatar
Offline

Joined: December 4th, 2004, 10:25 pm
Posts: 670
Just wanted to poke here and say I've set up a raknet server. I sent a PM to Vearie about list proxying but he hasn't gotten back to me yet. I've rigged my list to proxy the list on kebbz-net and list the games from both. I believe we could probably set up all the game lists with this logic so that we keep a distributed network.

See:

http://raknetsrv2.iondriver.com/testServer?__gameId=BZ2

http://raknetsrv2.iondriver.com/testSer ... roxy=false

http://raknetsrv2.iondriver.com/testSer ... ource=true

The proxy bypass value is there for use when other game lists are calling this one for inclusion. Any list that chooses to implement such a feature would need a switch to turn proxying off for when it is proxied.

Edit: Waiting for Vearie to get back to me with actual replies rather then trolling, unless he's not kidding when he says he wants to destroy the community. (-|
It's my olive branch, because I'm sure in the future if we don't create this integrated system any parties not part of it will fall to disuse.

Edit2: I will need to try to write a bit of proxy code PHP with db-cache this weekend.


Top
 Profile  
 
PostPosted: September 2nd, 2015, 9:07 pm 
User avatar
Admin
Offline

Joined: February 20th, 2006, 7:40 pm
Posts: 1660
Location: Earth
Quote:
I believe we could probably set up all the game lists with this logic so that we keep a distributed network.


A distributed network is indeed, a brilliant idea. thanks for working toward this Neilk1.

_________________
"Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind."
... unless you are logged into BZ2MAPS and those of us who mind matter and those who don't mind matter less! [-X


Top
 Profile  
 
PostPosted: September 13th, 2015, 7:06 pm 
User avatar
Offline

Joined: December 4th, 2004, 10:25 pm
Posts: 670
I got distracted by another project but I've still got this distributed thing on my short todo list.


Top
 Profile  
 
PostPosted: September 13th, 2015, 8:27 pm 
User avatar
Offline

Joined: October 19th, 2011, 3:11 pm
Posts: 1837
Location: Tier 1.99
John Klein please chill the fuck out, lord vearie (tier 1) will reply to you when he so wishes


Top
 Profile  
 
PostPosted: September 14th, 2015, 1:57 am 
User avatar
Moderator
Offline

Joined: May 26th, 2009, 1:51 pm
Posts: 814
Mortarion wrote:
John Klein please chill the f**k out, lord vearie (tier 1) will reply to you when he so wishes


Mort, you insolent lil' twit get down and worship the man who is helping to keep your silly game going! Ha ha, chitty chitty bang bang. Edgrr... :ymparty:

_________________
BZII Modeling tutorials for model making igits like you?


Top
 Profile  
 
PostPosted: September 14th, 2015, 4:11 am 
User avatar
Offline

Joined: December 4th, 2004, 10:25 pm
Posts: 670
Mortarion wrote:
John Klein please chill the f**k out, lord vearie (tier 1) will reply to you when he so wishes

You're way behind on things, Vearie got back to me like day of that post. I was just doing some trolling and god damn you're the only person to take that bait. He sent me a pastebin link over a week ago and looking at it it's probably public and I just didn't know where to find it.

I've got the code and stuff, I just haven't written the cache routine yet. Vearie made the bright suggestion to use the database for the cache in this situation (via PM) so I am trying to decide if I need to go so far as a BLOB to cache the external requests or if I can just use a VARCHAR of a reasonable size. I need to check how flexible mysql's BLOB is, it probably is the best for this.

I'm thinking I will set it up with a string array in the PHP where you can place a pile of other raknet server URLs. That way it would be easy to add to the set. Of course I'd want to pass the requester's IP into the external requests as the IP for geocoding in case any of the raknet nodes choose to implement geo-limited results. That is very unlikely to effect BZ2 though but it's a case of basic completeness.

I'm also trying to decide if the URL I have set for my server is the one I want to keep it at. I can't move it once it's being referred to by other raknet scripts (well I can, but it would be a bit annoying for everyone).

Any opinions or input?

Also what are your thoughts on how long to allow the proxy calls to delay the response? 1 second works, but it might be a bit short if we ever managed to get more games played. The issue is that whatever I set it for that's how long the thing would take to reply if one of the nodes went down. So if the nodes normally reply in 1 second, and I set it for a 10 second timeout, then if one of the nodes goes down it would take 10 seconds before you got your game list even if all the other nodes replied in just 1 second. It might just be something we tweak if it turns out to be an issue. I'll set it low to 1 second to start just for speed's sake.

PS: I think 'lord vearie' might be a plumber now or something. If true I motion you commence with jokes about laying pipe.


Top
 Profile  
 
PostPosted: September 20th, 2015, 8:30 pm 
User avatar
Offline

Joined: December 4th, 2004, 10:25 pm
Posts: 670
OK, I've got this working on my test server. My test server somewhat sucks in that it can't accept DELETE commands (unlike the server where I put my proper list) so games will only be removed from it via timeout. This is just a test, let me know if it explodes or anything of that sort.

With Proxy: http://raktest.nielk1.com/testServer?__gameId=BZ2
Without Proxy: http://raktest.nielk1.com/testServer?__ ... Z2&noproxy (This is needed for when other lists try to proxy this one.)

New variables:
Code:
$proxy_list = Array(
   iondriver => "http://raknetsrv2.iondriver.com/testServer?__gameId=BZ2&__excludeCols=__rowId,__city,__cityLon,__cityLat,__timeoutSec,__geoIP,__gameId&__pluginProxy=false&__pluginIP={IP}&__geoIP={GeoIP}",
   bz2maps => "http://gamelist.kebbz.com/testServer?__gameId=BZ2&__excludeCols=__rowId,__city,__cityLon,__cityLat,__timeoutSec,__geoIP,__gameId&noproxy&__geoIP={GeoIP}",
);
$proxycacheagelimit = 30;
$proxy_timeout = 10;

(Obviously bz2maps wouldn't refer to itself, this is just from my testing.)

Would anyone like to check over the code and such? I would have preferred it if Vearie did having made the original I modified but he seems to have moved on from programming, at least by his own admission. I can get this onto github and we can try to do some code cleanup so we're sure it's safe and then we can get it deployed.


Top
 Profile  
 
PostPosted: September 25th, 2015, 5:03 pm 
User avatar
Offline

Joined: October 19th, 2011, 3:11 pm
Posts: 1837
Location: Tier 1.99
we'll need fireblade to look over this code properly i think


Top
 Profile  
 
PostPosted: September 25th, 2015, 5:14 pm 
User avatar
Offline

Joined: December 4th, 2004, 10:25 pm
Posts: 670
It needs some cleanup. Some of the new variables need to be shifted up into the configuration section. We should also consider using prepared queries through mysqli to bulk up security. It's only really safe, IMHO, if you run it on a limited db user with an isolated database without heavy injection checks or query preparation.

https://github.com/Nielk1/battlezone2-r ... ter/mysqli < CODE

Oh, we should probably also add a function check. My server didn't have fetch_all so I needed to throw a hack line in. We should probably encapsilate that in a function so we can write the code to check if fetch_all is implimented and use the backup code in that case.

Code:
//$SQL_Data = $SQL->fetch_all(MYSQLI_ASSOC); $SQL->free();
for ($SQL_Data = array(); $tmp = $SQL->fetch_array(MYSQLI_ASSOC);) $SQL_Data[] = $tmp; $SQL->free();


It might also be possible to swap the cURL loop for a parallel cURL if anyone knows how to do that.


Top
 Profile  
 
PostPosted: March 27th, 2016, 4:45 pm 
User avatar
Offline

Joined: September 23rd, 2014, 2:41 pm
Posts: 389
fireblade where is u at to read this code


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


PLEASE SUPPORT US BY MAKING A DONATION TO BZ2MAPS.US!

ALL DONATIONS WILL GO DIRECTLY TOWARD HOSTING AND SUPPORT COSTS OF BZ2MAPS.US ~ THANK YOU!

Powered by phpBB® Forum Software © phpBB Group
Copyright © 2011 BZ2MAPS.US