Page 2 of 2 FirstFirst 12
Results 26 to 31 of 31

Thread: What is the future of srl stats?

  1. #26
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    I also would like it if srl stats were linked to the forum account, but I'm not sure if it could be done safely.

    What do people who are more experienced in this think?
    Perhaps the forum software could be extended with a request token functionality. Generate a token that you can put in the script. You send the token with the request, server knows which token belongs to which user -> insert data.

    Quote Originally Posted by Justin View Post
    @J J; Do you have anything on this? I know you have stats with graphs for your scripts
    Just make sure you put a timestamp and runtime for every commit. Using those two you can generate every graph you want Can even make a search function or plot the average xp/h. That's what I've done with my graphs.

    JJ's Willow Chopper
    Code:
    CREATE TABLE jjswillowchopper (
    	id		INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    	time		BIGINT UNSIGNED,
    	runtime		SMALLINT UNSIGNED,
    	xp		SMALLINT UNSIGNED,
    	level		TINYINT UNSIGNED
    );
    Result: http://obduro.org/scriptstats/jjswillowchopper.php
    Can do quite a bit with just 6 columns.

    Or JJ's Fighter.
    Code:
    CREATE TABLE jjsfighter (
    	id		INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    	time		BIGINT UNSIGNED,
    	runtime		SMALLINT UNSIGNED,
    	attack_xp	SMALLINT UNSIGNED,
    	attack_lvl	TINYINT UNSIGNED,
    	strength_xp	SMALLINT UNSIGNED,
    	strength_lvl	TINYINT UNSIGNED,
    	defence_xp	SMALLINT UNSIGNED,
    	defence_lvl	TINYINT UNSIGNED,
    	ranged_xp	SMALLINT UNSIGNED,
    	ranged_lvl	TINYINT UNSIGNED,
    	magic_xp	SMALLINT UNSIGNED,
    	magic_lvl	TINYINT UNSIGNED,
    	hitpoints_xp	SMALLINT UNSIGNED,
    	hitpoints_lvl	TINYINT UNSIGNED
    );
    It now has a total runtime of 49242066 seconds which is 1 years, 6 months, 29 days, 22 hours, 21 minutes, 6 seconds.
    I let the script commit every minute so that is a total of 820701 rows or so.
    Warning: long loading time.. http://obduro.org/scriptstats/jjsfighter.php

    Just make sure you have at very least a timestamp and runtime for every table.
    Hardest part is to make sure it is fast. Eventually you are going to have loads of commits which will make it slow like my jjs fighter graph. So you will have to cache stuff, I'm not sure how to do that.

    Another thing is security. All scripts are open source so you can't really do much in there. Ideally you would put the token in the table so you could easily remove all data from that user if they are abusing the commit method.

    So I would have the following fields AT LEAST for every table:

    Code:
    id
    timestamp
    runtime
    token
    id: auto increment
    timestamp: grab it during the commit, server sided
    runtime: send it from the script (in seconds I'd say)
    token: send it from the script, user has to generate it and can be identified with it.

    EDIT: For the token perhaps do something smart so it stays the same. Base it on username + join date or something and encrypt it. That way you can actually just make a nice php file or something that does this for you. No need to extend the forum software. Make it look like it is a random token. In reality it is based on constant data so you can always identify the user

    Just make sure users won't know what encryption and what data is used. Otherwise they could grab that data from anyone like my username and joindate, encrypt it and commit stats on my name.. Although that wouldn't really be a problem.. But they could commit false stuff and get me banned from SRL Stats :P
    Last edited by J J; 12-23-2013 at 01:29 AM.

    Script source code available here: Github

  2. #27
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    Yes, the anonymous user was quite annoying. Although I feel forcing every single new user to create a stats account is somewhat of a burden. Wouldn't it be much easier if you could somehow use your SRL un/pw? Or is this too risky/hard?
    I think the very first stats system was linked to the forum accounts. Not sure why we moved away from that.

    Quote Originally Posted by Kevin View Post
    I've already started rewriting Stats as a .NET web-app as that should increase ease of feature extension and maintainability in the future. I've ran into snags as there will always be, however, it's definitely coming along. If you'd be willing to host it on the same old vserver of old, that would be great. If not, I'm sure I can find somewhere else to host it and get everything up and running again.

    Hopefully with the .NET direction, I'll be able to add some better GUI functionality and graphs for scripts/users.

    And since I'm doing this... Are there any bits of functionality anyone ever wanted in Stats?
    That's awesome!

    One thing that annoys me about the current stats is you can't remove scripts or script variables.

    Graphs would be awesome though, for sure.

  3. #28
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by J J View Post
    WORDS....
    I would love a Villavu-based secure request token. If I make my own, as I would be an open source project, it would be impossible to create using public information and not still be fakeable.

    I've been debating use of a database versus using custom made local xml files. Databases would be so much easier. but I don't know if the server I'll be able to put it on will also allow for use of a database. I suppose I could always do it the easy way and then do it the hard way later if need be...

    Quote Originally Posted by Coh3n View Post
    I think the very first stats system was linked to the forum accounts. Not sure why we moved away from that.

    That's awesome!

    One thing that annoys me about the current stats is you can't remove scripts or script variables.

    Graphs would be awesome though, for sure.
    My every intention was that I would just use the user ID to match to stats (in your case, #45543 ), or the actual Villavu account name and just translate it to the id. I mean, why not have it be linked and super convenient? I absolutely want the script creator to have the rights to remove their own scripts and/or variables. Although... having something in place to verify that the user is who they say they are would be important, and have to be verified somehow through villavu.

  4. #29
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    My every intention was that I would just use the user ID to match to stats (in your case, #45543 ), or the actual Villavu account name and just translate it to the id. I mean, why not have it be linked and super convenient? I absolutely want the script creator to have the rights to remove their own scripts and/or variables. Although... having something in place to verify that the user is who they say they are would be important, and have to be verified somehow through villavu.
    User ID would be better. People change their username all the time.

    I'm sure we could somehow link the forum accounts, but I'm not sure if @Wizzup?; would want to unless there were extra security measures. You might somehow be able to embed the system in the forums as a plugin, but I really have no idea what's involved with that.

  5. #30
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,691
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    I think the very first stats system was linked to the forum accounts. Not sure why we moved away from that.

    That's awesome!

    One thing that annoys me about the current stats is you can't remove scripts or script variables.

    Graphs would be awesome though, for sure.
    The current system has graphs! See http://wizzup.org/stats/

    http://stats.villavu.com/graph/commi...th/1/year/2012

    It was also quite secure. But I never dared to integrate it with the forum because of grave security concerns. It is much nicer to isolate everything.

    If you want me to host this alternative stats project, then it should run on a normal linux system.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  6. #31
    Join Date
    Apr 2012
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    The current system has graphs! See http://wizzup.org/stats/

    http://stats.villavu.com/graph/commi...th/1/year/2012

    It was also quite secure. But I never dared to integrate it with the forum because of grave security concerns. It is much nicer to isolate everything.

    If you want me to host this alternative stats project, then it should run on a normal linux system.
    Hey, I can't PM / create new threads for some reason. No idea what I'm suppose to do, can you help?

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •