News:

If you need instructions on how to get through the hotels, check out the enclosed instruction book.

Main Menu

Its official :-) I will be employed by Activision-Blizzard as a Community Manager

Farted by CranberryClock, October 16, 2011, 02:26:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AmberArachnidClock

Quote from: CranberryClock;18979673. Not only nerds play. Vin Desiel plays wow... he will fuck you up.

Vin Desiel is a complete nerd, he's just really physically fit.

VCRClock

<Marlin Clock> This thread seems proof positive that divisiveness at any level is usually bad for the Clock Crew.
<PhantomCatClock> are we talking about the same clock crew

Lump Clock

Quote from: SatelliteClock;1898114Vin Desiel is a complete nerd, he's just really physically fit.



CranberryClock

So I got canned today and moved from my position to a shit job. Working on source code is a bit hard, and sometimes shit doesn't work. When it doesn't work you revert it. Everywhere I have ever worked you load the last stable backup if something is not working. Unless you work here. Then some shit fuck boss of yours decides that 100,000+ concurrent connections obviously isn't different than 100 internal testers. Fuck this guy. Point being, shit breaks, we revert down a code revision to have a stable enviroment. This guy faggots up and fires me cause we didn't patch up. GTFO of here...

What was supposed to happen:

Lua is hardcorded into the server. It allows relay functions sent through the irc channels to run set API instructions. Since the API instructions are locked it requires a key from the client which is generated on login and installed into the client on startup, we call them modules. The modules are what protects the server from attacks and other users from automated Lua scripts. These are known as PROTECTED/SIGNED. If someone tries to run a script thats not matching the modules key, it forces a TAINT. We created a new batch of systems which allowed for submission of bug tracking, suggestions etc which synched with a backend on the web admin panel. Awesome right? Ingame->Website->synched. It didn't work.

What really happened when 100,000+ all generated a unique id on the database flow:

Lua while great for scripting sometimes gets a littler overwhelmed. You see the math Lua is a script based high level render. Sometimes it just doesn't work well.


local x = os.clock()
local s = 0 for i=1,100000 do s = s + i end
[COLOR=#FF0000]XXXXX[/COLOR](string.format(&quot;User ID: %.2f\n&quot;, os.clock() - x))  


***XXXXX is a protect function from the source code I cannot reveal.

Thats awesome right.. with a pool sample of 100 people, the chances of each person to the 100,000th number is impossible to none. That means every user of 100 would have to try 100,000 times on logging in to try and get the sane unique player id for the session. In a 100,000 however, this makes it more likely.

Now we have to bring out the big guns:


typedef unsigned __int64 u64;
 double mNanoSecondsPerCount;

 #include "lua.h"
#include "lualib.h"
 #include "lauxlib.h"  

 int prevInit = 0; int currInit = 0;
 u64 prevTime = 0; u64 currTime = 0;
u64 FrequencyCountPerSec;  
LARGE_INTEGER frequencyTemp;
static int readHiResTimerFrequency(lua_State *L) {     QueryPerformanceFrequency(&frequencyTemp);
     FrequencyCountPerSec = frequencyTemp.QuadPart;  
  lua_pushnumber(L, frequencyTemp.QuadPart);
    return 1;
}  
LARGE_INTEGER timerTemp;
 static int storeTime(lua_State *L)
{    
 QueryPerformanceCounter(&timerTemp);
     if(!prevInit)    
 {      
  prevInit = 1;    
     prevTime = timerTemp.QuadPart;  
   }  
  else if (!currInit)
    {        
 currInit = 1;    
     currTime = timerTemp.QuadPart;  
   }  
   else
    {  
      prevTime = currTime;  
       currTime = timerTemp.QuadPart;
    }    
  lua_pushnumber(L, timerTemp.QuadPart);
    return 1;
 }
  static int getNanoElapsed(lua_State *L)
 {    
 double mNanoSecondsPerCount = 1000000000/(double)FrequencyCountPerSec;
     double elapsedNano = (currTime - prevTime)*mNanoSecondsPerCount;  
   lua_pushnumber(L, elapsedNano);  
   return 1;
}
  int luaopen_HighResolutionTimer (lua_State *L)
 {    
  static const luaL_reg mylib [] =  
   {      
  {"readHiResTimerFrequency", readHiResTimerFrequency},{"storeTime", storeTime}, {"getNanoElapsed", getNanoElapsed},    
    {NULL, NULL}
  /* sentinel */  
   };    
  luaL_register(L,"timer",mylib);  
    return 1;
 }



require './HighResTimer'  
start();
 for i = 0, 3000000 do io.write("")
 end
--do essentially nothing 3million times.
stop();  
--divide nanoseconds by 1 million to get milliseconds
executionTime = getNanosElapsed()/1000000;  io.write("playerID: ", executionTime, "ms\n");


This is the fix.. right? No it actually doesn't work because of the way redundancy packets work. When you play a multiplayer game you have to generate multiple sessions incase one drops. Which means we use multiple threads in the case that someone is lagging or your in a raid enviroment. Mind you this is just for the instant play server, not the AUTH or the Database server. So we generated a new style of system which generates the id with a word. A user then has xxxx.time(id). So what was the problem?

A player on multiple realms could theoretically login at the same time generating a duplicate entry thus causing a malposition on the relay server of multiple user names. Think of a game online, have you ever tried to register a name and its taken? So you go to a new realm or server to secure it. Hyptothetically if someone that had your name, and you have your name and you both login at the same time the session id would essentially be the same confusing the login server. Now multiply that by 200+ as each realm has its own unique login database but they all share the same Support database. 200 people with the same name with the chance of logging in at the same time is slim to none.. but it does happen.

So I reverted the change until we could come up with a solution and we pushed a build.

My boss did not like this, and thus I now work in networking side instead of the server management/build side. The fucked up part? He brought it up at a meeting as a problem and they all praised and lauded his effort into preventing a mishap by rolling the code back until we fix it. But I get fired from my position for it.

I need somoene to shoot this guy.

/end rant


AstronautClock

steal the code and start your own better company and bankrupt him

SockpuppetClock

BLOOD FOR THE BLOOD GOD BLOOD FOR THE BLOOD GOD BLOOD FOR THE BLOOD GAWWWDHAWGGHGHGH

patriotclock


d u m p y

Quote from: PatriotClock;1904236Lol the op has the word taint in it

:hi5:

Zeffy


Kodiakclock

Quote from: YoYoClock;1903849
KodiakClock - Super Butt

Kodiakclock

Quote from: YoYoClock;1903849
KodiakClock - Super Butt

FLOUNDERMAN_CLOCK

Quote from: Kodiakclock;1904266yo9ur fired 4 being a FAGGO

I like the random 9 thrown in.

buttplug


Sinister Clock

Quote from: Buttplug;1904276take it up with HR.

No dont istead complain to the interente we will fix your problems I am learning dverajk

miracle fruit

somebody merge this with his first thread about getting hired by blizzard then goldmine it

FLOUNDERMAN_CLOCK

Quote from: MiracleFruitClock;1904521somebody merge this with his first thread about getting hired by blizzard then goldmine it

second