Changeset 84 for branches/home/psmith/restructure
- Timestamp:
- 02/11/07 01:11:03 (18 years ago)
- Location:
- branches/home/psmith/restructure/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/home/psmith/restructure/src/event/epoll.lisp ¶
r76 r84 85 85 (-1 86 86 (let ((errno (get-errno))) 87 (format t "-1 returned from epoll-wait, errno ~A~%" errno)88 87 (if (eql errno 4) ;EINTR - interrupted by a system call 89 (return nil) 90 (error 'poll-error)))) 88 (return nil) 89 (progn 90 (format t "-1 returned from epoll-wait, errno:") 91 (perror) 92 (error 'poll-error))))) 91 93 (return nil) 92 94 (t -
TabularUnified branches/home/psmith/restructure/src/io/async-fd.lisp ¶
r74 r84 124 124 (defun write-more (async-fd) 125 125 "Write data from ASYNC-FD's write bytebuffer" 126 (format-log t "async-fd:write-more - called with ~A~%" async-fd)126 #+nio-debug (format-log t "async-fd:write-more - called with ~A~%" async-fd) 127 127 (with-slots (write-fd foreign-write-buffer close-pending) async-fd 128 128 #+nio-debug (format t "async-fd:write-more - foreign-write-buffer b4 flip ~A~%" foreign-write-buffer) -
TabularUnified branches/home/psmith/restructure/src/io/nio-server.lisp ¶
r82 r84 135 135 (t 136 136 (let ((async-fd (gethash fd client-hash))) 137 (format-log t "IO event ~A on ~A~%" event async-fd)137 #+nio-debug (format-log t "nio-server::start-server - IO event ~A on ~A~%" event async-fd) 138 138 (unless (null async-fd) 139 139 (catch 'error-exit -
TabularUnified branches/home/psmith/restructure/src/nio-logger/nio-logger.lisp ¶
r82 r84 43 43 44 44 (defun callback(result) 45 (nio-utils:format-log t "Result of remote-log ~A~%" result)) 45 #+nio-debug (nio-utils:format-log t "Result of remote-log ~A~%" result) 46 ) 46 47 47 48 … … 53 54 (with-line-from-tailed-file (text filename 1) 54 55 (let ((rpc (format nil "(nio-logger:remote-log \"~A\")" (cl-base64:string-to-base64-string text)))) 55 (nio-utils:format-log t "ToplevelSubmitting job~A~%" rpc)56 #+nio-debug (nio-utils:format-log t "nio-logger::tail-log Submitting job~A~%" rpc) 56 57 (nio:with-connected-nodes (node) 57 (nio-utils:format-log t "Toplevel sending ~A to ~A~%" rpc node)58 #+nio-debug (nio-utils:format-log t "Toplevel sending ~A to ~A~%" rpc node) 58 59 (nio-yarpc:remote-execute (nio:active-conn node) rpc #'callback))))) 59 60 -
TabularUnified branches/home/psmith/restructure/src/nio-logger/run-logging-client.lisp ¶
r82 r84 26 26 |# 27 27 28 (push :nio-debug *features*)28 ;(push :nio-debug *features*) 29 29 (require :asdf) 30 30 (require :nio-logger) -
TabularUnified branches/home/psmith/restructure/src/nio-logger/run-logging-server.lisp ¶
r72 r84 26 26 |# 27 27 28 (push :nio-debug *features*)28 ;(push :nio-debug *features*) 29 29 (require :asdf) 30 30 (require :nio-logger) -
TabularUnified branches/home/psmith/restructure/src/protocol/yarpc/yarpc-client-state-machine.lisp ¶
r83 r84 77 77 (let ((ttd (nio-compat:take (job-queue sm) :blocking-call nil))) 78 78 (when ttd 79 (format-log t "yarpc-client-state-machine:process-outgoing-packet got job ~A ~%" ttd)79 #+nio-debug (format-log t "yarpc-client-state-machine:process-outgoing-packet got job ~A ~%" ttd) 80 80 (destructuring-bind (job call-string) ttd 81 81 (setf (gethash (incf +request-id+) (request-map sm)) job) … … 83 83 84 84 (defmethod process-incoming-packet ((sm yarpc-client-state-machine) (response method-response-packet)) 85 85 #+nio-debug (format-log t "yarpc-client-state-machine:process-incoming-packet called :sm ~A :packet ~A~%" sm response) 86 86 (let* ((*package* (find-package :nio-yarpc)) 87 87 (result (read-from-string (response response))) 88 88 (request-id (request-id response))) 89 (format-log t "yarpc-client-state-machine:process-incoming-packet :result ~A :request-id ~A~%" result request-id)90 (maphash #'(lambda (k v) (format t "~a -> ~a~%" k v)) (request-map sm))89 #+nio-debug (format-log t "yarpc-client-state-machine:process-incoming-packet :result ~A :request-id ~A~%" result request-id) 90 ; (maphash #'(lambda (k v) (format t "~a -> ~a~%" k v)) (request-map sm)) 91 91 (let ((remote-job (gethash request-id (request-map sm)))) 92 92 (funcall (callback remote-job) result)))) … … 94 94 ;Execute the call-string on the remote node and call callback with the result 95 95 (defmethod remote-execute ((sm yarpc-client-state-machine) call-string callback) 96 (format-log t "yarpc-client-state-machine:remote-execute called :sm ~A :call-string ~A :callback ~A~%" sm call-string callback)96 #+nio-debug (format-log t "yarpc-client-state-machine:remote-execute called :sm ~A :call-string ~A :callback ~A~%" sm call-string callback) 97 97 (nio-compat:add (job-queue sm) (list (remote-job callback) call-string))) -
TabularUnified branches/home/psmith/restructure/src/protocol/yarpc/yarpc-packet-factory.lisp ¶
r82 r84 54 54 (let* ((packet-request-id (bytebuffer-read-32 buf)) 55 55 (ret-packet (ecase packet-id 56 (0 (progn (format-log t "yarpc-packet-factory:get-packet - got CALL-METHOD-PACKET-ID~%") (call-method-packet (bytebuffer-read-string buf (- packet-length +yarpc-packet-header-size+ +PACKET-REQUEST-ID-SIZE+)) :request-id packet-request-id))) 57 (1 (progn (format-log t "yarpc-packet-factory:get-packet - got METHOD-RESPONSE-PACKET-ID~%") (method-response-packet (bytebuffer-read-string buf (- packet-length +yarpc-packet-header-size+ +PACKET-REQUEST-ID-SIZE+)) :request-id packet-request-id)))))) 56 (0 (progn 57 #+nio-debug (format-log t "yarpc-packet-factory:get-packet - got CALL-METHOD-PACKET-ID~%") 58 (call-method-packet (bytebuffer-read-string buf (- packet-length +yarpc-packet-header-size+ +PACKET-REQUEST-ID-SIZE+)) :request-id packet-request-id))) 59 (1 (progn 60 #+nio-debug (format-log t "yarpc-packet-factory:get-packet - got METHOD-RESPONSE-PACKET-ID~%") 61 (method-response-packet (bytebuffer-read-string buf (- packet-length +yarpc-packet-header-size+ +PACKET-REQUEST-ID-SIZE+)) :request-id packet-request-id)))))) 58 62 (compact buf) 59 63 #+nio-debug (format-log t "yarpc-packet-factory:get-packet - after compact ~%~A~%" buf) -
TabularUnified branches/home/psmith/restructure/src/protocol/yarpc/yarpc-state-machine.lisp ¶
r82 r84 60 60 61 61 (defun run-job(&key (blocking t)) 62 (format-log t "yarpc-state-machine:run-job - Server toplevel waiting for job~%")62 #+nio-debug (format-log t "yarpc-state-machine:run-job - Server toplevel waiting for job~%") 63 63 (let ((server-job (nio-compat:take nio-yarpc:job-queue :blocking-call blocking))) 64 64 (when server-job 65 65 (destructuring-bind (job request-id result-queue) server-job 66 (format-log t "yarpc-state-machine:run-job - Server received job ~A~%" job)66 #+nio-debug (format-log t "yarpc-state-machine:run-job - Server received job ~A~%" job) 67 67 (nio-compat:add result-queue (list request-id (nio-yarpc:execute-call job))))))) 68 68 69 69 70 70 (defmethod process-outgoing-packet((sm yarpc-state-machine)) 71 (format-log t "yarpc-state-machine:process-outgoing-packet - called, polling the results-queue ~%" )71 #+nio-debug (format-log t "yarpc-state-machine:process-outgoing-packet - called, polling the results-queue ~%" ) 72 72 (let ((server-job (nio-compat:take (result-queue sm) :blocking-call nil))) 73 73 (when server-job 74 74 (destructuring-bind (request-id result) server-job 75 (format-log t "yarpc-state-machine:process-outgoing-packet - got :request-id ~A result ~A ~%" request-id result)75 #+nio-debug (format-log t "yarpc-state-machine:process-outgoing-packet - got :request-id ~A result ~A ~%" request-id result) 76 76 (method-response-packet result :request-id request-id))))) 77 77 78 78 ;Process a call method packet by placing it in the job-queue 79 79 (defmethod process-incoming-packet ((sm yarpc-state-machine) (call call-method-packet)) 80 (format-log t "yarpc-state-machine:process-incoming-packet - called :sm ~A :packet ~A~%" sm call)80 #+nio-debug (format-log t "yarpc-state-machine:process-incoming-packet - called :sm ~A :packet ~A~%" sm call) 81 81 (nio-compat:add job-queue (list (call-string call) (request-id call) (result-queue sm))) 82 82 (when +process-jobs-inline+ (run-job :blocking nil))) … … 108 108 (let* ((rpc-call-list (read-from-string call-string )) 109 109 (fn (member (symbol-function (first rpc-call-list)) *remote-fns* ))) 110 (format-log t "yarpc-state-machine:execute-call - fn ~A authorised? : ~A~%" (symbol-function (first rpc-call-list)) fn)110 #+nio-debug (format-log t "yarpc-state-machine:execute-call - fn ~A authorised? : ~A~%" (symbol-function (first rpc-call-list)) fn) 111 111 (if fn 112 112 (apply (first rpc-call-list) (rest rpc-call-list)) -
TabularUnified branches/home/psmith/restructure/src/statemachine/state-machine.lisp ¶
r78 r84 62 62 (buffer-too-small-error (read-err) 63 63 (if (recommend-buffer-size sm :read (recommended-size read-err)) 64 (progn 64 65 (format-log t "resized incomming buffer ~A~%"foreign-read-buffer) 66 nil) 65 67 (error 'not-implemented-yet-read-resize-failure)))))) 66 68 (format-log t "state-machine::process-read - incoming packet: ~A~%" incoming-packet)
Note: See TracChangeset
for help on using the changeset viewer.