NASA Astronaut Email - Adapt lighttpd proxy and asynchronous client

Key Information

Register
Submit
The challenge is finished.

Challenge Overview

We recently developed two assemblies. A proxy module for lighttpd and an asynchronous http client. The proxy module uses this detached asynchronous client to issue the http request and receives the response through callbacks.

However, lighttpd is single threaded while the asynchronous client uses a different thread to send back the response.

The response is handled by mod_proxy_msrpch_dtn.c function: mod_proxy_msrpch_receive_response.

This function uses the proxy fdevent functions which are not known to be thread safe and might be causing a core dump.

We need to find a solution to mod_proxy_msrpch_receive_response. We need to store the information passed to this method in a thread-safe structure that will be checked from time to time using the lighttpd timer handler.

Find bellow a message from the architect: "I don't think we need to add custom notify/wait mechanism, we can use the lighttpd timer handler (it is called once per second) to check for response, and let time handler signal fd event once it detects response. And the context struct (that holds response buffer and connection status) needs to be made thread safe, so that background thread from space DTN module can write response and connection status safely."

Find attached the proxy integrated with the async client. The configuration file is proxying to WIN-OA9EKDR3KOM. You need to add the following line to /etc/hosts:

54.186.209.35 WIN-OA9EKDR3KOM

When prompted for an user, use: romanoTCq1q / R0m4n0.123

When you call Find attached the proxy integrated with the async client.

the configuration file is pointing to WIN-OA9EKDR3KOM.

You need to add the following line to /etc/hosts:

54.186.209.35 WIN-OA9EKDR3KOM

When prompted for an user, use: romanoTCq1q / R0m4n0.123

In the browser, use https://test.com:8443/rpc/rpcproxy.dll . You should not see a core dump on the server.

test.com is configured according to Deployment Guide.

If needed, request a VM to: romanoTC <romanotc@copilots.topcoder.com>



Final Submission Guidelines

Follow deployment guide attached to this contest.

ELIGIBLE EVENTS:

2014 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30043627