Overview
Comment: | Reverting the streamlining of http-client requests - speeding up that side of the equation made things worse :) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | refactor-api |
Files: | files | file ages | folders |
SHA1: |
36f34a3662690d1fb775b3044676a840 |
User & Date: | mrwellan on 2013-07-29 17:53:32 |
Other Links: | branch diff | manifest | tags |
Context
2013-08-06
| ||
23:55 | Brought recent changes back into the api refactor branch so work can continue on new api check-in: 4692ce2dad user: matt tags: refactor-api | |
2013-07-29
| ||
17:53 | Reverting the streamlining of http-client requests - speeding up that side of the equation made things worse :) check-in: 36f34a3662 user: mrwellan tags: refactor-api | |
17:38 | More refactoring of api/transport check-in: b67dc2e04b user: mrwellan tags: refactor-api | |
Changes
Modified http-transport.scm from [36b97a3388] to [e77ae27b79].
︙ | ︙ | |||
256 257 258 259 260 261 262 | #t)) ;; (thread-sleep! (/ (if (> numretries 100) 100 numretries) 10)) ;; (set! numretries (- numretries 1)) ;; #t)) ;; send the data and get the response ;; extract the needed info from the http data and ;; process and return it. (let* ((send-recieve (lambda () | | | | | | | | | > | > > > | | | | | | | | | 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 | #t)) ;; (thread-sleep! (/ (if (> numretries 100) 100 numretries) 10)) ;; (set! numretries (- numretries 1)) ;; #t)) ;; send the data and get the response ;; extract the needed info from the http data and ;; process and return it. (let* ((send-recieve (lambda () ;; (let ((dat #f) ;; (cleanup (http-transport:get-time-to-cleanup))) ;; (if cleanup ;; (begin ;; (debug:print-info 0 "Running cleanup mode") ;; (http-transport:inc-requests-and-prep-to-close-all-connections)) ;; (http-transport:inc-requests-count)) ;; ;; Do the actual data transfer (mutex-lock! *http-mutex*) ;; Hypothesis is that this was *not* the bottleneck (set! res (with-input-from-request ;; was set! dat fullurl (list (cons 'dat msg)) read-string)) (close-all-connections!) (mutex-unlock! *http-mutex*) )) ;;(if cleanup ;; ;; mutex already set ;; (begin ;; (set! res dat) ;; (http-transport:dec-requests-count-and-close-all-connections)) ;; (http-transport:dec-requests-count ;; (lambda () ;; (set! res dat))))))) (time-out (lambda () (thread-sleep! 45) (if (not res) (begin (debug:print 0 "WARNING: communication with the server timed out.") (mutex-unlock! *http-mutex*) (http-transport:client-send-receive serverdat msg numretries: (- numretries 1)) |
︙ | ︙ | |||
334 335 336 337 338 339 340 | ;; extract the needed info from the http data and ;; process and return it. ;; (with-input-from-request "http://localhost/echo-service" ;; '((test . "value")) read-string) (let* ((send-recieve (lambda () | | | | | | | > | > > > | | | | | | | | | 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 | ;; extract the needed info from the http data and ;; process and return it. ;; (with-input-from-request "http://localhost/echo-service" ;; '((test . "value")) read-string) (let* ((send-recieve (lambda () ;; (let ((dat #f) ;; (cleanup (http-transport:get-time-to-cleanup))) ;; (if cleanup ;; (http-transport:inc-requests-and-prep-to-close-all-connections) ;; (http-transport:inc-requests-count)) ;; ;; Do the actual data transfer NB// KEPP THIS IN SYNC WITH http-transport:client-send-receive (mutex-lock! *http-mutex*) (set! res (with-input-from-request ;; was dat fullurl (list (cons 'key "thekey") (cons 'cmd cmd) (cons 'params params)) read-string)) (close-all-connections) (mutex-unlock! *http-mutex*) )) ;; (if cleanup ;; ;; mutex already set ;; (begin ;; (set! res dat) ;; (http-transport:dec-requests-count-and-close-all-connections)) ;; (http-transport:dec-requests-count ;; (lambda () ;; (set! res dat))))))) (time-out (lambda () (thread-sleep! 45) (if (not res) (begin (debug:print 0 "WARNING: communication with the server timed out.") (mutex-unlock! *http-mutex*) (http-transport:client-api-send-receive serverdat cmd params numretries: (- numretries 1)) |
︙ | ︙ |