Monday, December 08, 2008

autoconf

I submitted another patch to libxr mailing list just now, it is used to fix the small bug in `configure.ac', so that libxr will generate a correct `xr-config.h' when a JSON run-time is found.

I started to contribute to libxr since last Dec., and I consider it my first real participation in OSS development. Yes I've previous experiences writting test suites for openhpi, openipmi and openwsman, during my internship. But frankly speaking, I had few feelings of joy then.

I enjoyed the discussion in E-mail, and I'd like to thank the author of libxr, who gave me a lot of helps.

Labels:

Thursday, December 04, 2008

timeout

Eventually I managed to add a timeout value in the server side code so that an idle connection will be shutdown [patch] within a given time. The patch is much simpler than what's expected, and at the same time, I realized that I did NOT turn libxr back to non-blocking I/O, but non-buffering I/O.

I solved another problem which blocked our development this afternoon. It turned out to be SSL re-handshake problem -- as I guessed. Adding a Squid proxy between our client and server application is not that transparent as we thought, it will request the server program to do SSL re-handshake.

Labels: ,

Wednesday, December 03, 2008

First git branch

I just created my first git branch of libxr with the command line:
# git checkout -b non-blocking
# git commit -a

Of course, the first commit is a patch which turns libxr back to non-blocking I/O. The next step is to setup the time out value of waiting incoming HTTP header.

BTW, I am also planning to spare sometime writing a document about libxr, with XeTeX.

Labels: ,

Tuesday, December 02, 2008

P1 bug

These days I've been occupied by a P1 bug and, unfortunately, the fix is far from ready.

The XML-RPC library we use has a thread pool with each thread serves incoming request, and the thread will not be ripped back to the pool until the client shuts down the connection. The problem is, when the number of established connection prevails the number of worker threads, the following connection will be blocked.

Since the library uses buffered I/O thus blocking, the first step I need to take is to change it back to non-blocking I/O style -- If a connection has been idle for a while, we might have a chance to shut it down.

My brain now is jammed with confusion and I felt quit dizzy, as many newbies who are trying openssl programming. Just too many stuff!
  1. buffered I/O
  2. chained BIO
  3. blocking I/O
  4. non-blocking I/O
  5. BIO with select()

Labels: ,