diff options
author | Loïc Hoguin <[email protected]> | 2016-08-29 12:39:49 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-08-29 12:40:03 +0200 |
commit | c807880f7ac73f813b2660ea81a00f7712a4e793 (patch) | |
tree | ba1d09e9b177f230665a80513b33fbd532000ce4 /_build/static/archives/extend/attachments/20130426 | |
parent | b1df25a7d9cda697513650659b781b55b40898f8 (diff) | |
download | ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.gz ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.bz2 ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.zip |
Add old mailing list archives
Diffstat (limited to '_build/static/archives/extend/attachments/20130426')
3 files changed, 59 insertions, 0 deletions
diff --git a/_build/static/archives/extend/attachments/20130426/09f3ed34/attachment.html b/_build/static/archives/extend/attachments/20130426/09f3ed34/attachment.html new file mode 100644 index 00000000..0e62d4c9 --- /dev/null +++ b/_build/static/archives/extend/attachments/20130426/09f3ed34/attachment.html @@ -0,0 +1,20 @@ +<tt> +<div dir="ltr"><div>Thanks very much !<br></div>Maybe we can use the code:load_file() function I had just found it .<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/25 Loïc Hoguin <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span><br><br> +<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 04/25/2013 05:46 AM, yongboy wrote:<br><br> +<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br> +You know, the OTP's code_change so heavy, sometimes, you just want to<br><br> +debug, or change a little, does not want to rewrite the rel appup file.<br><br> +Any help is appreciated, thanks.<br><br> +</blockquote><br> +<br></div></div><br> +At this time there is no code_change mechanism in Cowboy. Reloading a module works, modifying the protocol options with ranch:set_protocol_options can be used, but it doesn't change the running processes.<span class="HOEnZb"><font color="#888888"><br><br> +<br> +<br><br> +-- <br><br> +Loďc Hoguin<br><br> +Erlang Cowboy<br><br> +Nine Nines<br><br> +<a href="http://ninenines.eu" target="_blank">http://ninenines.eu</a><br><br> +</font></span></blockquote></div><br></div><br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20130426/9d234e27/attachment.html b/_build/static/archives/extend/attachments/20130426/9d234e27/attachment.html new file mode 100644 index 00000000..cbe576b0 --- /dev/null +++ b/_build/static/archives/extend/attachments/20130426/9d234e27/attachment.html @@ -0,0 +1,12 @@ +<tt> +<div dir="ltr"><div><div>I have tested one long-hold webapp, when 512000 user connected, the app used <br></div>6801M memory, 6801M*1024K / 512000 = 13.6K/Connection.<br><br></div><div>Does anyone give me some advice on how to reduce the memory usage per one connection, thanks very much !<br>
<br> +</div><div><br></div>Here is the code snippet:<br><br>start(_Type, _Args) -><br>������� Dispatch = cowboy_router:compile([<br>����������� {'_', [{'_', htmlfile_handler, []}]}<br>������� ]),<br>������� cowboy:start_http(my_http_listener, 100,<br>
<br> +����������� [{port, 8000}, {max_connections, infinity}],<br>����������� [{env, [{dispatch, Dispatch}]}]<br>������� ),<br>������� count_server:start(),<br>������� htmlfilesimple_sup:start_link().<br><br>......<br><br>-module(htmlfile_handler).<br>
<br> +-behaviour(cowboy_loop_handler).<br>-export([init/3, info/3, terminate/3]).<br>-define(HEARBEAT_TIMEOUT, 20*1000).<br>-record(status, {count=0}).<br><br>init(_Any, Req, State) -><br>������� NowCount = count_server:welcome(),<br>
<br> +������� io:format("online user ~p :))~n", [NowCount]),<br><br>������� output_first(Req),<br>������� Req2 = cowboy_req:compact(Req),<br>������� {loop, Req2, State, hibernate}.<br><br>%% POST/Short Request<br>info(_Any, Req, State) -><br>
<br> +������� {loop, Req, State, hibernate}.<br><br>output_first(Req) -><br>������� {ok, Reply} = cowboy_req:chunked_reply(200, [{<<"Content-Type">>, <<"text/html; charset=utf-8">>},<br>
<br> +���������������������������������������������������������������� {<<"Connection">>, <<"keep-alive">>}], Req),<br>������� cowboy_req:chunk(<<"<html><body><script>var _ = function (msg) { parent.s._(msg, document); };</script>����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ">>,<br>
<br> +��������������������������������������������������������������� Reply),<br>������� cowboy_req:chunk(gen_output("1::"), Reply).<br><br>gen_output(String) -><br>������� DescList = io_lib:format("<script>_('~s');</script>", [String]),<br>
<br> +������� list_to_binary(DescList).<br><br>terminate(Reason, _Req, _State) -><br>������� NowCount = count_server:bye(),<br>������� io:format("offline user ~p :(( ~n", [NowCount]).<br><br><br><br></div>
<br> + +</tt> diff --git a/_build/static/archives/extend/attachments/20130426/b1e8ae7a/attachment.html b/_build/static/archives/extend/attachments/20130426/b1e8ae7a/attachment.html new file mode 100644 index 00000000..74c43a61 --- /dev/null +++ b/_build/static/archives/extend/attachments/20130426/b1e8ae7a/attachment.html @@ -0,0 +1,27 @@ +<tt> +Is 13.6K/connection considered a lot? Once you start doing SSL, each connection will be about 80K, IMHO the most important factor for huge ammount of COMET users is latency, which Cowboy and Erlang do great.<div><br></div><br> +<div>-rambocoder<br><br><div class="gmail_quote">On Fri, Apr 26, 2013 at 2:11 AM, yongboy <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br> +<div dir="ltr"><div><div>I have tested one long-hold webapp, when 512000 user connected, the app used <br></div>6801M memory, 6801M*1024K / 512000 = 13.6K/Connection.<br><br></div><div>Does anyone give me some advice on how to reduce the memory usage per one connection, thanks very much !<br><br> +<br> +</div><div><br></div>Here is the code snippet:<br><br>start(_Type, _Args) -><br>������� Dispatch = cowboy_router:compile([<br>����������� {'_', [{'_', htmlfile_handler, []}]}<br>������� ]),<br>������� cowboy:start_http(my_http_listener, 100,<br><br> +<br> +����������� [{port, 8000}, {max_connections, infinity}],<br>����������� [{env, [{dispatch, Dispatch}]}]<br>������� ),<br>������� count_server:start(),<br>������� htmlfilesimple_sup:start_link().<br><br>......<br><br>-module(htmlfile_handler).<br><br> +<br> +-behaviour(cowboy_loop_handler).<br>-export([init/3, info/3, terminate/3]).<br>-define(HEARBEAT_TIMEOUT, 20*1000).<br>-record(status, {count=0}).<br><br>init(_Any, Req, State) -><br>������� NowCount = count_server:welcome(),<br><br> +<br> +������� io:format("online user ~p :))~n", [NowCount]),<br><br>������� output_first(Req),<br>������� Req2 = cowboy_req:compact(Req),<br>������� {loop, Req2, State, hibernate}.<br><br>%% POST/Short Request<br>info(_Any, Req, State) -><br><br> +<br> +������� {loop, Req, State, hibernate}.<br><br>output_first(Req) -><br>������� {ok, Reply} = cowboy_req:chunked_reply(200, [{<<"Content-Type">>, <<"text/html; charset=utf-8">>},<br><br> +<br> +���������������������������������������������������������������� {<<"Connection">>, <<"keep-alive">>}], Req),<br>������� cowboy_req:chunk(<<"<html><body><script>var _ = function (msg) { parent.s._(msg, document); };</script>����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ">>,<br><br> +<br> +��������������������������������������������������������������� Reply),<br>������� cowboy_req:chunk(gen_output("1::"), Reply).<br><br>gen_output(String) -><br>������� DescList = io_lib:format("<script>_('~s');</script>", [String]),<br><br> +<br> +������� list_to_binary(DescList).<br><br>terminate(Reason, _Req, _State) -><br>������� NowCount = count_server:bye(),<br>������� io:format("offline user ~p :(( ~n", [NowCount]).<br><br><br><br></div><br> +<br>_______________________________________________<br><br> +Extend mailing list<br><br> +<a href="mailto:[email protected]">[email protected]</a><br><br> +<a href="http://lists.ninenines.eu:81/listinfo/extend" target="_blank">http://lists.ninenines.eu:81/listinfo/extend</a><br><br> +<br></blockquote></div><br></div><br> + +</tt> |