Nexuiz scores tracker web frontend

Discuss anything to do with Nexuiz here.

Moderators: Nexuiz Moderators, Moderators

Nexuiz scores tracker web frontend

Postby Psychcf » Sun Nov 04, 2007 1:48 am

Ok, this is the thread for the nexuiz scores tracker web frontend.

SVN repo: http://svn.psychdesigns.net/nexuiz_scores/
(pm me for an account, if you don't give me a password I'll make a random one)

So, I'll start this off by asking...
* Should we use scores.log or the server log?
* Should we base it on something or start with some code snippets?
Psychcf
Forum addon
 
Posts: 1554
Joined: Sun Dec 03, 2006 11:38 pm
Location: NY, USA

Postby [-z-] » Sun Nov 04, 2007 2:27 am

server.log provides a lot more information than scores.log, so I vote server.log. Also, there is an option that outputs the scores.log information after every match to console but I haven't checked if it writes to the server.log as well. If it does, that'll be great.

I'd like to start with code snippets, build some sort of framework or logic we can all agree on / understand.

I'd like to get this all into a mysql database but I'm not really the guy for that. My buddy said something about using a fifo file to capture the information before it's written to the server.log.


Edit:
Has anyone written a server.log parser yet?
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby Psychcf » Sun Nov 04, 2007 4:36 am

[-z-] wrote:Has anyone written a server.log parser yet?

I wrote a scores.log parser in javascript. It actually performs pretty well. Server.log I haven't yet though. What I'd aim to do is provide both a javascript and non-javascript frontend. Dojo easily allows us to do both.

I'm great with mysql+php. If we take that route though I'd suggest using models big time (google 'MVC' if you don't know what a model is).

I'd take a look at http://stats.enemyterritory.com/ for an idea of what we could do. maybe add/subtract features based on the gamemode played.

tonight I just threw some snipplets in the /dojo/scores folder. Add some stuff in if you want.

Edit: I just committed a bunch of stuff that we can implement.
Psychcf
Forum addon
 
Posts: 1554
Joined: Sun Dec 03, 2006 11:38 pm
Location: NY, USA

Postby [-z-] » Sun Nov 04, 2007 1:43 pm

[TSA] Psychiccyberfreak wrote:I wrote a scores.log parser in javascript.


Parsing with javascript seems like the wrong way to do it, we should parse with a server-side script and insert it into a mysql database. We'll have to come up with some sort of schema we can agree on.

I'm great with mysql+php. If we take that route though I'd suggest using models big time (google 'MVC' if you don't know what a model is).


Are you familiar with Code Igniter? I have some experience with this framework.

I'd take a look at http://stats.enemyterritory.com/ for an idea of what we could do. maybe add/subtract features based on the gamemode played.


Yeah man, I was thinking about taking it a step further and making a our own 'halo like' statistics, creating 'levels' based upon certain statistics.


tonight I just threw some snipplets in the /dojo/scores folder. Add some stuff in if you want.

Edit: I just committed a bunch of stuff that we can implement.


I'll check this out
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby Psychcf » Sun Nov 04, 2007 3:36 pm

I have seen code igniter, but I have not played with it. I've played with django though. (I did the mapping contest site with that)

I agree that we should parse it into a mysql schema. Then we can convert it over to json for the ajax client, or if there is no javascript on the client we can do php scripting.

BTW: where did all the other guys in that thread go?
Last edited by Psychcf on Sun Nov 04, 2007 3:37 pm, edited 1 time in total.
Psychcf
Forum addon
 
Posts: 1554
Joined: Sun Dec 03, 2006 11:38 pm
Location: NY, USA

Postby [-z-] » Sun Nov 04, 2007 3:37 pm

[TSA] Psychiccyberfreak wrote:I have seen code igniter, but I have not played with it. I've played with django though. (I did the mapping contest site with that)

where did all the other guys in that thread go?


O.o I'm not very good with python... and for portability, I suggest we use a php based framework.


Also, have a look at nexuiz/Docs/eventlog.txt, it contains the schema for the server.log that we're going to be parsing.
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby John Galt » Mon Nov 05, 2007 12:20 am

I'm glad this getting some momentum :)

Wish I were a bit better at coding, I'd be glad to hop in.
cat /dev/urandom > /dev/mem
John Galt
Alien
 
Posts: 166
Joined: Thu Jul 19, 2007 9:20 pm
Location: Washington, DC

Postby KadaverJack » Mon Nov 05, 2007 10:51 am

@z: anything written to the console is written to the log file. But there's also an option to write a seprate file for each that only contains the eventlog entries. Using that would be easier and faster since there a lot less data to parse...

And you should probably make the log file parser a separate script written in python/ruby/perl/whatever that can be run by a cronjob, that way the parser could be used by other projects, too. It would be awesome if that script could either use mysql or sqlite, that way you don't always need to use a full blown mysql server...
KadaverJack
Site admin and forum addon
 
Posts: 1102
Joined: Tue Feb 28, 2006 9:42 pm

Postby [-z-] » Mon Nov 05, 2007 1:11 pm

KadaverJack wrote:And you should probably make the log file parser a separate script written in python/ruby/perl/whatever that can be run by a cronjob, that way the parser could be used by other projects, too. It would be awesome if that script could either use mysql or sqlite, that way you don't always need to use a full blown mysql server...


What about using a FIFO file as a middle man? This avoids a cron job and gives inserts the data into the database immediately and cuts down on the parsing overhead.

This is not my specialty, this is what my friend was planning on doing... if someone feels more comfortable in this area, please, take the lead :).
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby KadaverJack » Mon Nov 05, 2007 1:33 pm

[-z-] wrote:What about using a FIFO file as a middle man? This avoids a cron job and gives inserts the data into the database immediately and cuts down on the parsing overhead.

Create a fifo ~/.nexuiz/data/fifo and set "log_file fifo" on the server and use that as input for the parser, no changes needed... However it would be nice if the parser supports both, parisng a server log/console output and multiple eventlog files. However using the new (>2.3) log_dest_udp feature might be a better way to get the console output...
I haven't used sql so far, but if i find the time i might give it a shot... (learning sql is on my todo list anyway)
KadaverJack
Site admin and forum addon
 
Posts: 1102
Joined: Tue Feb 28, 2006 9:42 pm

Next

Return to Nexuiz - General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron