List of projects

Blog

Attempt of fast parsing of the header

Now weborf uses strstr (full text search) when the value of an header is needed. This means that every time it has to read the entire string containing the headers so check if the requested one is there.
I did an attempt to use an array of pointers, pointing to where headers start. And Then comparing only a few bytes, at the beginning of the header. But this method has proven to be slower than using strstr, even on long headers.
On 1st attempt i used strncmp, but it isn't good because it compares the entire string, even if it is clear that they aren't equal. Then i wrote my own C function:

bool strneq(char *a,char *b,int len){
    int i;
    for (i=0;i<len;i++) {
        if (a[i]!=b[i])
            return false;
    }
    return true;
}

But looks like this isn't optimized enough, so strstr still remains faster.

~~DISCUSSION~~

authentication lack

The authentication support is lacking… The script should have all the informations about the request.
Am thinking about using unix sockets and dropping the previous system.

~~DISCUSSION~~

· 2009/07/26 00:53 · LtWorf

100% cpu usage

Apparently from the version in branch 16 to the one in branch 18 a new problem has been introduced.
Benchmark usage will probably cause weborf to use the 100% of the available CPU, slowing down the entire system.
With other tests, it appears that the problem was introduced into branch 17, but that branch generated segmentation faults more often than the new version so the problem wasn't easy to notice.
I'll be working to solve this issue.

~~DISCUSSION~~

· 2009/06/16 21:08 · LtWorf

handling addresses

In branch 18, now merged in trunk, addresses are converted into string format within the thread handling the request, and not in the main thread. This reduces calls to malloc and free, increments the reuse of single buffers and reduces the possibility of faults.

· 2009/06/14 20:20 · LtWorf

Timeouts

Yes. You can open multiple connection to weborf, and if you don't send anything it will just hang waiting for data. And this will generate a denial of service.
I will try to correct this in branch 17.

· 2009/04/23 13:08 · LtWorf

Contacts

E-Mail tiposchi@tiscali.it

Klingon Programmer

Top 10 things likely to be overheard if you had a Klingon Programmer:

  1. A TRUE Klingon Warrior does not comment his code!
  2. By filing this bug report you have challenged the honor of my family. Prepare to die!
  3. You question the worthiness of my code? I should kill you where you stand!
  4. Our competitors are without honor!
  5. Specifications are for the weak and timid!
  6. This machine is GAGH! I need dual Pentium processors if I am to do battle with this code!
  7. Perhaps it IS a good day to die! I say we ship it!
  8. Our users will know fear and cower before our software! Ship it! Ship it and let them flee like the dogs they are!
  9. My program has just dumped Stova Core!
  10. Behold, the keyboard of Kalis! The greatest Klingon code warrior that ever lived!

From: http://www-users.cs.york.ac.uk/~susan/joke/klingon.htm

N more things likely to be overheard if you had a Klingon on your software development team

  1. “I have challenged the entire ISO-9000 review team to a round of Bat-Leth practice on the holodeck. They will not concern us again.”
  2. “C++? That is for children. A Klingon Warrior uses only machine code, keyed in on the front panel switches in raw binary.”
  3. “Debugging? Klingons do not debug. Bugs are good for building character in the user.”
  4. “Defensive programming? Never! Klingon programs are always on the offense. Yes, Offensive programming is what we do best.”
  5. “Klingon programs don't do accountancy. For that, you need a Farengi programmer.”
  6. “Klingon multitasking systems do not support “time-sharing”. When a Klingon program wants to run, it challenges the scheduler in hand-to-hand combat and owns the machine.”
  7. “Klingon function calls do not have 'parameters' - they have 'arguments' - and they ALWAYS WIN THEM.”
  8. “You humans call this thing a 'cursor' and you move it with 'mouse'! Bah! A Klingon would not use such a device. We have a Karaghht-Gnot - which is best translated as “An Aiming Daggar of 16×16 pixels” and we move it using a Gshnarrrf which is a creature from the Klingon homeworld which posesses just one, (disproportionately large) testicle…which it rubs along the ground…..uh do we really need to talk about this?”
  9. “I am without honor…my children are without honor… My father coded at the Battle of Kittimer…and…and…he… HE ALLOWED HIMSELF TO BE MICROMANAGED.” <shudder>
  10. “Klingons do not make software 'releases'. Our software 'escapes'. Typically leaving a trail of wounded programmers in it's wake.”
  11. “Microsoft is actually a secret Farengi-Klingon alliance designed to cripple the Federation. The Farengi are doing the marketing and the Klingons are writing the code.”
  12. “Klingons do not believe in indentation - except perhaps in the skulls of their program managers.”
  13. “You can't truly appreciate Dilbert unless you read it in the original Klingon.”

by Steve Baker http://www.sjbaker.org

wiki/user/ltworf.txt · Last modified: 2008/12/21 17:40 by LtWorf
 
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki