1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915
|
ChangeLog from http://bogomips.org/rainbows.git (v0.97.0..v4.6.1)
commit eda61534c8203cf0e0fcc7c4d9564917c4552127
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Feb 2 00:29:10 2014 +0000
rainbows 4.6.1 - EventMachine fixes
* event_machine: update for unicorn 4.8.x
* disable cramp tests for now
* update EventMachine tests
* set executable bit rainbows executable
Nothing relevant for non-EM users.
commit 41087ce5f3e6042ea30a9ea659cfbcf7afe1f5ae
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 29 21:57:57 2014 +0000
set executable bit rainbows executable
Folks don't usually run from the source directory, but
RubyGems complains otherwise.
commit b8cba3a5fd92fc9365702b8987230b27e5fcfcf2
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 29 21:56:32 2014 +0000
update EventMachine tests
EM 1.0.3 got released and seems to work under Ruby 2.1,
so re-enable EM and NeverBlock tests again.
commit 332ed08d87f881d2c44ad30b9e5da7434cce9b69
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 29 21:52:17 2014 +0000
disable cramp tests for now
Cramp seems broken for now, we'll deal with it at another time
and I'm not sure if it ever took off...
commit a3cb0c37d1e865778a515ccaff4c2af31e556ee1
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 29 21:48:25 2014 +0000
event_machine: update for unicorn 4.8.x
unicorn 4.8.x shutdown handling is different and no longer removes
items from the event loop. So we must do that ourselves to enable
graceful shutdown. Otherwise, we'll time out on shutdowns and
the master will forcibly kill us.
commit 2dc55e417708d411987b4fb4233c87fe9f59ba0a
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 17 20:13:42 2014 +0000
Rainbows! 4.6.0 - fix unicorn 4.8.0 compatibility
The unicorn 4.8.0 internal changes unfortunately broke some
unoffically supported behavior we depended on. This release fixes
that, but as a result, we lose compatibility of older unicorn
versions. (Oops!, oh well... :x)
There's also minor bugfixes and documentation updates.
In order to ease transitions to future versions of the GPL, we are
now "GPLv2 or later" instead of explicitly GPLv2 + GPLv3(-only).
The old Ruby 1.8 license remains an option. If the FSF turns out
a horrible GPLv4, users are free to continue using GPLv2 or GPLv3.
commit 169d506907a711254802a8e86cc343c6322dfae3
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 17 20:25:06 2014 +0000
switch homepage to http://rainbows.bogomips.org/
RubyForge is going away, so we must migrate the homepage.
The mailing list will be migrated, soon.
commit 3e701ee74ff29bdf5daa3249acede5a85a2b0097
Author: Eric Wong <e@80x24.org>
Date: Fri Jan 17 02:03:04 2014 +0000
unicorn 4.8 compatibility + test version bumps
Internal reworking of unicorn 4.8.0 completely broke us(!).
This commit fixes things, but it means we no longer support
unicorn <= 4.7. Sorry about that.
commit 1b3e68e3eac0c3fbb2a32e4fddd26ee8a50ec627
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 17 01:31:43 2014 +0000
error: silence ETIMEDOUT and EHOSTUNREACH errors
There's nothing we can do about these errors due to
network failures and bad clients, either, so do not spew
a backtrace for them.
commit 877f44605ec1768e279843e36c214b656d191011
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Oct 26 08:01:24 2013 +0000
license: allow all future versions of the GNU GPL
There is currently no GPLv4, so this change has no effect at the
moment.
In case the GPLv4 arrives and I am not alive to approve/review it,
the lesser of evils is have give blanket approval of all future GPL
versions (as published by the FSF). The worse evil is to be stuck
with a license which cannot guarantee the Free-ness of this project
in the future.
This unfortunately means the FSF can theoretically come out with
license terms I do not agree with, but the GPLv2 and GPLv3 will
always be an option to all users.
commit 008269885bcf1bbf99059d752970969f573d8867
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Sep 30 18:19:49 2013 +0000
Rakefile: kill raa_update task
RAA is dead.
commit af09f23d530dd018bfd074a81d679a6ac815165e
Author: Lin Jen-Shin <godfat@godfat.org>
Date: Fri Sep 13 00:41:16 2013 +0800
Match against newer curl.
My curl 7.32.0 would actually print 400 Bad Request
Hope this would make it match against newer or older curl.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
commit d4988043825d1082666b4c219f2d66659b0c350b
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Sep 4 17:09:33 2013 +0000
SIGNALS: document SIGHUP/preload_app incompatibility
This was documented in the unicorn docs, but not Rainbows!
(The major difference between unicorn and Rainbows! signal
handling is the deferred handling of SIGUSR1 in unicorn vs
the immediate handling in Rainbows!)
commit 45261c67658d57f98b51d6bb37890f03b60240a9
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Apr 24 23:08:32 2013 +0000
test_isolate: update raindrops to 0.11.0
raindrops 0.11.0 was released several days ago and contains
minor improvements + fixes.
commit 2a39832fdbf8054c514562735b1ab6c6544065fe
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Mar 1 23:29:00 2013 +0000
epoll+xepoll: clarify intent of these concurrency options
Via private communication, I learned of a user using XEpoll
when he should not have been.
commit 4be3e386118969345ee5c94049efa7faae338e4d
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Feb 27 10:25:21 2013 +0000
Rainbows! 4.5.0 - hijacking support
This release adds hijacking support for Rack 1.5.x users.
See Rack documentation for more information about hijacking.
Lin Jen-Shin also provided the -N/--no-default-middleware option.
Minor packaging cleanups and new HACKING document.
There are also some corner-case bugfixes for *Epoll* users
(sleepy_penguin, these bugs do not affect EM or Cool.io users)
and test suite portability improvements.
commit 85e228de580f2ffff0025695a523349cef79d9c7
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Feb 26 21:16:27 2013 +0000
manpage: update middleware-related documentation
-N/--no-default-middleware needs a corresponding manpage entry.
Additionally, the Rack::Chunked/ContentLength middleware comment
is out-of-date as of unicorn v4.1.0
commit 1bdb4eda0d868223bd6b3d92db4545a02f5e14f9
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Feb 26 21:02:34 2013 +0000
epoll/*: remove user-space array as active queue
This prevents pathological starvation cases where the user-space
ready-list can be repopulated infinitely. With EPOLLONESHOT,
epoll itself may be used for this task (at a slightly higher
cost) by enabling read/write checks, as the epoll ready-list
preserves event ordering when used with EPOLLONESHOT.
commit 552c4ca305092911ca7613de4b1ba310e5481775
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Feb 26 20:07:30 2013 +0000
xepoll_thread_*/client: EPOLLONESHOT implies EPOLLET
No need to specify both flags for epoll (confirmed by reading
fs/eventpoll.c in the Linux kernel).
commit 81e555569fc254ed9d592c8734695b22d4f9bc12
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Feb 26 08:19:05 2013 +0000
doc: add HACKING document
Thanks to Alex Wolfe for noticing.
commit f8b5181e744848468bf3bb0fe469795f9113cf4c
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Feb 26 07:42:51 2013 +0000
tests: update checks for Ruby 2.0.0
EventMachine/NeverBlock currently do not build on Ruby 2.0.0
commit 95d6719722f31987c72052b000f67d99989a81c8
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Feb 26 03:16:46 2013 +0000
bump unicorn dependency to 4.6.2+ for Ruby 2.0.0
This ensures we're compatible with the latest stable
Ruby version.
commit 83a3b49dd3a1f1885ca56e9889ff22aa7b7c6136
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Feb 26 03:14:26 2013 +0000
gemspec: set licenses= attribute
Old versions of RubyGems which could not handle this attribute
are likely no longer in use.
commit 7dd14b2780b87be58c7afbd03df8d1f7cc3e9575
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Feb 16 00:04:53 2013 +0000
GIT-VERSION-GEN: rewrite to manage RAINBOWS_VERSION const
This DRYs up versioning and makes packages easier to distribute.
commit e166cfe5e8d648b544b1291ec157bd234a425e21
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 8 22:45:20 2013 +0000
hijacking support for Rack 1.5.x users
This requires Rack 1.5.x and unicorn 4.6.0 for hijacking
support. Older versions of Rack continue to work fine,
but we must use unicorn 4.6.0 features to support this.
commit e6faf9e26bcb172026a4984ecadbaa8b6789bcb7
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Feb 4 12:39:09 2013 +0000
tests: "wc -l" portability for *BSDs
On FreeBSD 9.0, "wc -l" emits leading whitespace, so
filter it through tr -d '[:space:]' to eliminate it.
commit f4e3bac180ff01256832f98655636f79b52f9d5b
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 25 02:10:05 2013 +0000
tests: bump version dependencies for Isolate
Most of these test dependencies may be safely bumped.
commit 8a6117a22a7d01eeb5adc63d3152acf435cd3176
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 24 23:33:54 2013 +0000
tests: "wc -c" portability for *BSDs
On FreeBSD 9.0, "wc -c" emits leading whitespace, so
filter it through tr -d '[:space:]' to eliminate it.
commit 0ba6fc3c30b9cf530faf7fcf5ce7be519ec13fe7
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 24 23:13:41 2013 +0000
tests: replace non-portable "date +%s" with ruby equivalent
"date +%s" is not in POSIX (it is in GNU, and at least FreeBSD
9.0, possibly earlier). The Ruby equivalent should be
sufficiently portable between different Ruby versions.
This change was automated via:
perl -i -p -e 's/date \+%s/unix_time/' t/*.sh
commit cbff7b0892148b037581541184364e0e91d2a138
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 24 22:59:16 2013 +0000
tests: remove utee and use tee(1) instead
POSIX already stipulates tee(1) must be unbuffered. I think my
decision to use utee was due to my being misled by a bug in
older curl where -N did not work as advertised (but --no-buffer
did).
commit a552fb90230eb65c28897398c7786dc9a13446ca
Author: Lin Jen-Shin <godfat@godfat.org>
Date: Tue Jan 29 11:44:06 2013 +0800
Add -N or --no-default-middleware option.
This would prevent Unicorn (Rainbows) from adding default middleware,
as if RACK_ENV were always none. (not development nor deployment)
This is implemented in Unicorn, so we only need to update
the option parser here.
Discussion thread on Unicorn mailing list:
http://rubyforge.org/pipermail/mongrel-unicorn/2013-January/001675.html
Signed-off-by: Eric Wong <normalperson@yhbt.net>
commit 49f70632e2f4a9b84fd4fced7439d0844fed1bbd
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 24 19:47:41 2013 +0000
epoll: ensure closing of pipelined clients if required
on_read normally relies on the close checking in on_readable,
but on_deferred_write_complete may be called from on_writable
instead (bypassing the close check of on_readable).
This affects both Epoll and XEpoll users, but only if they
were sending responses via body#to_path and triggering
on_deferred_write_complete.
While we're at it, favor non-recursive want_more instead of
calling on_readable recursively in ev_write_responses to
prevent stack growth.
commit ad5ab9fe21d57b78b7c6681bbc0907c934e898b0
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 18 11:21:45 2013 +0000
Rainbows! 4.4.3 - bugfixes for EventMachine users
This release fixes two EventMachine bugfixes from Lin Jen-Shin
and Mark J. Titorenko. There are also some minor cleanups.
Lin Jen-Shin (1):
event_machine: avoid close on deferred response
Mark J. Titorenko (1):
event_machine: join reactor_thread if it is already running
Eric Wong (2):
event_machine: cleanup confusing assignment
t/GNUmakefile: cleanup test dependencies
commit 5eaec3184b49d3c1068b1f011e7afe43b33dd2d5
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 17 10:17:29 2013 +0000
t/GNUmakefile: cleanup test dependencies
The missing random_blob dependency was causing the following
to fail on a fresh clone:
make -C t ThreadPool.t0005-large-file-response.sh
commit a12d2e64e04b5098f31e63a72ea8330b6c8f3a19
Author: Mark J. Titorenko <mark.titorenko@alces-software.com>
Date: Fri Jan 11 11:57:12 2013 +0000
event_machine: join reactor_thread if it is already running
...rather than falling through worker_loop
Prior to the application of this patch, if an EventMachine
reactor_thread has already been started elsewhere before the
worker_loop is entered, the worker_loop exits as a second call
to EM.run does not block the current thread.
This patch causes the worker_loop thread to join the
reactor_thread if it is running.
[ew: commit message formatting]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
commit 28eaf3e766f5dddc6ca073a155b8005afdaecfba
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Dec 19 03:39:58 2012 +0000
event_machine: cleanup confusing assignment
commit 42bf1f6de55b82af46fd8255453036c6582b7f19
Author: Lin Jen-Shin <godfat@godfat.org>
Date: Wed Dec 19 04:03:55 2012 +0800
event_machine: avoid close on deferred response
close_connection_after_writing only if not deferred, as in
cool.io
Deferred responses may buffer more data down the line, so
keep the connection alive if we have a deferred response
body.
[ew: clear @deferred when we really want to quit,
updated commit message]
Acked-by: Eric Wong <normalperson@yhbt.net>
commit f7f9c6b8470e54e25a17cd1a9517f5030e43fa66
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 6 11:40:21 2012 +0000
Rainbows! 4.4.2 - EventMachine async.callback fix
One bugfix allows stream(:keep_open) in Sinatra to work
properly.
Thanks to W. Andrew Loe III for the informative bug report
and reproducible test case.
ref: http://mid.gmane.org/CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg@mail.gmail.com
commit ef74449fdf7a2c487d07a1aa8b4e34cc3be77aab
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Dec 5 03:34:02 2012 +0000
test_isolate: bump eventmachine and sinatra deps
Always ensuring we work with the latest versions.
commit d5c8cc8b51619f0d33f75036c53e3936ad2749b2
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Dec 5 03:08:19 2012 +0000
event_machine: properly defer body.close for async
Calling body.close in the normal write_response() code path
is incorrect, and only worked out of sheer luck with
Cramp and async_sinata.
This change allows stream(:keep_open) in Sinatra to work
properly.
Thanks to W. Andrew Loe III for the informative bug report
and reproducible test case.
ref: http://mid.gmane.org/CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg@mail.gmail.com
commit fb671a2d316029169940d00a3f9307c3113541c4
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 31 01:53:43 2012 +0000
Rainbows! 4.4.1 - a minor bugfix for Fiber users
Fiber-based concurrency options avoids negative sleep
intervals. Thanks to Lin Jen-Shin for pointing this out.
commit e794a40049959a23ba311c572e518bb7c2861812
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 24 23:03:17 2012 +0000
fiber/base: avoid negative sleep interval
Also clarify the code while we're at it.
Thanks to Lin Jen-Shin for pointing this out.
ref: http://mid.gmane.org/CAA2_N1unOXb7Z4Jr8oKoSLu266O9Ko4o=oWzAcMA1w3=9X74KA@mail.gmail.com
commit 12281e4cee86496588814cd1851e8764caea024c
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Aug 18 08:10:14 2012 +0000
Rakefile: freshmeat.net -> freecode.com
freecode.com now requires HTTPS, too.
commit 7450ebd46b6e7cf0eb59a3d6d561d5d6252bef16
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Aug 18 07:04:11 2012 +0000
Rainbows! 4.4.0 - minor improvements
For epoll/Cool.io-based concurrency models, shutdown() is now
used to timeout keepalive clients to avoid race conditions.
Minor documentation improvements.
commit 5bcbe397f4457fa6c76443cc77d662139ef464f2
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jul 19 13:10:37 2012 -0700
thread_timeout: document additional caveats
Again, for the one thousandth time, timing out threads is very
tricky business :<
commit 73a76531b7f4826cdb3bad0a0286038fb6ade4f3
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Jul 1 03:56:39 2012 +0000
test_isolate: bump raindrops dependency
As usual, test with the latest released version to avoid
surprises.
commit 36ce10c49ce7aa0df9d47f5a5f870c23c1891258
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Jun 30 19:57:08 2012 +0000
coolio+xepoll_thread*: use shutdown() for keepalive timeout
Triggering Errno::EBADF is tricky in multithreaded situations
due to possible race conditions and yet-to-be discovered bugs.
shutdown(2) is also safe against apps the fork() internally but
do not execve(2) nor set FD_CLOEXEC.
n.b. calling fork() after pthreads are spawned may not be safe
on all platforms w.r.t. malloc, but /is/ the case for glibc on
GNU/Linux.
Follow-up-to: commit a5b987619f4b793203f6a50e424fe98c5b0794ba
commit a5b987619f4b793203f6a50e424fe98c5b0794ba
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jun 18 20:32:39 2012 +0000
epoll*: favor shutdown(2) for keepalive timeout
Triggering Errno::EBADF is tricky in multithreaded situations
due to possible race conditions and yet-to-be discovered bugs.
shutdown(2) is also safe against apps the fork() internally but
do not execve(2) nor set FD_CLOEXEC.
n.b. calling fork() after pthreads are spawned may not be safe
on all platforms w.r.t. malloc, but /is/ the case for glibc on
GNU/Linux.
commit 604f64f624d562f480dc8424a6597ec5b32947df
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed May 9 21:11:39 2012 +0000
fiber_pool: take Fibers from larger pools faster
Array#pop can be significantly faster than Array#shift on large
arrays (especially since we push into the Array). This is
because Array#shift needs to shift all elements in the array,
and Array#pop only needs to shorten the array by one element.
The Fiber stack may also be hotter in CPU caches when we choose
the most-frequently used stack.
commit 3e61265d4193340721dd53178c43c4fa24debb79
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed May 9 21:11:13 2012 +0000
test_isolate: update deps for EM tests
async_sinatra and rack-fiber_pool had new versions since
we last updated.
commit bdd64821feba82d9fce45c8dac64ba7b7bb530ac
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed May 9 02:20:42 2012 +0000
test_isolate: bump unicorn and kgio versions for testing
Users will pull the latest upstream, ensure things keep
working.
commit bbd55c8bcd0d2833c99a2c23856ff07be7f46f9a
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed May 9 02:18:08 2012 +0000
stream_response_epoll: fix for unicorn 4.3.x
unicorn 4.3.x now calls shutdown() explicitly on the socket,
so we can't just rely on a dup()-ed FD to keep a socket around.
commit 9573d9bc6c63aced28300a9d7346b5575eed8b7d
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue May 8 23:18:41 2012 +0000
tests: require sleepy_penguin 3.1.0 or later
We'll be making the XEpollThreadPool users depend on this, too.
commit 335b383fa43a6d21d473ebc81668dae9a3c09055
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Apr 11 21:48:36 2012 +0000
doc: some spelling fixes
Found with rdoc-spellcheck
commit f2c27e950b3314b4a647c482d506ba4c7314cac4
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Feb 23 08:07:13 2012 +0000
t/test_isolate: update test dependencies
At least for the gems I'm most familiar with...
commit b5756023920bc48bd879b419f80849ded38173c8
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Oct 12 16:29:23 2011 -0700
t0501: fix ambiguous shell construct for capture + subshells
Starting with "$((" can be ambiguous and confused for shell arithmetic.
commit db46699c438c2d1287563587fddea84e34c53482
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Oct 12 16:14:49 2011 -0700
http_server: fix log message if using Base (no concurrency)
Telling the user worker_connections=50 when using the Base
concurrency model is misleading.
commit 0b955487e44011d80a457618c2e8148c8ec05e05
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Sep 2 02:14:03 2011 +0000
Rainbows! 4.3.1 - small bugfix
This release fixes a potential reentrancy deadlock when
using the default logger from the Ruby standard library.
commit 71b4507755f2bd279adb14e6cdc90e1380efa247
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Aug 30 16:18:21 2011 -0700
avoid potential Logger deadlock in SIGQUIT and SIGUSR1
If any combination of SIGQUIT and SIGUSR1 are sent to a
Rainbows! worker in a /very/ short period of time, the Mutex
used by the default Logger implementation may deadlock since
Mutex synchronization is not reentrant-safe.
Users of alternative logger implementations (or monkey-patched
ones) are possibly not affected. Users of the logger_mp_safe.rb
monkey-patch distributed[1] with unicorn are not affected.
[1] http://unicorn.bogomips.org/examples/logger_mp_safe.rb
commit 58a09dccfa425811fa3b66e097c38bb303c2aa1e
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Aug 20 01:15:30 2011 +0000
Rainbows! 4.3.0 - pull in changes from unicorn 4.1.0
The deprecated Rainbows::HttpResponse class is finally gone
thanks to Pratik Naik. Logging of errors is more consistent
with the changes in unicorn 4.1.0. There are also minor
documentation updates. See the unicorn 4.1.0 release notes
for more details:
http://bogomips.org/unicorn.git/tag/?id=v4.1.0
commit b6c07eb14f008361caca6fcc642df60b29ef192c
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Aug 20 00:55:56 2011 +0000
bump unicorn dependency version
We want the stricter parser the error log filtering in
unicorn 4.1.0
commit cd40e197ab6ef6d0baa219497cea7458457f3343
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Aug 20 00:50:52 2011 +0000
TODO: remove splice(2) item
Rainbows! 3.3.0 added the copy_stream Configurator directive
commit d74a4b4520f89ec2dbf539b02dea1f938c63d74c
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Aug 20 00:46:28 2011 +0000
rdoc: cleanup and stop depending on :enddoc:
It doesn't seem to work at the top of the file...
commit f782ab61830ee92942abfcca7c7cb2cdd274e69d
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Aug 20 00:37:03 2011 +0000
update development wrongdoc dep to 1.6
Hopefully this points more folks to email us.
commit fbc144d57e83dc8ef5d9e653d38f88ef4b74cb62
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 19 23:13:10 2011 +0000
event_machine: update rdoc for new Cramp homepage
Cramp has a homepage and mailing list now, yay!
commit 3b987ec182cbe919646ea1cb9cd903a31bd85d45
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 19 23:10:28 2011 +0000
cramp: update test dependency to version to 0.15
Everything appears to be working...
commit 371fbd9e1e189510c825063770ff4f5ea79bfead
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 19 23:07:59 2011 +0000
t/test_isolate: bump kgio test version
We always try to test with the latest and greatest.
commit ff70afb97c7f41e28b3d3f6df665daeb4d415989
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Aug 16 19:00:37 2011 -0700
more consistent logging for errors
The Unicorn.log_error method exists since 4.0.0
commit 93e06d33193ee9fd4a58275a4909f008b4bcc4dc
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 12 07:53:21 2011 +0000
test_isolate: bump cool.io test version
Everything appears to work as expected under cool.io 1.1.0
commit a8949f91b323cf478f6aa99dc144f672d382e55e
Author: Pratik Naik <pratiknaik@gmail.com>
Date: Fri Aug 5 22:24:21 2011 +0100
Remove deprecated Rainbows::HttpResponse
Acked-by: Eric Wong <normalperson@yhbt.net>
commit 017b95be08a702c9faae1949db9328f7e82c2d8c
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 5 23:31:18 2011 +0000
Rainbows! 4.2.0 - Cramp WebSocket updates!
This release includes updates to support WebSockets
under Cramp 0.14 and later. This will be the last
release which supports Cramp 0.13.
There are no changes in this release for non-Cramp
users.
commit 73a8847fac9939e1b42a471f7537b5f89bd5ca94
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 5 23:17:07 2011 +0000
bump Cramp test dependency to 0.14
commit ab175517f8fd22acada6daa46c89edda080fa6a9
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 5 19:08:12 2011 +0000
event_machine: APP needs to be in the main Client class
Oops, testing against new changes against cramp.git here
commit 7223b868624d19f3421045c2bc5b075bacd83694
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 5 18:44:32 2011 +0000
event_machine: add :em_client_class option
This can allow Cramp (and potentially other libraries)
to subclass or implement duck-type compatible versions
of Rainbows::EventMachine::Client.
commit c6bb07a6475f71dc1e2b46b87a34fbbf46c52b5d
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Aug 5 18:15:45 2011 +0000
cramp: bump test version to 0.13
cramp was just released a few days ago and all the
tested pieces seem to work...
commit 8134763f3cc8403ef0e718aa511b192d305a0182
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Jul 30 22:25:31 2011 +0000
Rainbows! 4.1.0 - minor internal cleanups
There are only some minor cleanups in this release and a bump to
kgio 2.5 to remove the dependency on io/wait. kgio 2.5 or later
is now required (kgio 2.6+ will be required in the next
release).
commit 1e57c4c846ba9a3b736078b860583b0e7dd33d6c
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jul 21 23:27:18 2011 +0000
remove tcp_nodelay/tcp_nopush tweaking
Unicorn 4.x already defaults match those of Rainbows!
to favor lower latency instead of lowered bandwidth
usage.
commit 175727bc349ec0f7b94b4de936c7e9de1aaffd2d
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jul 21 23:17:48 2011 +0000
remove unnecessary io/wait require
kgio 2.5 added kgio_wait_*able methods
commit 19a7c3afcb22af75ac3afc358e96325d00415ace
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jun 29 19:57:05 2011 +0000
Revert "http_server: cap timeout at 32-bit LONG_MAX seconds"
Unicorn (> 4.0.1) already handles this for us,
not that it affects many people...
This reverts commit 37c376a9253ed62d134cbb4dbc6eaecc6076c77e.
commit c3982b7c043effcfa897086a221567c035603352
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jun 28 23:32:26 2011 +0000
t0044: do not assume setsockopt() finished
Race conditions abound in the world of concurrency!
commit 65f251070ce9b61a9049cb413fccffdfa11e7a70
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jun 28 08:17:01 2011 +0000
Fix Fiber* and WriterThread* breakage from removing io/wait
This fixes up breakage introduced in commit
905f0ff393629ddb4d70e3dc221b016128c47415 to switch to
kgio for timed, synchronous waiting.
commit 905f0ff393629ddb4d70e3dc221b016128c47415
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jun 28 07:39:35 2011 +0000
require kgio 2.5 for kgio_wait_readable(timeout)
Since kgio_wait_*able in kgio 2.5 takes an optional timeout
argument, we no longer have to load the extra "io/wait" module.
This saves us a small amount of some memory and also removes the
extra ioctl(FIONREAD) syscall IO#wait enforces.
Like IO#wait in Ruby 1.9.3dev, kgio_wait_readable may use
ppoll() to wait on high-numbered file descriptors as efficiently
as it waits on low-numbered descriptors.
commit 9684ed46e78dab1ae787fe135a3cec1c4490ddd6
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jun 28 07:20:27 2011 +0000
bin/rainbows: release the OptionParser object from stack
No point in keeping it around to eat memory.
commit 37c376a9253ed62d134cbb4dbc6eaecc6076c77e
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jun 27 21:20:42 2011 +0000
http_server: cap timeout at 32-bit LONG_MAX seconds
We can't wait for longer than 68 years.
commit 1f8ebc013e8b0e9a62587fb95a81e8c5f541a9d4
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jun 27 09:20:37 2011 +0000
Rainbows! 4.0.0 - MOAR concurrency for MOAR COARS
Rainbows! now scales to more than 1024 worker processes without
special privileges. To enable this, Rainbows! now depends on
Unicorn 4.x and thus raindrops[1].
client_max_header_size directive is added to limit per-client
memory usage in headers.
An experimental StreamResponseEpoll concurrency option now
exists to buffer outgoing responses without any thread-safe
dependencies. Unlike the rest of Rainbows! which works fine
without nginx, this concurrency option is /only/ supported
behind nginx, even more strongly so than Unicorn itself.
non-nginx LAN clients are NOT supported for this. This relies
on the sleepy_penguin[2] RubyGem (and Linux).
There are some minor bug fixes and cleanups all around. See
"git log v3.4.0.." for details.
[1] http://raindrops.bogomips.org/
[2] http://bogomips.org/sleepy_penguin/
commit cc74623dddb9d28d7d5a2479aafdb7a754645697
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jun 27 09:18:39 2011 +0000
bump dependencies (kgio, unicorn, raindrops)
We now rely on Unicorn 4.0.0. We'll use the latest
kgio and raindrops versions anyways.
commit 0e9d8ac759f7c5d783f055df0fb5d4f08c68db71
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jun 27 09:15:24 2011 +0000
remove unused arg in Rainbows::Response.setup
It hasn't been used in a while, but we kept it for
Zbatery version compatibility.
commit 8c1e3da65d7a709c6578652fa57e5ca0e7a9a459
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jun 22 07:40:03 2011 +0000
epoll/client: properly close on all pipe responses
Some pipe responses can trigger the on_deferred_write_complete
method without ever re-running the event loop.
This appears to be the result of the occasional t0050 failures.
commit 63aff8f1cffebaeb6320a5f6d2ec8cb9c7d8ea54
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jun 22 07:05:37 2011 +0000
t0050: improve diagnostics for this test
This test seems to fail sometimes with Epoll and XEpoll...
commit cdbec31577cae4fcaa3c4dcd0492d2ab81307fe4
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jun 22 02:25:56 2011 +0000
t/test_isolate: remove unneeded comment
That's been around forever, and we think Rubinius supports
that...
commit a831f5685ac03f7f0f3d341df89eade6134b55b4
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jun 22 02:25:11 2011 +0000
dev_fd_response: enable under Rubinius
Untested, but it should work nowadays...
commit 6858c79a49a5d25edb6c06ffd131749eb2f23b2b
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jun 22 02:21:58 2011 +0000
Unicorn 4.x resync for ticker
This removes the extra per-process file descriptor and
replaces it with Raindrops.
commit 51859dfd9b9f11f6cc0af3fc252312b8018a88e2
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jun 22 02:21:33 2011 +0000
t/test_isolate: drop Unicorn test dependency for now
It's already a runtime dependency
commit be9f24aa1392c67294187844a620e3a9974e0948
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jun 15 22:42:49 2011 +0000
remove IO_PURGATORY dependency
We no longer need to put all listeners away since
Unicorn uses kgio.
commit 281ef555c40cf292809ad10d623d0571fafc790e
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Jun 11 06:35:12 2011 +0000
configurator: add client_max_header_size directive
Lowering this will lower worst-case memory usage and mitigate some
denial-of-service attacks. This should be larger than
client_header_buffer_size.
The default value is carried over from Mongrel and Unicorn.
commit 1f3e7b1c7ee89aefdcadd4aebd7b0527baa188a3
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Jun 11 05:46:52 2011 +0000
doc: remove docs for Rainbows::Fiber::* APIs
Do not encourage their use, really.
commit d01c5df960546462e8f5f458131d78689342d6aa
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jun 10 22:39:01 2011 -0700
stream_response_epoll: update documentation
Yes, this concurrency model is our strangest yet.
commit b065cab4fa5ca25302220c20563398a57069ae08
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Jun 11 00:34:42 2011 +0000
remove Rainbows.run method
We can get away with a single stack frame reduction. Unicorn
itself has more stack reductions, but Rainbows! is further
behind in this area.
commit 1468604be898d17c2cf2da519dccd493c58f4282
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jun 10 22:08:04 2011 +0000
ev_core: do not autochunk HTTP/1.0 (and 0.9) responses
Do not assume middlewares/applications are stupid and blindly
add chunking to responses (we have precedence set by
Rack::Chunked).
commit 1aa7eb6608d04a21d1143e7ac09e5219a1208123
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jun 10 21:35:48 2011 +0000
ev_core: use add_parse for trailers, too
HttpParser#trailers and #headers are actually the same
method, so we'll just continue on.
commit 27f54de4b83e20c5d68c6dd225c1d350aeee5cd3
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jun 10 20:27:22 2011 +0000
gemspec: add GPLv3 to commented-out licenses section
Reduces inconsistency.
commit 7bb7c4469fb744135377d68e7c29cde3fbc635dc
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jun 10 02:13:55 2011 +0000
use HttpParser#add_parse API in Unicorn 3.7.0
It's easier-to-use in some cases.
commit 772a5da573a661df6421afa6398b9e4023e77ce4
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jun 9 23:47:37 2011 +0000
tests: more fixes for StreamResponseEpoll
Oops.
commit be467481fe774e60f5a349c6447769f090e57e06
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jun 9 21:29:02 2011 +0000
response: sendfile_range fis for Rack::File in rack 1.3.0
Rack::File already sets Content-Range, so don't repeat work
and reparse Content-Length.
commit 5bd92111979d968fc9b982f1e529b8044e718f71
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jun 9 21:08:38 2011 +0000
t/t9002: use Rack::Head
We send HEAD requests and expect body-less responses.
Noticed while running a newer rack version after re-isolating.
commit 879968a88559c434b4f117e86e61ccdb62263b26
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jun 9 21:01:00 2011 +0000
update various RubyGem dependencies
Gotta keep using the latest and greatest.
commit 40edc84784864063a38ba38bf854a2119c243ce4
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jun 9 00:34:00 2011 +0000
stream_response_epoll: our most "special" concurrency option yet
This doesn't use Rainbows::Base so we have no keepalive support
at all. This could eventually be an option for streaming
applications.
commit 54deb6a9a0e868c0958c9ec145e311661ce90e54
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jun 9 00:23:28 2011 +0000
move reopen_worker_logs to base
We may not always use Rainbows! :Base since we don't want
keepalive/immediate log reopening in some cases.
commit 99244e8e30eded813bd8eaf7f2136a3871bd486c
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jun 6 10:24:05 2011 -0700
doc: remove --sanitize-html for pandoc
pandoc 1.8 no longer supports this, and we don't need it anyways
since we only generate documentation from our repository.
commit d40aff8c3fb6ecce314897837c28d9400fbf38a8
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue May 31 08:33:04 2011 -0700
xepoll_thread_*: update docs for Linux 3
Linux 3.0.0 is just around the corner and of course newer
than 2.6.
commit cfe9a6d38533d380112f2b99bea9a1a3664f0395
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 30 21:31:23 2011 +0000
test-lib: enable splice(2) for Linux 3.x
The latest Linux series is now 3.x, not 2.6.x
commit 983722912028f35348c8ff276df48855281be715
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat May 21 03:02:09 2011 +0000
Rainbows 3.4.0 - minor updates and fixes
SIGQUIT (graceful shutdown) now drops idle keepalive clients for
the concurrency models where maintaining an idle client is
relatively inexpensive: Coolio, CoolioThreadPool,
CoolioThreadSpawn, Epoll, EventMachine, XEpoll,
XEpollThreadPool, XEpollThreadSpawn.
Kgio.autopush now works properly for all multi-threaded
concurrency models (if you're using :tcp_nopush).
commit e5eda7790806d6d7709d02db04c75f09340e9a24
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat May 21 03:01:50 2011 +0000
pkg.mk: update to the latest version
* locale fix for grep
commit 7bd77ef78055af5d5232d16f00568ce02b947ae0
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 18:23:50 2011 -0700
use and recommend sleepy_penguin 3.0.1
It's better under 1.9.3 (sleepy_penguin 3.0.1 was bogus)
commit 07cb79c14399a292ae2a50db007180941c758c69
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 18:23:50 2011 -0700
use and recommend sleepy_penguin 3.0.0
It's better under 1.9.3
commit 9009074ae535438696b706b4d6b8d4c72187c33e
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 18:15:30 2011 -0700
t0044: increase test reliability
commit f83fe5edb79e51616afcf2a9f991cfe153eabd48
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 15:44:48 2011 -0700
try_defer: enable documentation
It should hopefully give this more visibility even though it's
an internal feature.
commit 0b9b4edc63c0021e567c68137e1ee7f9e99ddcc5
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 18:13:21 2011 -0700
xepoll_thread_pool/client: improve autopush support
We need to trigger a recv() to uncork the response.
This won't affect fairness (much) since all recv()s
are non-blocking and a successful header parse will
put us in the back of the queue.
commit a5419a5fd57a231e40b7a3ba48a02cdef15909be
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 15:30:11 2011 -0700
.gitignore: add tags/TAGS files
Some folks use them.
commit f4b084225b7115efecfbfb2b5d16da1f1da5c39e
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 15:17:21 2011 -0700
add tests for Kgio autopush on Linux
We can support it fully for a subset of concurrency models where
we have full control over buffering and HTTP/1.1 keepalive
clients.
commit a396de855e291d27d43454618031432634fe7d37
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 14:24:14 2011 -0700
add test for SIGQUIT disconnect
This will only be supported for certain concurency models, but
it's probably good enough.
commit 5d5033afa9052dc0d60e743f07bc694f008182b3
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 14:22:37 2011 -0700
event_machine: disconnect idle clients at on SIGQUIT
Since it's cheap to maintain keepalive clients with EM, we need
a way of disconnecting them in a timely fashion on rare SIGQUIT
events.
commit bba079d8a605b546bc262e80234c3c233a386e44
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 18:58:04 2011 +0000
client: use kgio_write across the board
This should enable Kgio "autopush" support for ThreadSpawn,
ThreadPool, XEpollThreadSpawn, and XEpollThreadPool.
(still needs tests)
commit ea6d0eab436c78113f8a61e7fcc34db4117d14c0
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 20 09:19:51 2011 +0000
coolio* + *epoll*: drop keepalive clients on SIGQUIT
In concurrency models long keepalive times are cheap (and thus
more likely to be used), this allows Rainbows! to gracefully
shut down more quickly.
commit 90af18f6884857704d72fd6b2bb91718aad72117
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu May 19 23:54:59 2011 -0700
epoll/xepoll: more consistent client implementations
There's less logic in the server this way and easier
to potentially share code this way.
commit 5e4f790847198e1267b2fbd5decfa09e5cc3d618
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue May 17 17:38:12 2011 -0700
doc: recommend io_splice 4.1.1 or later
io_splice 4.1.1 works around issues with socket
buffers filling up pipe buffers on blocking splice.
See http://lkml.org/lkml/2009/1/13/478 for a better
explanation.
commit bc4f5510cd0e5ccf85f077cca019bca70309bf01
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 16 14:12:27 2011 -0700
Rainbows! 3.3.0 - doc improvements and more
* improved documentation all around, suggestions/comments to further
improve documentation is greatly welcome at: rainbows-talk@rubyforge.org
* added GPLv3 option to the license (now (Ruby|GPLv2|GPLv3), though
Unicorn is still (Ruby|GPLv2) for now)
* added client_header_buffer_size config directive (default 1K)
* small default header buffer size (16K => 1K) to reduce memory usage,
Rails apps with cookie sessions may want to increase this (~2K)
* all concurrency models default to 50 connections per process
* all concurrency models with a secondary :pool_size parameter also
default to 50 (threads/fibers/whatever)
* RLIMIT_NOFILE and RLIMIT_NPROC are automatically increased if needed
* Rainbows::ThreadTimeout middleware rewritten, still not recommended,
lazy people should be using Unicorn anyways :)
* Several experimental Linux-only edge-triggered epoll options:
XEpollThreadSpawn, XEpollThreadPool, XEpoll, and Epoll.
The latter two were in previous releases but never announced.
These require the "sleepy_penguin", "raindrops", and "sendfile" RubyGems
=== Deprecations
* Rainbows::Fiber::IO* APIs all deprecated, Rainbows! will avoid
having any concurrency model-specific APIs in the future and
also avoid introducing new APIs for applications.
* Fiber-based concurrency models are no longer recommended, they're
too fragile for most apps, use at your own risk (they'll continue to
be supported, however). Linux NPTL + Ruby 1.9 is pretty lightweight
and will be even lighter in Ruby 1.9.3 if you're careful with stack
usage in your C extensions.
commit bcd0825fc77a2986aebb3f1f5a653a64faf6a8c5
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 16 21:01:47 2011 +0000
writer_thread_*: fix sendfile detection under Ruby 1.8
I can't wait until I stop supporting Ruby 1.8
commit 912c328ecfccf189239c4ad2bb7863d64342868f
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 16 20:42:10 2011 +0000
document RubyGem requirements
Hopefully makes things easier to try out.
commit 46ac7ca9f3e5c7736aa1c9430d2de218e27bf730
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 16 20:32:29 2011 +0000
doc: cleanup rdoc for Rainbows module
The only supported method is Rainbows.sleep in here
commit 362ac7801d4f6ddd85cbafdc7e9118f88089564a
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 16 20:13:00 2011 +0000
use :pool_size for RLIMIT_NPROC with thread pool models
Only needed for Ruby 1.9
commit f9de85b9a35c9f95b390249ea855858c5e4a3ae2
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 16 20:05:12 2011 +0000
more reliable shutdown for epoll concurrency models
Just close the epoll descriptor, since the sleepy_penguin
epoll_wait wrapper may not return EINTR in the future.
commit 49b60d6f67a94560a802c6ff80c16c92093de877
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 16 19:43:38 2011 +0000
tests: unify checks for copy_stream and threaded app dispatch
This makes things easier to maintain as we add more concurrency
options.
commit 39f625fff05d457b01f088017f463a86d3b6c626
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 16 19:04:06 2011 +0000
add "copy_stream" config directive
This allows using IO::Splice.copy_stream from the "io_splice"
RubyGem on recent Linux systems. This also allows users to
disable copy_stream usage entirely and use traditional
response_body.each calls which are compatible with all Rack
servers (to workaround bugs in IO.copy_stream under 1.9.2-p180).
commit d520222050ce88388ae5e446c63642d79cc9796e
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue May 10 16:34:51 2011 -0700
configurator: update user-facing documentation
Finally, we have all methods in configurator and it's
much easier to document!
commit 95cec890409ac07d51c87ab157fe7e101d6f8432
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue May 10 16:33:07 2011 -0700
max_body: documentation updates
It can't be used as middleware for fully-buffering concurrency
models.
commit 382d3cabfda9fdd391228d24e8a8d4cb014648b9
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue May 10 15:35:21 2011 -0700
LICENSE: add GPLv3 to license terms
GPLv2 and Ruby-specific terms remain intact, but this means
we can be combined and redistributed with GPLv3-only software
(once Unicorn has GPLv3 added to its license).
commit 704f843054f3ca32941d42972a1c7d1b144d06ad
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 04:39:54 2011 +0000
configurator: move validation logic over
There's actually no reason we can't have these methods
in Rainbows::Configurator where it's easier to document
nowadays.
commit 598525843ee1d120fd9878011ca2b6328c2cf95f
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 02:24:26 2011 +0000
doc: better document :pool_size options
CoolioThreadPool has had it supported forever, but
only NeverBlock had it documented.
commit 1e3b7e9bfef992b337a9a113da6c99071dce60e1
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 02:15:55 2011 +0000
TODO: misc updates
Some things were never going to get done due to lack of interest
from users.
commit 87632aac323bd41701900a03dc78bc307fa8229a
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 02:13:51 2011 +0000
doc: update comparison and README
Clearly users need to know about more options
commit d0336075a772d040b9fe3100098e1815ce609cb4
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 01:57:16 2011 +0000
xepoll_thread_*: add rdoc for users
It's good to describe what they're useful for.
commit a62e9240fffe544d171c87f94946ecf50888a6df
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 01:56:46 2011 +0000
xepoll_thread_spawn/client: remove rdoc
It's an internal implementation detail.
commit 6b430295177c4689a6a5d421d575867c5da8ba2b
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 01:55:32 2011 +0000
max_body: rdoc updates
speling ficks and less confusing #initialize documentation
commit 9afcdde9a92f817330e4dfd5e1ef77a7bf461253
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 00:21:23 2011 +0000
xepoll_thread_pool: add optional :pool_size argument
We're now able to configure the number of threads independently
of worker_connections.
commit 725adcc6986bc2658d92ea3ebebe61d2b83060ad
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 00:17:06 2011 +0000
split out pool_size module
coolio_thread_pool, neverblock both use it, and
xepoll_thread_pool will support it next, too.
commit 3c1649226d2371ce09d14f3fcce18fec0af1ba02
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 00:16:23 2011 +0000
t0041: less confusing skip message
Just the test name is irrelevant
commit 380ef63bc2c8f7b6f1cab7387aa9343bc5720c9c
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 9 00:02:51 2011 +0000
add XEpollThreadPool concurrency option
This is probably friendlier on server resources in the worst
case than XEpollThreadSpawn but may perform worse in the client
client-visible way, too.
commit df00f2b1028ba95450246c82e468878b6ec903a3
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun May 8 07:54:30 2011 +0000
Revert "epoll: fixes for Ruby 1.9.3dev"
Fixed in kgio 2.4.0 now
This reverts commit a1168e7d2bfe182896f139d051ef099616fd1646.
commit ed869514211a908748f04a881e6fb18a395914ae
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun May 8 07:47:03 2011 +0000
join_threads: simplify thread stoppage check
No need for a string comparison
commit 8af417bbacb285c90a376c55a42fe39a981a328d
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun May 8 07:39:38 2011 +0000
require kgio 2.4.0
kgio 2.4.0 has some 1.9.3dev fixes which affect us
commit ec3f871c9a34734b865365a43979a0b459654b05
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun May 8 07:26:55 2011 +0000
epoll_wait: flags argument is unused
We only poll for one event (EPOLLIN/EPOLLOUT) at a time,
so there's no need to actually check since they're too
rare.
commit e64e2e0045d63c4edd291839febba978534be652
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun May 8 07:22:36 2011 +0000
xepoll: cleanup acceptor logic
worker_yield is safer than setting a threshold with multiple
acceptors when thread limits are hit. Also, avoid sleep +
Thread#run since it's potentially racy if threads are extremely
unfairly scheduled.
Same things applied to xepoll_thread_spawn.
commit 07a0bee9dd6f2c366d11284b7e9ab09d66b411e4
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun May 8 04:06:12 2011 +0000
xepoll_thread_spawn: rework acceptor logic
Infinite sleep is too dangerous due to possible race conditions,
so use worker_yield which is safer and cheaper in the general
case. We can also avoid sleeping on new threads by only
spawning when the client module is included.
commit c543b295ff2108623f3748a141e04e5530d06377
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun May 8 03:58:21 2011 +0000
xepoll_thread_spawn/client: close returns nil
Otherwise pipeline_ready can false positive on us
commit 497ce74310baaa7ac4835b8d6aa76acb40d44b7c
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun May 8 01:28:43 2011 +0000
xepoll_thread_spawn: inline needless method
shorter line and 3 lines of code killed!
commit ef9376775b1a6eeae8807160b2b8ea23fbfd3607
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun May 8 01:27:25 2011 +0000
process_client: fix pipeline_ready arity
Not that it's actually used, right now.
commit 3decb4375847b97c117440e5167dbba33d5f33b5
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 6 01:04:39 2011 +0000
remove unnecessary variable assignments
commit bcca2d3bc609e9ecaa77ec93bef861b1ddcc01dd
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 6 00:52:18 2011 +0000
test_isolate: update to latest raindrops and unicorn
Newer versions should be better
commit 21a1a20223986af8c8962cafe2e0f1eae0dcfd19
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri May 6 00:38:53 2011 +0000
ensure some requires get loaded in master
More sharing, faster startups, and most importantly,
better error reporting if some things are missing.
commit 0efe7b677b076a32ef54e5f2f0a9861eb1f7f3d9
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu May 5 07:16:48 2011 +0000
http_server: XEpollThreadSpawn sets RLIMIT_NPROC
It *can* have as many threads as it does idle connections.
commit 8fb350e00c1421907cbc36cbf29c499b8ad051e4
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue May 3 01:18:45 2011 +0000
Rainbows! defaults more DRY
We won't forget to reset defaults on SIGHUP anymore.
commit e9a229c639dd6bda08a3fa8ce14af3688dc2ba63
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue May 3 01:15:37 2011 +0000
s/max_bytes/client_max_body_size/ for consistency
Too confusing otherwise...
commit a7f5f17ba2047ef7143465f612007ea81871a79e
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue May 3 01:05:11 2011 +0000
add client_header_buffer_size tuning parameter
We're changing our default to 1K buffers to save memory. This
should reduce memory usage of idle clients and lower pressure on
the MRI GC. Rails applications using session cookies (the
default) may want to up this to 2K or more.
commit 01381ab4dfeb032c85e72724df889c7aa381aa32
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 2 22:05:52 2011 +0000
rainbows: get rid of MODEL_WORKER_CONNECTIONS constant
Just use regular autoload, now. Less guesswork.
commit 25c5930988d6deab8f885981fdaf6c1eb12fdf98
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon May 2 08:05:45 2011 -0700
http_server: default all options to 50 connections
pavinging the way for changing MODEL_WORKER_CONNECTIONS
commit ce4f5cd7197fb99ed99399b22cbece1684532f85
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun May 1 01:44:28 2011 +0000
doc: add Sandbox document
Rainbows! is a bit bigger than Unicorn and usually requires
being sandboxed, too.
commit 8c086f095a2f3be0f71829af9037d99c79604a37
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Apr 30 06:56:47 2011 +0000
lower header buffer sizes for synchronous models
HTTP headers are usually smaller than 4K, so 16K was way too
much for most users and often caused unnecessary GC runs.
EventMachine and Coolio models can all share the same initial
read buffer, so it's less urgent that they get this lowered for
now...
commit bfb58da95e13f3061feb2c1f284efc80a13ba23c
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Apr 30 06:50:17 2011 +0000
xepoll_thread_spawn: lower memory usage
This one actually has a realistic chance of running
hundreds/thousands of clients, and 32K per-client is
a huge amount.
commit ca8021d4177e5f7131f88daf6b56402ff39c3a35
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Apr 29 18:14:10 2011 +0000
epoll: fix timeout
Epoll#wait and epoll_wait(2) timeouts are in milliseconds,
not seconds. This affects xepoll, too.
commit 73ed28f1863d5ae3048a284e25a918255bdafe8a
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Apr 29 18:11:04 2011 +0000
xepoll_thread_spawn: fix race condition with acceptors
Noticed under 1.8.7
commit aff36865d5e738babdbf36f34fd0693b67bb3d90
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Apr 29 05:45:44 2011 +0000
xepoll_thread_spawn: initial implementation
Whee! This is going to be awesome.
commit 40cf3eb79054caa4b7d81120a736491aca8259eb
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Apr 28 18:42:46 2011 +0000
document epoll and xepoll
They're probably ready for general use in a very limited
capacity...
commit 6ea50dd6866a7b4eda5134cb2c8980710285e127
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Apr 26 14:04:26 2011 -0700
doc: stop recommending Fiber* stuff
Too much NIH and too fragile.
commit 5bd08f7bb06367823412bd3410bcb41babd6d57b
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Apr 26 14:00:25 2011 -0700
revactor: remove documentation for internal methods
commit 00b9b46b2a49ab96f74fd21807ee9c93b218bc2d
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Apr 26 13:30:28 2011 -0700
revactor: do not recommend, upstream is dormant
commit e3c8152e016fe29f76a996b8802df7158c081db0
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Apr 26 12:56:20 2011 -0700
stream_file: hide internals
No need to expose things that don't need exposing.
commit 012d3e3d1ae9186434efcaa746f25118683fe8b3
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Apr 25 19:44:13 2011 -0700
make all concurrency options use 50 by default
This may change again in the future, but it
paves the way for simplifying this code...
commit f6471ed9cafe6e65e72fa9486ecdcc4b2f8d1373
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Apr 21 15:38:20 2011 -0700
thread_timeout: annotate as much as possible
This should make code review easier.
commit 63b3b40abf054bce2846bc9e36770a6ed2791a8b
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Apr 9 18:58:23 2011 -0700
increase RLIMIT_NPROC for thread-crazy folks
Might as well, threads are free and cheap on 64-bit
commit 066bbf930d023ecf61ed4af363aebadbce2c51db
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Apr 8 13:38:11 2011 -0700
http_server: attempt to increase RLIMIT_NOFILE
In case people try to do C10K, make life easier for them.
commit e5c4125c348104444714b5111c90016d520461d6
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Apr 21 21:22:06 2011 +0000
thread_timeout: document Thread.pass usage
Thread-switching sometimes takes too long under YARV, so we
force a switch since the watchdog thread is lower-priority.
commit 71d48a01a7c257dffa22c10781c55deff64037d2
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Apr 21 21:21:13 2011 +0000
join_threads: workaround blocking accept() issues
Should be fixed in 1.9.3 and/or future Kgio...
commit 7f368d2cf9e456e37f1489dc275ed0de007175dd
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Apr 21 06:48:46 2011 +0000
bump dependency to Unicorn 3.6.0
Might as well use the latest and greatest.
commit 15505863ce2080bdf342930530acc35c0d112df1
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Apr 19 04:35:43 2011 +0000
http_server: less hacky loading of concurrency model
Ugh the old way was gross.
commit 367ba00d2f3a4e9a0fa848d076f97f754a9d7cc5
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Apr 11 07:54:50 2011 +0000
t: only enable Revactor tests under 1.9.2 for now
Revactor doesn't seem to work under 1.9.3dev, and Revactor is
dead upstream.
commit a1168e7d2bfe182896f139d051ef099616fd1646
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Apr 11 07:53:57 2011 +0000
epoll: fixes for Ruby 1.9.3dev
commit 321e3dfbd5c4a585c00a8d5221ebdf9b934aaea1
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Apr 11 04:16:31 2011 +0000
thread_timeout: rewrite for safety
This attempts to fix all the danger associated with using
Thread#raise. Hopefully I succeeded.
Note: this logic _cannot_ be used to fix the timeout.rb
module in the Ruby standard library, that one needs to
allow nested timeouts (which seems impossible).
commit 5170b767ef1bbc94554920959d1792fce43899a9
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Apr 10 07:42:31 2011 +0000
thread_pool: get used of dead thread_join method
It's in the JoinThreads module now
commit 777beb3e27785d2da2865cb5fc0d43f1c158cb5e
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Mar 22 11:08:31 2011 -0700
queue_pool: switch to ivars to protect internals
commit dd6d5168e4f3dcb4555264265a05e5b61273893d
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Mar 22 17:22:00 2011 +0000
thread_pool+thread_spawn: update documentation
They're not bad with slow clients a previously thought.
commit 53fdbda1ba1d88e93d662a040fe4c7fb52810155
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Mar 21 02:45:02 2011 +0000
simplify LISTENERS closing
No need to obfuscate what it's doing
commit c7e75cfe241a621f50c750720c47149a156e8e7f
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Mar 20 03:07:31 2011 +0000
fix various warnings with "check-warnings" target
Run under 1.9.3dev
commit d327a0d468e5b5cfb05bb56621fb22d156ce3a40
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Mar 17 09:59:55 2011 +0000
pkg.mk: new task for checking Ruby warnings
commit ee9e7886d9101a6376d268a931c645026e9f6b0f
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Mar 15 21:44:14 2011 +0000
fiber/io: fix broken call to Kgio.trywrite
Fortunately it's a deprecated class that nobody
uses...
commit e9cb419a7887fce13fc7b185177c87fc45279383
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Mar 15 12:36:10 2011 +0000
Rainbows! 3.2.0 - trying to send files to slow clients
We now use IO#trysendfile in the sendfile 1.1.0 to reduce the
cost of generating backtraces for slow clients (from EAGAIN).
Nothing new for people not serving static files (but more
on the way).
Existing "sendfile" gem users must upgrade to 1.1.0
or risk being left without sendfile support at all:
http://bogomips.org/rainbows.git/patch?id=cd8a874d
commit f550b2ac5cdfedba53564609af19db38c302bbf4
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Mar 15 12:35:06 2011 +0000
bump Unicorn dependency to 3.5.0
Latest and greatest :D
commit c158f140e6a402278602b3be890c2c1dc494465d
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Mar 10 15:22:06 2011 -0800
doc: update Static_Files for new sendfile gem
Ugh, and still no usable IO.copy_stream under 1.9.2 :<
commit cd8a874d18fe01e11bb57b91186b6c9f712a4b3f
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Mar 10 15:06:10 2011 -0800
switch from IO#sendfile_nonblock to IO#trysendfile
IO#trysendfile does not raise exceptions for common EAGAIN
errors, making it far less expensive to use with the following
concurrency models:
* Coolio
* CoolioFiberSpawn
* Revactor
* FiberSpawn
* FiberPool
This requires the new sendfile 1.1.0 RubyGem and removes support
for the sendfile 1.0.0. All sendfile users must upgrade or be
left without sendfile(2) support. IO#sendfile behaves the same
if you're using a multi-threaded concurrency option, but we
don't detect nor use it unless IO#trysendfile exists.
commit afea5cd7c691de95b37d29728ab4880e3b737a42
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Mar 8 14:08:43 2011 -0800
test_isolate: bump dependencies
New sendfile gem will give us IO#trysendfile.
We might as well use and test the latest and greatest
versions of everything else since thats what users
pull in by default.
commit 85784e1b5fca7bbadc7fb5dba1f100785188954f
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Feb 28 03:10:55 2011 +0000
use IO#wait instead of IO.select for single readers
It's a simpler interface and avoids allocating an array
which is nice.
commit 829d58c261ba64bb4f512c6591eba2f468df15a6
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Feb 16 10:47:27 2011 -0800
README: clarify license terms and versions
Ruby 1.9.3dev switched to BSD but we remain under the same terms
as the old Ruby 1.8 license. Mongrel2 exists now and also uses
the BSD, so don't confuse people with that, either.
commit 23be173e2506f8a39d3e7b3097cef4e3b8a31ccc
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Feb 15 09:44:23 2011 -0800
tests: updates for cramp 0.12
The Cramp::Controller namespace is gone.
commit 061cb38ee10c431a015276c2cf3db37e5e3e66ef
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 11 10:49:56 2011 +0000
Rainbows! 3.1.0 - minor updates
Small bug fixes that have been sitting around, not much but
it's already been one month since our last release.
* Unicorn dependency updated to 3.4.0, so we get IPv6 support
and Kgio.autopush support for ":tcp_nopush => true" users.
* Optional :pool_size argument is fixed for NeverBlock and
CoolioThreadPool users.
* Mostly minor internal code cleanups
* Sunshowers support removed, it was out-of-date and
unmaintained. Cramp remains supported for now.
* X-Rainbows-* response headers support removed, nobody used it.
There are severalnew features in this release not documented
here. Consider any new features not mentioned in these release
notes to be subject to removal/renaming in future releases.
commit 93625a24f0b20a89f4ab732c92f76640e387c1a0
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 11 11:12:17 2011 +0000
pkg.mk: update to the latest
* Fixes Ruby 1.9.3dev deprecation warnings
* Fixes some documentation dependency issues
commit 3b3047f2f60a5f9c4f526fe8fcfc0d7897422abb
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 11 10:49:07 2011 +0000
reverse_proxy: document as "not ready for production"
Of course some folks believe nothing in Rainbows! is :.
commit 04b8de2cf6c3037c45e60d3720472b09dd23efd5
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Feb 7 19:48:46 2011 -0800
Revert t/bin/unused_listen simplification
This conflicts with ports clients may automatically use
in the ephemeral range.
This reverts commit c9a7560bb684bbdadb641ebc7597303f38c37d4f.
commit 662a146457689110c83bfd18987938475966f454
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Feb 7 19:26:04 2011 -0800
new test for optional :pool_size handling
This will help prevent us from breaking :pool_size in the
future.
commit a34b1048d05397f72ad579fcef72cbb1a9e9d8bc
Author: Graham Hughes <graham@rightscale.com>
Date: Mon Feb 7 16:49:31 2011 -0800
fix optional "use" argument handling
Actually use the Rainbows::O constant for use
[ew: rewritten commit message subject]
Acked-by: Eric Wong <normalperson@yhbt.net>
commit b7d974960b58d732149d5fabf870b2332b6877f7
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Feb 7 18:52:51 2011 -0800
gemspec: remove unnecessary statements
No need for these
commit 40871775044a88662b9593d86a631755ca516bab
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Feb 7 18:51:50 2011 -0800
doc: rdoc cleanups and fixes
Don't need to document things that aren't ready, yet.
commit 53bac4f65d9430495c8043b239cc936012ea7a8d
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Feb 6 06:19:09 2011 +0000
minimize &block usage for yield
No need to allocate a proc every time when we can just
yield much more efficiently.
commit 44eb53f5a5f1ea2e5aee93d0caf995f42b3179f7
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Feb 6 01:42:31 2011 +0000
kill some unnecessary &block usage
We were needlessly allocating objects even when using yield.
commit 90a86c9822238f01e8d60c9303b9a0da64351c7f
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Feb 5 10:44:52 2011 +0000
*epoll: refactor common loop code
acceptor thread pools could use some work, still
commit c9ca82c76f1eb0e06b0aa204a243d00f382579c5
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Feb 5 10:11:56 2011 +0000
*epoll: consolidate re-run logic
There's a lot of code duplication here :<
commit d8e3edadd128a2ee5712b87a6b660295de2df6be
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Feb 5 09:22:05 2011 +0000
writer_thread_pool: needless use of Array#map
Array#each will do..
commit fa7a282502c253ad3203f28bb10eede8b3a3cd3e
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Feb 5 09:06:37 2011 +0000
less expensive QUIT processing
Avoid constantly nuking the method cache and raising
repeated exceptions while our master process is shutting
us down.
commit 723ca7b440b1cf161d999aedcfadba8498adaa7c
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Feb 5 08:46:40 2011 +0000
http_server: kill a warning
Ugh, I need to think of a way to clean this up...
commit 7246d2f2d1601dbb5486ce7f9ddbebd1bb975b58
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 4 20:39:41 2011 -0800
bump required Unicorn dependency for Kgio
We want to use the singleton methods in Kgio to reduce
conditionals.
commit e00c2e8c53ad5b47baa5bc6a8765b7c3c92296b9
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 4 18:59:18 2011 -0800
bump wrongdoc development dependency
1.5 is nicer than older versions
commit 8e2e8adda8adbadee8ab31cde700b7e486b1154c
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 4 18:58:26 2011 -0800
rename XAcceptEpoll to XEpoll
It's too long especially since XEpollThreadPool is planned :>
commit 0f4f015737297ac5245d0be9ee83553770ade0a9
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 4 15:05:25 2011 -0800
test_isolate: use latest Unicorn
It supports IPv6 and pulls in a better Kgio. Since Unicorn
defaults to ":tcp_nopush => true", we need to flip it back
to false to be compatible with the types of apps Rainbows!
is targetted as.
commit f015a843fcfa120286628ec75829575ee2391380
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 4 17:48:34 2011 -0800
tests: replace several sed invocations with ed
ed can do in-place editing portably, unlike sed.
commit 82579a5f20531e69eb40e6a58a931b6c5f77d548
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 4 15:06:23 2011 -0800
reverse_proxy: small reorganization
Put all of our constants in one place for easy reference
commit d20bb75518669444ad65fffe4c6e5d2654436193
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 4 15:01:03 2011 -0800
reverse_proxy: properly read IPv6 addreses in upstreams
Yes it's fugly
commit ba9a22b6926db058199d44a626b923376c8a850f
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 4 22:38:31 2011 +0000
epoll: handle EINTR properly in Ruby-space
We can't work around it effectively in the C extension
itself. This requires the latest sleepy_penguin gem.
commit da93ad1c07ff9deb4d3a2e765b26f87ccf68aa23
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 4 05:41:14 2011 +0000
test_isolate: only load sleepy_penguin under Linux
It's Linux-only, after all
commit c9a7560bb684bbdadb641ebc7597303f38c37d4f
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Feb 4 04:20:15 2011 +0000
t/bin/unused_listen: simplify this
Binding to a random port is much easier this way
commit 130d086666ccd825fcb13cf02fcf941b8fe661af
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Feb 1 15:05:52 2011 -0800
preliminary reverse proxy Rack application
This can be a starting point for developing Cool.io or
EventMachine-based reverse proxy applications on Rainbows!
Eventually Rainbows! could replace nginx for Unicorn users!
Just don't consider this code production ready, yet, at all,
it doesn't handle any sort of failover and has no automated
tests, yet.
commit 9bf406655a84090426a62ab60677df529e408f17
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jan 31 14:21:18 2011 -0800
coolio/client: on_write_complete triggers read
This allows us to more aggressively handle pipelining
as well as trigger future Kgio autopush behavior.
commit 5cbe276ef1e797aef77e7401593f4a7827c37fe3
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 27 12:52:15 2011 -0800
test for client_max_body_size being zero
Some users never, ever accept uploads, so we should test
for it.
commit 7d623489dd51667e0a2eec9d44aec57cb4c5ba44
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 26 17:42:55 2011 +0000
epoll/client: avoid unnecessary Epoll#set calls
We should only attempt to modify the descriptor when we
block, and not for subsequent events.
commit bc8a71ea4fee6e4ed35dad245511508ac0b7bf4b
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 26 17:40:01 2011 +0000
GNUmakefile: only enable epoll-based models in Linux
epoll is Linux-only right now. kqueue probably isn't worth
supporting directly (and even direct epoll support is debatable
given the current GVL situation)
commit 667b05819b85165061c445fb2c75ef161a5de5b6
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jan 24 20:04:20 2011 -0800
initial XAcceptEpoll concurrency model
Edge-triggered epoll concurrency model with blocking accept() in
a (hopefully) native thread. This is recommended over Epoll for
Ruby 1.9 users as it can workaround accept()-scalability issues
on multicore machines.
commit 9f7f497dc21d904a1af20465318d85811daf0652
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jan 24 17:13:14 2011 -0800
epoll/client: thread-safety for write queuing
We're living on the EDGE and mixing epoll with threads :D
commit 04b8649b3750a0002094e90a62f7566059c8a4e9
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jan 24 17:00:51 2011 -0800
epoll: make Epoll.quit more reusable
We'll be using this more in the future
commit 85ccfbc75abc78f977583db6303e3fb270fd2ec9
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jan 24 13:20:23 2011 -0800
neverblock: fix app_call under 1.8.7
super doesn't seem to capture arguments inside a block
under 1.8.7 :<
commit 9e146021e17056976e61d824d228922bf81a4f24
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jan 24 11:47:43 2011 -0800
clear LISTENERS array on close
No reason to keep it around
commit 6f6a95b6e3b4f76278cd19b787c8487453dae4d4
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 22:56:29 2011 -0800
epoll/client: minor optimization
We know @wr_queue is empty since we just initialized it
and the first thing an HTTP client does is read.
commit 01fbc4a7f2fd5b751b9183d11aa74aadaffd145b
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 17:34:21 2011 -0800
ev_core: force input to be given to app_call
No need to setting an ivar for most requests
commit 9719da13b8aabeabbf2eebc37f127e88550c3121
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 17:27:25 2011 -0800
epoll/client: factor out on_close method
We'll override it, maybe...
commit 97d8f9b49e3f4637c7c573a971cdbc54b5698dce
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 17:10:00 2011 -0800
epoll/client: remove unused client
We don't do Level-Triggered I/O around here
commit cc08315b7821cf7178d233451fd6bbe84eb90dcc
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 15:34:15 2011 -0800
extract common tasks to pkg.mk to simplify our makefile
commit fb24ca8f30edbf5086dbe288d4dd4fa213684236
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 15:11:16 2011 -0800
epoll: reduce expiration calls and Time objects
We'll lower our precision for keepalive timeouts a little
and and reduce our Time object allocation rate.
commit 43d6ec33c3dd7497e27127adfffeb94722fd4b8d
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 15:08:07 2011 -0800
ev_core: garbage reduction
We don't need to allocate new string objects for short-lived
strings. We'll pay the price of a constant lookup instead.
commit 247ce76b4aabfa42157b9cbf9ebae824819cfff6
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 13:21:07 2011 -0800
epoll: use newer sleepy_penguin
We can eliminate the State module to simplify our code
since 1.3.x keeps better track of things.
commit b33ab73a984660ab2d741b32725ab21d7860bef3
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 13:50:12 2011 -0800
max_body: disable for epoll
It's almost just like Coolio
commit 6750d3b50a9d4e66cbdb3b3ce295a1f16a54c678
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 12:35:05 2011 -0800
doc: git.bogomips.org => bogomips.org
bogomips.org is slimming down and losing URL weight :)
commit 805f0eba4f63d0c9020708e1122f64776933c06f
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 21 00:16:57 2011 -0800
epoll: use sleepy_penguin default size for epoll_wait
It was based off the nginx window of 64 events. Not that
any servers are really that busy...
commit 1b024d48169442a5498d490699ea1eee41563587
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 20 15:27:46 2011 -0800
epoll: close epoll descriptor on graceful shutdown
This allows us to gracefully shutdown more quickly.
commit ea4a01df8b1fa29e2088816f4734bb0073eb9380
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 20 22:15:12 2011 +0000
remove support for Sunshowers
The WebSocket protocol is still undergoing changes and unused.
We won't waste time supporting it until it's finalized and
doesn't break HTTP.
commit 7ec2e407206036a993aadbcd39b13a2d86b7a288
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 20 13:26:59 2011 -0800
epoll: ignore ECONNRESET errors
Nothing we can do about that from clients. Perhaps kgio
should just return nil for those...
commit 7ad4e300c29b06fd53aca9f9bad18f97f9a34633
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 20 20:32:24 2011 +0000
ev_core: simplify setup steps
ev_core is always loaded after forking, so eliminate the
need for extra setup steps for each concurrency model that
uses it
commit 72cbecfe01b8c4b2c7bb7e362401805374036dc2
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 20 02:28:12 2011 -0800
merge rack_input into process_client
It turns out to be less-used than previous anticipated,
so there's no point in having yet another module.
commit ed33b9c0d060806b41e952a50e0ab65a0f5fe21a
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 20 02:20:19 2011 -0800
ev_core: localize 413 error constant
It's the only place we ever use it
commit e0ad4353f0c0f8ae27301df3e694384f687a4264
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 20 02:16:04 2011 -0800
remove unused 416 error constants/exceptions
We handle that locally in rainbows/response now
commit fa0b3774dd9cd73331e83b3517c37964ab265074
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Jan 20 02:13:38 2011 -0800
dev_fd_response: garbage reduction
Constant strings mean the runtime won't have to allocate new
objects all the time since GC is currently the biggest
performance problem of Ruby 1.9.x in my experience.
commit fc355db99bdbe72644e4691a7a107b6a29c77be6
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 19 18:07:13 2011 -0800
dev_fd_response: do not send chunks to 1.0 clients
chunked Transfer-Encoding is only valid for HTTP/1.1
commit d59ea817d624478176212f27bb79976c371a9c6f
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 19 17:47:37 2011 -0800
t0035: kgio-pipe-response works everywhere
Or at least it should :)
commit 5d5d31e7ed12a232e405a8456d08e974ac74299a
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 19 17:46:52 2011 -0800
t0023: use skip_models helper
we need to get in the habit of using this more
commit 1a449c8abafbb17f9e7c2d68363957c80dc1ab86
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 19 16:23:54 2011 -0800
remove support for X-Rainbows-* headers
We guarantee the Rack env will exist for the duration of
the request/response cycle, so we can just tweak
"rainbows.autochunk".
commit 9424b13255a238dfa44952ebeb07bea3acee999c
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 19 15:06:10 2011 -0800
initial edge-triggered epoll model
Coolio and EventMachine only use level-triggered epoll,
but being Rainbows!, we live on the EDGE!
commit 7a04133c1ab57923cac8a9de04b00bfe89bcce2d
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 19 02:58:43 2011 +0000
tests: content-md5 tests shut down connection
This makes content-md5 tests much faster since we
no longer wait for the server to to timeout.
commit 810701d939114a5fcdacc55ec383de112c5e3fa4
Author: Eric Wong <e@yhbt.net>
Date: Mon Jan 17 03:42:33 2011 +0000
ev_core: reuse buffer to avoid GC thrashing
Single-threaded concurrency models can reuse a single
buffer to avoid thrashing memory and causing unnecessary
GC activity.
commit c7f4ade8edcfa7422d41c4272250b292b141b427
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 14 18:51:54 2011 +0000
t0050: improve test reliability
normal signals can get lost easily :<
commit 18db44fe89b8ba61f21b92f6efece37baa8bd6c7
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 14 18:49:58 2011 +0000
tests: bump rack-fiber_pool version to 0.9.1
We always try to track the latest and greatest. We've also
updated the test to actually test concurrency since
rack-fiber_pool reuses recent fibers now.
commit 2eb58a62a5e738c287db8239f4f4e8d1d02ed328
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jan 11 16:43:10 2011 -0800
Rainbows! 3.0.0 - serving the fastest apps to slow clients faster!
There is one incompatible change: We no longer assume application
authors are crazy and use strangely-cased headers for "Content-Length",
"Transfer-Encoding", and "Range". This allows us to avoid the
case-insensitivity of Rack::Utils::HeaderHash for a speed boost on the
few apps that already serve thousands of requests/second per-worker.
:Coolio got "async.callback" support like :EventMachine, but it
currently lacks EM::Deferrables which would allow us to call
"succeed"/"fail" callbacks. This means only one-shot response writes
are supported.
There are numerous internal code cleanups and several bugfixes for
handling partial static file responses.
commit 9caff8ecc7912306366cebb9c57b65ab12fde5ad
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jan 11 16:36:08 2011 -0800
add write-on-close test from Unicorn
We need to ensure this esoteric feature keeps working for some
people.
commit 89f948aeaef34114ec61291ff8ffbebcf85a748e
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jan 11 16:01:20 2011 -0800
event_machine: buffer reads when waiting for async.callback
We cannot trigger on_read events and invoke the HTTP parser and
modify @env while we're waiting for an application to run
async.callback. We also need to clear (and *maybe* re-set)
@deferred if we're writing from async.callback
commit 0515dee246536cb3942f51f8d264737f106d3985
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jan 11 15:46:56 2011 -0800
event_machine/client: rename ivar for consistency with Coolio
Both use @deferred to refer to the state where there's a
deferred response body in the queue.
commit f9256a6897645e709753f37b723ed1c6388c0c84
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jan 11 15:44:57 2011 -0800
event_machine/client: remove unused :body accessor
Nobody uses it anymore
commit 69d8ec2f167eb99a1efec4a770ba5951e7c366f0
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Jan 10 18:07:21 2011 -0800
coolio: enable async.callback for one-shot body responses
The lack of an equivlent to EM::Deferrable prevents us from
doing streaming/trickling responses, but a one-shot body
should work fine for Coolio and generating dynamic responses.
commit bf6eb8f1f79ed57ee317b2e6f73c70a59708739f
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 18:16:27 2011 -0800
rainbows/coolio/client: set LOOP constant in module
It's more natural and easier to maintain this way
since Coolio::Client is always lazy loaded.
commit 4747aa0d07950b9abbb036bc02491c4639dc9f80
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 17:10:46 2011 -0800
coolio/client: small optimizations
* lazy load uncommon classes: StreamFile, Response{Chunk,}Pipe
* remove needless rainbows/coolio/sendfile module since we're
lazily loaded now along with the rest of rainbows/coolio/client
and only in the worker.
commit 37ec9ef3272931f42b4b0bb3f04a3855a8702a05
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 18:06:54 2011 -0800
coolio_thread_*: lazy load Rainbows::Coolio::Client
We don't want that loaded in the parent process since
we want config reloadability.
commit f6d448bc21c3bde3ab39b55664722b40f5801c20
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 18:05:28 2011 -0800
redirect unexpected test output to /dev/null
We check the return code anyways, and spewing random binary
data to the terminal with verbosity on is not a good idea.
commit 25c9cf0d8420a971840297d9ca62e7dd9c05b09e
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 17:07:48 2011 -0800
event_machine: fold write_response back into client
No point in having too many modules to search around
(for both hackers and the runtime).
commit 7e4a7225dbd01df27a6b3ec44e53c013b889a724
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 16:12:26 2011 -0800
event_machine: cleanup async logic
Since we support keepalive now, setting @state can be
harmful and the comment is out-of-date.
commit 9d2fdee38f990e44b3a232c27f51287173e60e91
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 15:49:02 2011 -0800
ev_core: small organization cleanup
We want to put all constants in one place.
commit 63c32b35cccd5f2358565f828db240200e8bffa7
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 15:47:33 2011 -0800
more consistent use/avoidance of HeaderHash
Rack::Utils::HeaderHash is still expensive, so avoid
forcing it on users since we can assume app/library
authors use normally-cased HTTP headers.
commit 58dbf0952b94b01d4a434fa880755f9a320c6103
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 10:27:30 2011 -0800
favor Hash#include? for some existence checks
Hash#[] is slightly slower on the miss case due to calling
Hash#default (but faster for the hit case, probably because it
is inlined in 1.9).
commit 2d2416daa554dd530b5f2cfeffe3e0e31505c824
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 11:59:42 2011 -0800
test_isolate: bump versions and simplify
We can't possibly keep track of all sub-dependencies,
so only declare primary dependencies until we find
a known problem with a sub-dependency.
commit fbedef35186609f9e1cdedaa3a9d2a016423fe82
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 11:55:12 2011 -0800
test_isolate: prevent concurrent execution
I realize this lock overly covers different versions of
Ruby, but it's simple and we don't need to invoke isolate
too often (we hope).
commit efbdc44a5a301e5ea16d5135afaa9cda3a33f5d3
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 11:54:35 2011 -0800
tests: bump async_sinatra dependency to 0.4.0
It's out and it works, so why not.
commit f1893ae9786db250fd95def1cf958f2351cb84c5
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 11:47:05 2011 -0800
bump dependency on Rack to 1.2.1
We need to split out Cramp tests to Isolate to a
different path, which sucks, but oh well. Cramp
hasn't had a release in a while...
commit 360ba90a9a50b5aabd1c65d51034c7ebe77e36ef
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 10:20:24 2011 -0800
response: do not skip Status header set by app
Rack::Lint already stops apps from using it. If a developer
insists on it, then users who inspect their HTTP headers can
point and laugh at them for not using Rack::Lint!
commit c162bd4d620bc1421f104d9d0dfba21fb9b43068
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 10:10:20 2011 -0800
response: fix skipping of Status: header from app
We already set a Status: header by default for compatibility
with some existing, broken libraries out there.
commit b788a0f1eedfb358f9d57f40cec6ba0960dea3fe
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Jan 7 10:02:52 2011 -0800
ev_core: garbage reduction with const strings
Reading headers is common and we don't want to create new String
objects (even if they're tiny or copy-on-write) for the GC to
munch on.
commit 370fb8c7811704ed65384f599b52ac1b6d0c36c9
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 18:01:36 2011 -0800
event_machine: refactor async.callback for keepalive
async.callback will be useful with Coolio (and more!) soon, so
ensure it works as well as the rest of Rainbows!
commit 2cb26ba8084cd37996330616b885de1c780d848e
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 17:39:11 2011 -0800
event_machine: factor out async.callback handling
This will allow Coolio to use it, too.
commit 31a93152c8977f31045bd182ae99df4ebd088abf
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 17:18:05 2011 -0800
minor cleanups following state cleanups
We noticed a few more things that could be cleaned
up after the last commit.
commit 6bde32081338ce8075854f4c47ce8ca5347df919
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 17:06:20 2011 -0800
eliminate G constant and just use the Rainbows! module
Code organization is hard :<
commit d6e4975937a9590f48dc39b1a4aefa9d62f34616
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 16:38:46 2011 -0800
rainbows.rb: unindent
commit ea6831e1eaeeb862afa7ed9213e2d9bc0180e706
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 16:33:04 2011 -0800
eliminate timed_read module
No need to split it out when there's only a single
class using it.
commit ed7669ced3aba5c0ba6f5fbee9411546b32c96df
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 16:29:53 2011 -0800
simplify keepalive_timeout accounting
Easier just to use an instance variable
commit 4060b7742d047c0000fd1bf4ac2c3b9cae95585a
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 16:19:17 2011 -0800
disable Nagle's algorithm by default
Nagle's algorithm is harmful with the write-write-read sequence
during keepalive, so we disable it performance for users using
keepalive. We always write headers with a separate write
because Rack response bodies may not always be ready for writing
when headers are.
This requires Unicorn 3.3.0
commit 9b6679ec50ecd184fccd195bd14bda3c6ea2070f
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 16:15:29 2011 -0800
simplify Rainbows.max_bytes implementation
Yes, I'm still learning Ruby.
commit 950b4ba1454543de492efffdf4022f481ca7e4c2
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 16:14:07 2011 -0800
response: use optimized httpdate implementation
Believe it or not, Time#httpdate showed up at the top
of my profiler output for the past couple of years now.
I guess that's what happens when all HTTP applications
I write are less complex than Rack::Lobster :P
commit 4768850390bb1d1e3c2e36273e9aad953e18de19
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 16:08:09 2011 -0800
Bump unicorn dependency to 3.3.0
This means we can remove Time.now.httpdate in the next commit
commit e8ae2e483e75ad163212cc8d3a7107eb2a014a9c
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 10:56:50 2011 -0800
response: allow normal Hash for crafting Range headers
HeaderHash is quite expensive, and Rack::File currently
uses a regular Ruby Hash with properly-cased headers the
same way they're presented in rfc2616.
commit 16b24c86cecec0697b35ac321cddd500bc9cfdea
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 10:54:45 2011 -0800
tests: ensure 416 responses do keepalive
This is useful for clients that specify a bad range,
we can preserve the connection for them to specify
a good response.
commit 89e1f00cd540bca54c2cbcb7d9b6cad5e0e3cf34
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Jan 5 10:22:11 2011 -0800
send proper 416 responses
416 responses without a body should respond with a zero
Content-Length and a Content-Range that allows clients
to specify a proper range in the future.
rfc2616, section 14.16 says:
> A server sending a response with status code 416 (Requested
> range not satisfiable) SHOULD include a Content-Range field
> with a byte-range- resp-spec of "*". The instance-length
> specifies the current length of the selected resource.
commit 429e9948d91fa159c2daa9944a5026cebb78bade
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jan 4 18:13:45 2011 -0800
writer_thread_pool: remove unnecesary debug messages
Oops
commit 104f7bd76696e42c0b8a97f3780cabea9a7dd44c
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jan 4 17:12:22 2011 -0800
prefer Hash#merge! to Hash#update for consistency
It's more likely to be in the method cache since Rack::URLMap
uses it and also is more consistent when looking at profiling
output against various concurrency models.
commit e21939d776673b2f8887adf7a5c64812b7d2e98e
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 30 08:33:15 2010 +0000
globally refactor Range handling for responses
Rack::Utils::HeaderHash is still very expensive in Rack 1.2,
especially for simple things that we want to run as fast as
possible with minimal interference. HeaderHash is unnecessary
for most requests that do not send Content-Range in responses.
commit 4a76da1833922c74e147be5def9bfe04fd0c16a2
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 30 08:32:28 2010 +0000
coolio: rename deferred_response => response_pipe
For consistency with the EventMachine code
commit ed28feabd79697cb27722036622aeca1fbf0723d
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 30 08:32:27 2010 +0000
event_machine: cleanup response_pipe
No need to pass unnecessary variables to response_pipe,
just let the client handle it all.
commit c38bc88363d4c4f5f639540ca86f4dd1225df79e
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 30 08:32:26 2010 +0000
refactor response sendfile body handling for easier debugging
Unique method names makes it easier to follow code and determine
where our methods come from.
commit 1a03f9a525faf4c997546c419de6854223b645c4
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 30 08:32:25 2010 +0000
t9000: disable this test for CoolioThread* models
It's not appropriate to use AppPool middleware with
these. It was disabled for RevThread*, too.
commit 72a315441937f9e0531112f2b7080da39ca6064d
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 30 08:32:24 2010 +0000
simplify per-client keepalive state checks
This lets us simplify repetitive checks worry less about
properly maintaining/closing client connections for each
concurrency model we support.
commit 1f28534fce2b30bf3099ea0d014b62ac4a3205f0
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 30 08:32:23 2010 +0000
coolio/master: small garbage reduction
Creating unnecessary string objects for every response
is not a good idea.
commit a471d10cd793c4dc7182b4e588a21d6ac7c41de7
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 30 08:32:22 2010 +0000
return 206 status for partial sendfile responses
Although curl did not complain, 206 is the correct error
code for partial HTTP responses.
commit dc77752eb7bfe528c60dc0ac028717877342e22a
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 30 08:32:21 2010 +0000
coolio_thread_*: fix 416 response handling
After beefing up and enabling byte range tests for "sendfile"
(and no just IO.copy_stream), we noticed threaded-Coolio
variants did not handle invalid byte ranges correctly.
commit 5c5aea99a57d07c1d0e0ea471b62acf2852526c7
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 30 08:32:20 2010 +0000
t0022: fix up broken/incomplete tests
Tests for checking the Content-Range were totally broken,
but fortunately the code itself works.
commit 0e7d1a8b2923a20c452a300a48d25f7224b0b35b
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Jan 4 16:18:46 2011 -0800
*gemspec: fix build, we have no unit tests
commit 558abace15eefb06163b741cc7090893d532fb1d
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Dec 29 09:29:13 2010 +0000
Packaging cleanups, reinstate generated files for the tarball
commit 074b2ddc09517274b058a68fd1d40c59e35ca3a5
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Dec 29 09:03:37 2010 +0000
Rakefile: fix fm_update task
Oops
commit e98836e165fa46b67fc57adc1ce59620f4f3fc4d
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Dec 29 02:13:04 2010 +0000
Rainbows! 2.1.0 - Cool.io, bugfixes and more!
Cool.io (new version of Rev) support is explicitly added
(it always worked before). ":Coolio" may be used in place
of ":Rev" anywhere in your Rainbows! config file.
There is a new "keepalive_requests" config directive to limit
the number of requests a single connection may make (default:
100, same as nginx). This may be useful for better
load-balancing characteristics.
The old "Rev" prefixes remain supported as long as Cool.io
remains compatible with Rev (likely forever).
Bug fixes:
* Rainbows::ThreadTimeout middleware with multiple clients
* large, pipelined upload errors with Revactor+Coolio(Rev)
* high CPU usage for maintaining idle keepalive on *Fiber*
* needless ThreadPool wakeups
* request env prematurely cleared keepalive requests,
breaking some middlewares such as Clogger.
* "close" not called on body if wrapper and sendfile used together
Various code cleanups, and our RDoc website is JavaScript-free.
See the ChangeLog or git for all changes.
commit 40445641f11f01c6a24bf96c8b80eed5fd33a512
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Dec 28 17:59:27 2010 -0800
complete Rev => Coolio renaming
We use Cool.io internally everywhere now, but preserve
Rev-based models for anybody using them.
commit 3495d59763e6159975debf32728dc53fc41c5ea1
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 20:25:39 2010 -0800
several response body#close fixes
Some middlewares require the Rack env to be preserved all
the way through to close, so we'll ensure all request models
preserve it.
We also need to better response body wrappers/proxies always get
fired properly when returning. IO.copy_stream and "sendfile"
gem users could hit cases where wrappers did not fire properly.
commit 53afe0b23fc67c5b25541cddbd68f905c649e756
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Dec 28 06:54:06 2010 +0000
dev_fd_response: pass files straight through
No need to wrap regular files
commit 46d79be0ad3de48ef0a677537becb3508ccad31e
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Dec 28 01:14:43 2010 +0000
enable the keepalive_requests config option
This will allow servers to limit the number of keepalive
requests that can be made over a single connection to
prevent denial-of-service and also to improve fairness
in load-balancing.
commit ef66567984780b2ce8daa155c367bcf7e049ab77
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 23:25:12 2010 +0000
coolio*: favor Coolio over Rev
We still use and define Rev internally, but that's
mostly just manual labor of converting stuff over.
commit 728496a31f34234b46d7025a23933aa06dd824f5
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 13:10:57 2010 -0800
coolio_fiber_spawn: decrease CPU usage for keepalive
Blindly resuming fibers every second is a waste of cycles, we
can use the ZZ hash in regular FiberSpawn to resume expired
fibers on an as-needed basis.
While we're at it, merge the keepalive-timeout class into the
heartbeat, there's no reason to have separate timers and
classes here.
commit 0766c1eb631190ee514a90e4d20a941f0a310054
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 13:10:56 2010 -0800
t0019: add CPU usage test
This requires manual verification :<
commit d430bc3a481f897b4f515d5b7d0a0e239f8d2bb2
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 13:10:55 2010 -0800
test-lib: fix bug in setting worker_connections
We need to be able to set this with keepalive_timeout
simultaneously.
commit 4e7ee4b8a451edf78b0eeac47b8a24c591986e91
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 13:10:54 2010 -0800
t0015: even less racy fix
We need to ensure the first worker has started and is
running before attempting to signal the reload.
commit 2b85ea421197af84a13f6062b21ddcf61490ebcf
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 08:57:31 2010 +0000
doc: misc cleanups and additions for RDoc
This is also our website, so we need to document the new
Cool.io-based concurrency options for users and point
existing Rev* users to it.
commit 87a38d1a5658938a3540b45ab04cc85a9135c8f0
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 07:45:28 2010 +0000
t0015: increase reliability of test
The worker process may fork before the original process
is killed during daemonization.
commit 3a250fcfb9fcfa0ab3a8105821e670563025faa4
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 07:18:49 2010 +0000
initial cool.io support
Cool.io is the new name for Rev. We'll continue to support Rev
until Cool.io breaks backwards compatibility. Rev may not be
supported if Cool.io is.
commit 2873361069dc2f8c793875316a0a2c9b8fa54761
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 04:23:34 2010 +0000
fiber/io: avoid allocating Range objects for slicing
It's slightly faster this way, but string slicing sucks
anyways :<
commit 40c22b3f0a2ace6e4b51a39624ac5ed5ee3d0162
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 03:56:30 2010 +0000
fiber/*: more efficient keepalive_timeout expiry
We can use the same interface as Rainbows::Fiber.sleep to avoid
blindly waking up readers at ever scheduler invocation.
commit abb3f7e057bd5fb0aa97cae1410ce2f55ba12b9c
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 03:01:47 2010 +0000
fiber/base: use bare "select" where possible
Less visual noise
commit 2d25a86d1d17bd966eea59e5666e41d9da562811
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 02:59:10 2010 +0000
thread_pool: avoid needless wakeups from select
No point in waking up when our ticker runs in a separate
thread.
commit a3d3d13711869d420b4473d492bd788ebe493053
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 02:58:31 2010 +0000
thread_*: unindent
Hopefully this will make our code easier to follow.
commit 94b848a8f9120bce8b0abd776b1a9b7e2f4fa30d
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 02:43:44 2010 +0000
introduce worker_yield method
This lets Rainbows! yield the current worker process
when busy in the hopes another worker will pick up the
slack. We can also override this for the single worker
process case later if people care enough.
commit a310302708faa19042282e94525544cfbb23eba5
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 02:36:58 2010 +0000
writer_thread_spawn: factor out Client.quit
Self-documenting code is easier to follow
commit 6ae020c9ac483d822902b5d33f038f79b44d3a50
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 02:30:58 2010 +0000
writer_thread_*: split out classes into separate files
Use a consistent "Client" naming to reduce confusion
commit e7d295fd8e3628eba7a1ba52e95b7dee11532e98
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 02:20:00 2010 +0000
writer_thread_*: split out common socket_proxy code
Needless duplication sucks
commit 7f2cb1b56afda847c29e1e65fe0608a6f20a0fe6
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 27 02:13:32 2010 +0000
writer_thread_*: unindent
commit a5ff497e57bc6e8793c38bdd94ea9f1cfefd17fd
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 23:54:49 2010 +0000
revactor: split out tee_socket and use autoload
Some applications never need TeeSocket, and we don't have
to worry about thread-safety with Revactor.
commit c4d92b384dd3f926fa12eb704eeef663a9cb7b66
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 23:52:43 2010 +0000
more :: prefix elimination
This should make things easier on the eyes.
commit 2e131bfd21f5ec5acc3c86233e5e292cec7aa67d
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 23:52:02 2010 +0000
fiber/queue: unindent
This also cleans up some constant resolution for the root
Fiber class.
commit 712ef17547291fed37e79d37d0b6e0128ed43e0d
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 23:41:51 2010 +0000
remove unnecessary "::" constant prefixing
It's ugly to look at.
commit 6733af0546a759b73fd63880e8ef2549caf4c4f2
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 23:16:41 2010 +0000
never_block: simplify and split out code
alias_method is a mess, super is superb!
commit 20e8d57127f16da8e4242582dee3b99d54cbb729
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 23:12:18 2010 +0000
event_machine: split out server and client classes
This should make things easier to find
commit a50c9d312b9d5274a95f2816b5f53a3738d0cb92
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 22:48:33 2010 +0000
rev_thread_*: unindent and split out
This should make classes easier to find and hopefully make
our code easier to follow.
commit 6741aa27e4c35724b5306644d3a391fce415b0c7
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 21:46:46 2010 +0000
rainbows/rev/* require/autoload cleanup
One line of code saved! We'll also avoid loading
DeferredChunkResponse which is rarely needed
(unlike DeferredResponse).
commit 869e0d5da8cbe8959983ed66e2b4c31dc7a37d92
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 21:40:34 2010 +0000
rename rev/thread => rev/thread_client
While we're at it, unindent
commit c1655a501fc26f7100dd788b42a1914be833fea4
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 21:33:21 2010 +0000
rev_thread_spawn: disable under Ruby 1.8
It still burns CPU at the first sign of doing anything
interesting, so stop it. Ruby 1.9 is the future :P
commit fb7d5dbf06f8ce92a23b50a0cc45be3e7b55fccd
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 21:27:08 2010 +0000
GNUmakefile: fix packaging task
Oops
commit 7bfd7995fd403f80940e3f6ac36f9ae58b7040cb
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 03:30:36 2010 +0000
avoid HttpParser#keepalive? and HttpParser#reset
The HttpParser#next? method will come with keepalive protection
for Rainbows!, which can prevent clients from monopolizing a
server with excessive pipelining/keepalive requests.
commit 92a11cdfe00c5e551388c2cc1a62bfc59d568c6f
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 09:50:06 2010 +0000
bump Unicorn dependency
Unicorn 3.2.1 gives us an improved HttpParser#next? that
preserves state until the next HttpParser#parse call.
commit 17156f6f561c6d697a83e3b9beae2d58eb796428
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 03:29:16 2010 +0000
rainbows/rev/*: uninident some more
This makes constant resolution more predictable, we hope.
commit 68accc9930b0653b702553790d4ccd626a8dfdfe
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 03:09:47 2010 +0000
rev: split out Rainbows::Rev::Server
One file per class/module should be easier for new
hackers to find. Unindent rainbows/rev/core while
we're at it, too.
commit a35fd37ff0c81ca8130c18b7b77957bafe686f83
Author: Eric Wong <normalperson@yhbt.net>
Date: Sun Dec 26 03:00:11 2010 +0000
rev: unindent, needless autoload
Deferred* classes will get loaded anyways since
Rainbows::Rev::Client hit them in case statements.
commit 43e3d3f7a8dd2b184c8485469c2acff3dac34009
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Dec 24 08:52:55 2010 +0000
doc: switch documentation generation to wrongdoc
It is a common base so we can share documentation tasks
more easily with Unicorn and it ensures our RDoc no longer
has JavaScript in it!
commit 7e0dc42f7084e1719456a80b2e44049133c2e8b7
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 20 00:54:17 2010 +0000
thread_timeout: fix bad comparison
This was causing unrelated requests to get killed every
+timeout+ seconds, instead of only the ones that were
running too long.
Noticed-by: ghazel@gmail.com
ref:
http://mid.gmane.org/AANLkTi=7OhyTwkHsp_rXU7Gp1PokihiQ9bJigpO-BfN6@mail.gmail.com
commit 886e0a006d9e8e9c586beae28ed4dc5097064e90
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Dec 20 03:41:48 2010 +0000
thread_timeout: avoid a threading bug under 1.9
Because of the lack of GVL-releasing syscalls in this branch
of the thread loop, we need Thread.pass to ensure other threads
get scheduled appropriately under 1.9. This is likely a threading
bug in 1.9 that warrants further investigation when we're in a
better mood.
commit 7e2bb251228a30c0d4e66029b20bbbf85bc99a09
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Dec 14 18:36:34 2010 -0800
FAQ: add a note about config.threadsafe!
At least one user ran into it:
http://mid.gmane.org/AANLkTikegPX2-6Q93++bz_aLt+9nLPJXjg+NkL8tDjeE@mail.gmail.com
commit 2bb3f8fd600bd0aabe5e4d7c3d1f99d745fc8f49
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 9 17:14:04 2010 -0800
respect client_body_buffer_size in Unicorn 3.1.0
This is only needed for concurrency options that
do not use TeeInput, since TeeInput automatically
handles this for us.
commit af3629e6bd88b5744016a1c6217c00c37ef5a376
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 9 14:42:18 2010 -0800
bump Unicorn dependency to 3.1.0
We'll be taking advantage of configurable
client_buffer_body_size soon.
commit 7b51a4b5e16734bae6fe60d180c3906f96235da4
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 9 14:22:16 2010 -0800
thread_timeout: de-Struct-ify
Avoid exposing internals, it's also slightly faster to
access ivars directly rather than using method calls.
commit 6b750f5f952963009a2e6e8702fc8f3d8adc94ea
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Dec 8 18:35:27 2010 -0800
respect "rewindable_input false" in Unicorn config
This was completely overlooked for the Rainbows 2.0.x
releases.
commit 10d96a76a1ea4431dd10ba181d747169c22c1cec
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Dec 8 13:38:52 2010 -0800
t/*.sh: indentation fixes
We use real tabs for indenting shell code since it is not Ruby.
commit 1562a19a021a72a78ba495328d2d37ba0dc83b8c
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Dec 7 12:11:51 2010 -0800
rev+revactor: fix LARGE pipelined uploads
Large uploads behave differently with regard to buffering,
and there were bugs in the way the Rev and Revactor backends
handled uploads.
commit b4835c6d542c6369f2523ab68fc41b0202d7c6dc
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Dec 3 01:23:11 2010 +0000
Rainbows! 2.0.1 - upload pipelining fixes
For HTTP clients living on the edge and pipelining uploads, we
now fully support pipelined requests (as long as the application
consumes each request in its entirety).
commit c096e735efea5050b0559748633403f0387ea3b3
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Dec 3 01:12:08 2010 +0000
fix pipelining of requests with bodies
All synchronous models have this fixed in unicorn 3.0.1,
so only Rev and EventMachine-based concurrency models
require code changes.
commit 64889d9136fa5466269232c26a2f235dd763d8f0
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Dec 2 07:38:14 2010 +0000
ev_core: refactor and split cap_input out
Hopefully it makes more sense now and is easier to
digest for new hackers.
commit 945b5760d86b9dd00e65bd0625b98cf75f6a8257
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Dec 1 21:29:34 2010 -0800
ev_core: split out prepare_request_body
We may have other uses for this in the future...
commit 90789761f0cc78d3726f3a2eda1c5fe95c015ac2
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Nov 19 19:09:59 2010 -0800
Rainbows! 2.0.0 - minority rules!
This release is targeted at the minority of web applications
that deal heavily with uploads.
Thanks to Unicorn 3.x, we now support HTTP keepalive for
requests with bodies as long as the application consumes them.
Unicorn 3.x also allows disabling the rewindability requirement
of "rack.input" (in violation of the Rack 1.x spec).
The global client_body_max_size may also be applied per-endpoint
using the Rainbows::MaxBody middleware described in:
http://rainbows.rubyforge.org/Rainbows/MaxBody.html
commit c33878ac0f9f990aaa2054f8f00674d61bf5c848
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Nov 20 03:10:09 2010 +0000
tests: depend on Unicorn 3.0.0
Unicorn 3.0.0 is final and released, so we will use it in our
tests
commit a5986295bfb7bd7c44c863e4670f16481097c7fc
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Nov 19 18:55:06 2010 -0800
revactor: fix braindamaged commit/coding style
Oops, last commit was rushed
commit da9dfc1dece4fbcdf2a8e8ccdb4914ce4aa3a998
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Nov 19 18:39:02 2010 -0800
simpler keepalive check for synchronous models
Unicorn 3.x includes HttpParser#next? which will reset the
parser for keepalive requests without extra steps.
commit c6ffae22748bc22d5ef88fea2a3ca67f480ee74b
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Nov 19 10:19:45 2010 +0000
max_body: rewrite wrappers to be safer
To avoid denial-of-service attacks, the wrappers need to
intercept requests *before* they hit the memory allocator, so we
need to reimplement the read(all) and gets cases to use
smaller buffers whenever the application does not specify one.
commit 3cee07d750f678af92318c14110c803be3f9b97f
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Nov 19 10:19:44 2010 +0000
max_body: do not enable for RevThread* models
Those already use CapInput, just like the rest of the evented
Rainbows! world.
commit 00b854e37391322c05cc16115b245d855b4970be
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Nov 19 10:19:43 2010 +0000
upgrade to Kgio 2.x and Unicorn 3.x
Kgio 2.0.0 has a superior API and less likely to conflict or
blow up with other applications. Unicorn 3.x requires Kgio 2.x,
too.
commit 0f00424be24806791f2b253ddac6d35102842646
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Nov 17 10:06:45 2010 -0800
test_isolate: depend on newer Unicorn
It allows disabling rewindable input and contains
simpler code for upload processing.
commit 31cf77e7aa2f2e6065e7ace44e55c3f042b51f1b
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Nov 16 16:16:42 2010 -0800
reimplement client_max_body_size handlers
This allows the client_max_body_size implementation to not rely
on Unicorn::TeeInput internals, allowing it to be used with
Unicorn::StreamInput (or any other (nearly)
Rack::Lint-compatible input object).
commit 42747db815ad668b20849afb2a9dcdd1319713ae
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Nov 2 12:32:23 2010 -0700
avoid Errno::EAGAIN, harder
Errno::EAGAIN is still a problem under Ruby 1.9.2, so try harder
to avoid it and use kgio methods. Even when 1.9.3 is available,
kgio will still be faster as exceptions are slower than normal
return values.
commit 427ef4a2953a4b2d34f7dd89566a0cb5ee6e734d
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Nov 2 11:49:17 2010 -0700
avoid Kgio::WaitReadable/WaitWritable constants
The underlying symbolic names are easier to type and
recommended.
commit ed3a30dcfb5489447dec9c3f73e8bec9dbf7713a
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Nov 4 19:52:35 2010 -0700
process_client: fix attempted keepalive on HTTP 0.9
The long-term goal is to make the Unicorn API more terse when
handling keepalive.
commit 9f185041fb7af4cda21ba2d547fd4d16d9b2e453
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Oct 28 08:42:09 2010 +0000
Rainbows! 1.0.0 - internal cleanups
This release is merely a milestone in our evolving internal API.
Use of kgio may result in performance improvements under Ruby
1.9.2 with non-blocking I/O-intensive workloads.
The only bugfix is that SIGHUP reloads restores defaults on
unset settings. A similar fix is included in Unicorn 2.0.0
as well.
commit 015635f877084cc05a9e6e4c1430c70279d0a04e
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Oct 28 08:40:12 2010 +0000
tests: avoid race conditions on reload tests
We need to ensure the old worker is really dead before sending
requests after reloading.
commit b06c6b3ac214bc598d499c994884113d5b106e90
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Oct 28 08:29:53 2010 +0000
t0018: wait for old worker to be reaped
On busy machines, old workers may not shutdown quickly
enough and may still be processing requests.
commit f84f138233be0607b0151a5a28c3f9190ba336a2
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Oct 28 08:20:37 2010 +0000
rev+event_machine: small cleanups with new parser API
These allow for small reductions in the amount of variables
we have to manage, more changes coming with later Unicorns.
commit c4579db76b9ed5b0286fad852e798e8a890f093c
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Oct 28 02:17:25 2010 +0000
HUP reload restores defaults on unset settings
For consistency, changed settings are reset back to
their default values if they are removed or commented
out from the config file.
commit 83644e02068311c7ff9cdbc63efd4764d1518138
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Oct 27 23:52:28 2010 +0000
use Unicorn 2.0.0 final
Unicorn 2.0.0 has CPU wakeup reductions.
commit 2b9503566759678c9fbd7b01d1b5f487854208db
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Oct 26 21:36:02 2010 +0000
Rakefile: updates for prereleases
We do prereleases, now.
commit a47cd4a7f392a76357ed4f3e458797ae1f9c8f25
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Oct 26 21:26:03 2010 +0000
Rainbows! 1.0.0pre1 - kinder, gentler I/O
Mostly internal changes for kgio (and Unicorn) integration.
There should be no (supported) user-visible changes from
Rainbows! 0.97.0. kgio should improve performance for
concurrency models that use non-blocking I/O internally,
especially under Ruby 1.9.2
commit 0298a6743f2cadf8c8e47a298c5b35505b74af46
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Oct 26 21:20:45 2010 +0000
gemspec: bump development dependency of Isolate
Might as well go with the latest and greatest,
it has saner defaults at least.
commit 567e6ce5dba5ad2cca2cca8c64123e27939bff2b
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Oct 26 21:13:10 2010 +0000
doc: RDoc updates
Once again we avoid documenting internals on the public
website and use code comments for other developers.
commit 894cb73887c106acc793f0317ee849ae215ead56
Author: Eric Wong <normalperson@yhbt.net>
Date: Mon Oct 25 22:15:47 2010 +0000
reduce dependency on IO#write_nonblock
kgio_trywrite is superior if it is available.
commit 4ee6e0dafeb1b7af28fa90ae27c1a1a04aa8e852
Author: Eric Wong <normalperson@yhbt.net>
Date: Sat Oct 23 00:42:04 2010 +0000
http_request: remove this (sub)class
It does not appear to be needed, for now, since the
parser and Unicorn::HttpRequest are one and the same.
commit 180485d49ea858f83ef2a28a9e07224aa514edc7
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Oct 22 16:21:03 2010 -0700
unindent most files
This simplifies and disambiguates most constant resolution
issues as well as lowering our identation level. Hopefully
this makes code easier to understand.
commit 41145ed4d335718ac43aec9313b7571a12fe96ee
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Oct 22 15:31:47 2010 -0700
local.mk.sample: remove testing under 1.9.1
Ruby 1.9.2 has been out for a while and is the stable
release nowadays.
commit b595ad7333ff85452b229674c6726e40d2cf7bb9
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Oct 22 18:55:46 2010 +0000
README: update copyright year
This project is over 1 year old!
commit 4a568eeb7d17885579790d0ae004f04aa13479cb
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Oct 22 02:50:09 2010 +0000
dev_fd_response: do not wrap for Fiber-aware IOs
Applications may use wait_readable-aware methods directly
to work with Rainbows!
commit 6d46978bdc8d2ee4263431ecdcada53389b12597
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Oct 22 02:51:18 2010 +0000
fiber_{pool,spawn}: unindent
Reduces confusion for constant resolution/scoping rules
and lowers LoC.
commit 03806d2b44c2d3cee75258ee9e83d671e751baeb
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Oct 22 02:38:40 2010 +0000
fiber_pool: no need for old Fiber::IO
Rainbows::Client takes care of the I/O wait/read-ability
for us already.
commit 15631717fce044fbad2f386a7b1c7daf4bdd83d2
Author: Eric Wong <normalperson@yhbt.net>
Date: Thu Oct 21 16:25:39 2010 -0700
code shuffling for kgio
Despite the large number of changes, most of it is code
movement here.
commit d4a2b5dd2b85f4b2d3bb120ee1e1b0dde31bc25c
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Oct 20 17:48:58 2010 -0700
unicorn 2.x updates + kgio
We get basic internal API changes from Unicorn,
code simplifications coming next.
commit a085ba3586756ac1f778d2862f75889de2449b0e
Author: Eric Wong <normalperson@yhbt.net>
Date: Wed Oct 20 17:48:57 2010 -0700
http_server: more descriptive error for debugging
Sometimes we have stupid syntax or constant resolution
errors in our code.
commit ad821f70a2488a91f2be1ac53cb2e64f50743989
Author: Eric Wong <normalperson@yhbt.net>
Date: Tue Sep 28 17:40:01 2010 -0700
start using kgio library
It removes the burden of byte slicing and setting file
descriptor flags. In some cases, we can remove unnecessary
peeraddr calls, too.
commit 11c75ec06ce72cea0c760161dc01a196500aa293
Author: Eric Wong <normalperson@yhbt.net>
Date: Fri Sep 17 08:55:35 2010 +0000
event_machine: remove unnecessary "return"
Noise is bad.
|