Fog Creek Software
g
Discussion Board




Thanks Joel

That meetup was a lot of fun.  You guys really do have a great-looking office.

There were lots of smart, interesting folks there.  I'm very happy I went.  I got a chance to talk about everything from games in education to number theory.  By the way, to the number theory guy (sorry I'm bad with names): I'm sorry I didn't have experience in all of the subjects that we touched on, but I enjoyed getting to hear some of your ideas.

I only wish I had time to talk to more people.  I look forward to the next time you guys want to get together.

By the way, does anybody know if that mod_python guy found anybody to take on his project?

K
Thursday, March 25, 2004

PS:

To the guy I was talking to about continuations and network server programs, here's the example program I was describing:

void main()
{
  // setup
  TCPServer MyServer(80, OnNewConnection);
  // shutdown
}

void OnNewConnection(iostream& connection)
{
  while (!connection.eof())
    {
        char c = connection.get();
        // update your parser state with c
    }
}

So inside the 'get' method (implemented in some subordinate class under TCPServer), there'd be some code that looks like:

if (no data is available) yield;
return (first byte of buffer);

So the state of the whole OnNewConnection process could be suspended and control passed back to the outer TCPServer object, which would reinvoke any continuations stored from other connections waiting for data.  The benefit is in the simplicity of implementation, where you can write the server as if it created a new thread for each connection, but you retain all of the advantages of a single thread context.

K
Thursday, March 25, 2004

hmm sounds like PTH.

PTH
Thursday, March 25, 2004

Hmm, that's an interesting project.  I hadn't seen that one before.  Yeah, maybe you could do the same thing with PTH, I'll take a look at it.

K
Thursday, March 25, 2004

Isn't "PTH" the last thing you hear before a pubic hair hits the ground?

George Illes
Thursday, March 25, 2004

*  Recent Topics

*  Fog Creek Home