Overview
Comment: | Got the rpc server itself starting up |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | multi-transport |
Files: | files | file ages | folders |
SHA1: |
52321931b3f444c488d0c8bad4916871 |
User & Date: | matt on 2014-03-03 21:41:49 |
Other Links: | branch diff | manifest | tags |
Context
2014-03-03
| ||
22:46 | Added skeleton of client:setup for rpc check-in: e1d58e8335 user: matt tags: multi-transport | |
21:41 | Got the rpc server itself starting up check-in: 52321931b3 user: matt tags: multi-transport | |
12:39 | Fixed compilation check-in: 951ec894b7 user: mrwellan tags: multi-transport | |
Changes
Modified common.scm from [03bd87c740] to [4eb1de6666].
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + | (define *passnum* 0) ;; when running track calls to run-tests or similar ;; DATABASE (define *open-dbs* (vector #f (make-hash-table))) ;; megatestdb run-id-dbs ;; SERVER (define *my-client-signature* #f) |
︙ |
Modified http-transport.scm from [3720684b06] to [b1f2a5135d].
︙ | |||
89 90 91 92 93 94 95 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - - - - - - - - - - - - - - - - - - - - - | ((equal? (uri-path (request-uri (current-request))) '(/ "api")) (send-response body: (api:process-request db $) ;; the $ is the request vars proc headers: '((content-type text/plain))) (mutex-lock! *heartbeat-mutex*) (set! *last-db-access* (current-seconds)) (mutex-unlock! *heartbeat-mutex*)) |
︙ | |||
327 328 329 330 331 332 333 334 335 336 337 338 339 340 | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | + + | (* 60 60 (string->number tmo)) ;; (* 3 24 60 60) ;; default to three days ;; (* 60 1) ;; default to one minute (* 60 60 25) ;; default to 25 hours )))) (let loop ((count 0) (server-state 'available)) ;; Use this opportunity to sync the inmemdb to db (let ((start-time (current-milliseconds)) (sync-time #f) (rem-time #f)) (if *inmemdb* (db:sync-touched *inmemdb* force-sync: #t)) (set! sync-time (- (current-milliseconds) start-time)) |
︙ |
Modified megatest.scm from [34c738736b] to [798f749abb].
︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | + | (declare (uses launch)) (declare (uses server)) (declare (uses client)) (declare (uses tests)) (declare (uses genexample)) (declare (uses daemon)) (declare (uses db)) (declare (uses tdb)) (declare (uses mt)) (declare (uses api)) (declare (uses tasks)) ;; only used for debugging. (define *db* #f) ;; this is only for the repl, do not use in general!!!! |
︙ |
Modified rpc-transport.scm from [f4c768be5b] to [c41c92f350].
︙ | |||
64 65 66 67 68 69 70 | 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 | - + - + - - - + + + - - + + - + + + + + + - - | (rpc-transport:run (if (args:get-arg "-server") (args:get-arg "-server") "-") run-id server-id)) "Server run")) (th3 (make-thread (lambda () |
︙ | |||
159 160 161 162 163 164 165 166 167 168 169 | 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 | + - - - + + - - - - - - - - - - - - - - - - - - + + + + - - + - - - + + + - + - + - + - - - + + - | ;; ;; (rpc:publish-procedure! ;; 'cdb:flush-queue ;; (lambda () ;; (debug:print-info 12 "Remote call of cdb:flush-queue") ;; (cdb:flush-queue))) ;; ;;====================================================================== ;; ;; end of publish-procedure section ;;====================================================================== ;; |
︙ |
Modified server.scm from [86d77ff5d9] to [a8caddcfa8].
︙ | |||
57 58 59 60 61 62 63 | 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 | - - - - - - + + + + + + + + + - - - + + + - | ;;====================================================================== ;; S E R V E R U T I L I T I E S ;;====================================================================== ;; Get the transport (define (server:get-transport) |
︙ |
Modified tasks.scm from [677b9b3c1c] to [d0fac30298].
︙ | |||
103 104 105 106 107 108 109 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | - - - - - - - - - + + + + + + + + + | ;; register that this server may come online (first to register goes though with the process) (define (tasks:server-set-available mdb run-id) (sqlite3:execute mdb "INSERT INTO servers (pid,hostname,port,pubport,start_time, priority,state,mt_version,heartbeat, interface,transport,run_id) VALUES(?, ?, ?, ?, strftime('%s','now'), ?, ?, ?,-1,?, ?, ?);" |
︙ |