diff --git a/README b/README index 67f186c..aa05522 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -$Id: README,v 1.14 2008/02/27 23:39:22 chandrusf Exp $ +$Id: README,v 1.15 2008/03/27 01:35:49 chandrusf Exp $ ibrowse is a HTTP client. The following are a list of features. - RFC2616 compliant (AFAIK) @@ -7,7 +7,7 @@ ibrowse is a HTTP client. The following are a list of features. - Understands HTTP/0.9, HTTP/1.0 and HTTP/1.1 - Understands chunked encoding - Can generate requests using Chunked Transfer-Encoding - - Named pools of connections to each webserver + - Pools of connections to each webserver - Pipelining support - Download to file - Asynchronous requests. Responses are streamed to a process @@ -22,6 +22,26 @@ Comments to : Chandrashekhar.Mullaparthi@t-mobile.co.uk CONTRIBUTIONS & CHANGE HISTORY ============================== +27-03-2008 - * Major rewrite of the load balancing feature. Additional module, + ibrowse_lb.erl, introduced to achieve this. + * Can now get a handle to a connection process which is not part of + the load balancing pool. Useful when an application is making + requests to a webserver which are time consuming (such as + uploading a large file). Such requests can be put on a separate + connection, and all other smaller/quicker requests can use the + load balancing pool. See ibrowse:spawn_worker_process/2 and + ibrowse:spawn_link_worker_process/2 + * Ram Krishnan sent a patch to enable a client to send a lot of + data in a request by providing a fun which is invoked by the + connection handling process. This fun can fetch the data from + any where. This is useful when trying to upload a large file + to a webserver. + * Use the TCP_NODELAY option on every socket by default + * Rudimentary support for load testing of ibrowse. Undocumented, + but see ibrowse_test:load_test/3. Use the source, Luke! + * New function ibrowse:show_dest_status/2 to view state of + connections/pipelines to a web server + 20-02-2008 - Ram Krishnan sent another patch for another hidden bug in the save_response_to_file feature. diff --git a/doc/ibrowse.html b/doc/ibrowse.html index a2bfc19..301dd47 100644 --- a/doc/ibrowse.html +++ b/doc/ibrowse.html @@ -10,15 +10,15 @@
Copyright © 2005-2007 Chandrashekhar Mullaparthi
+Copyright © 2005-2008 Chandrashekhar Mullaparthi
-Version: 1.2.7
+Version: 1.4
Behaviours: gen_server.
Authors: Chandrashekhar Mullaparthi (chandrashekhar dot mullaparthi at gmail dot com).
The ibrowse application implements an HTTP 1.1 client. This module implements the API of the HTTP client. There is one named -process called 'ibrowse' which acts as a load balancer. There is +process called 'ibrowse' which assists in load balancing and maintaining configuration. There is one load balancing process per unique webserver. There is one process to handle one TCP connection to a webserver (implemented in the module ibrowse_http_client). Multiple connections to a webserver are setup based on the settings for each webserver. The @@ -47,10 +47,6 @@ send_req/4, send_req/5, send_req/6.
{save_response_to_file, true}], 1000).code_change/3 | |
finished_async_request/0 | Internal export. |
get_config_value/1 | Internal export. |
get_config_value/2 | Internal export. |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
reply/2 | Internal export. |
rescan_config/0 | Clear current configuration for ibrowse and load from the file + ibrowse.conf in the IBROWSE_EBIN/../priv directory. |
rescan_config/1 | |
send_req/3 | This is the basic function to send a HTTP request. |
send_req/4 | Same as send_req/3. |
send_req/5 | Same as send_req/4. |
send_req/6 | Same as send_req/5. |
set_dest/3 | Sets options for a destination. |
shutting_down/0 | Internal export. |
start/0 | |
start_link/0 | |
stop/0 | |
send_req_direct/4 | Same as send_req/3 except that the first argument is the PID + returned by spawn_worker_process/2 or spawn_link_worker_process/2. |
send_req_direct/5 | Same as send_req/4 except that the first argument is the PID + returned by spawn_worker_process/2 or spawn_link_worker_process/2. |
send_req_direct/6 | Same as send_req/5 except that the first argument is the PID + returned by spawn_worker_process/2 or spawn_link_worker_process/2. |
send_req_direct/7 | Same as send_req/6 except that the first argument is the PID + returned by spawn_worker_process/2 or spawn_link_worker_process/2. |
set_dest/3 | Deprecated. |
set_max_pipeline_size/3 | Set the maximum pipeline size for each connection to a specific Host:Port. |
set_max_sessions/3 | Set the maximum number of connections allowed to a specific Host:Port. |
show_dest_status/2 | Shows some internal information about load balancing to a + specified Host:Port. |
spawn_link_worker_process/2 | Same as spawn_worker_process/2 except the the calling process + is linked to the worker process which is spawned. |
spawn_worker_process/2 | Creates a HTTP client process to the specified Host:Port which + is not part of the load balancing pool. |
start/0 | Starts the ibrowse process without linking. |
start_link/0 | Starts the ibrowse process linked to the calling process. |
stop/0 | Stop the ibrowse process. |
stop_worker_process/1 | Terminate a worker process spawned using + spawn_worker_process/2 or spawn_link_worker_process/2. |
terminate/2 | |
trace_off/0 | Turn tracing off for the ibrowse process. |
trace_off/2 | Turn tracing OFF for all connections to the specified HTTP
@@ -100,12 +116,15 @@ send_req/4, send_req/5, send_req/6.
code_change() -> term() -finished_async_request/0+get_config_value/1+
+ get_config_value() -> term() +Internal export + +get_config_value/2
- finished_async_request() -> term() -Internal export. Called by a HTTP connection process to - indicate to the load balancing process (ibrowse) that an - asynchronous request has finished processing. +get_config_value() -> term() +Internal export handle_call/3
@@ -127,12 +146,18 @@ send_req/4, send_req/5, send_req/6.
-init() -> term() reply/2+rescan_config/0
- reply() -> term() -Internal export. Called by a HTTP connection process to - indicate to the load balancing process (ibrowse) that a synchronous - request has finished processing. +rescan_config() -> term() +Clear current configuration for ibrowse and load from the file + ibrowse.conf in the IBROWSE_EBIN/../priv directory. Current + configuration is cleared only if the ibrowse.conf file is readable + using file:consult/1 + +rescan_config/1+
+
rescan_config() -> term() +send_req/3
@@ -205,47 +230,97 @@ send_req/4, send_req/5, send_req/6.
Same as send_req/5. All timeout values are in milliseconds. +send_req_direct/4+
+ send_req_direct() -> term() +Same as send_req/3 except that the first argument is the PID + returned by spawn_worker_process/2 or spawn_link_worker_process/2 + +send_req_direct/5+
+ send_req_direct() -> term() +Same as send_req/4 except that the first argument is the PID + returned by spawn_worker_process/2 or spawn_link_worker_process/2 + +send_req_direct/6+
+ send_req_direct() -> term() +Same as send_req/5 except that the first argument is the PID + returned by spawn_worker_process/2 or spawn_link_worker_process/2 + +send_req_direct/7+
+ send_req_direct() -> term() +Same as send_req/6 except that the first argument is the PID + returned by spawn_worker_process/2 or spawn_link_worker_process/2 +set_dest/3
- set_dest(Host::string(), Port::integer(), Opts::opt_list()) -> ok -
Sets options for a destination. If the options have not been
- set in the ibrowse.conf file, it can be set using this function
- before sending the first request to the destination. If not,
- defaults will be used. Entries in ibrowse.conf look like this.
- set_dest() -> term() +Deprecated. Use set_max_sessions/3 and set_max_pipeline_size/3 + for achieving the same effect. + +set_max_pipeline_size/3+
+ set_max_pipeline_size(Host::string(), Port::integer(), Max::integer()) -> ok +Set the maximum pipeline size for each connection to a specific Host:Port. + +set_max_sessions/3+
+ set_max_sessions(Host::string(), Port::integer(), Max::integer()) -> ok +Set the maximum number of connections allowed to a specific Host:Port. + +show_dest_status/2+
+ show_dest_status() -> term() +Shows some internal information about load balancing to a + specified Host:Port. Info about workers spawned using + spawn_worker_process/2 or spawn_link_worker_process/2 is not + included. -shutting_down/0+spawn_link_worker_process/2
- shutting_down() -> term() -Internal export. Called by a HTTP connection process to - indicate to ibrowse that it is shutting down and further requests - should not be sent it's way. +spawn_link_worker_process() -> term() +Same as spawn_worker_process/2 except the the calling process + is linked to the worker process which is spawned. + +spawn_worker_process/2+
+ spawn_worker_process(Host::string(), Port::integer()) -> {ok, pid()} +Creates a HTTP client process to the specified Host:Port which
+ is not part of the load balancing pool. This is useful in cases
+ where some requests to a webserver might take a long time whereas
+ some might take a very short time. To avoid getting these quick
+ requests stuck in the pipeline behind time consuming requests, use
+ this function to get a handle to a connection process. start/0start() -> term() -Starts the ibrowse process without linking. Useful when testing using the shell start_link/0
-
+start_link() -> term() -start_link() -> {ok, pid()} +Starts the ibrowse process linked to the calling process. Usually invoked by the supervisor ibrowse_sup stop/0stop() -> term() -Stop the ibrowse process. Useful when testing using the shell. + +stop_worker_process/1+
+ stop_worker_process(Conn_pid::pid()) -> ok +Terminate a worker process spawned using + spawn_worker_process/2 or spawn_link_worker_process/2. Requests in + progress will get the error response {error, closing_on_request} terminate/2
@@ -279,6 +354,6 @@ send_req/4, send_req/5, send_req/6.
- Generated by EDoc, Feb 7 2008, 11:49:30. +Generated by EDoc, Mar 27 2008, 01:03:49. |