Comment: | wip, getting closer to tcp6 based approach working |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.6584-tcp6 |
Files: | files | file ages | folders |
SHA1: |
0dbc0e622558456a197658abb4fc0fd5 |
User & Date: | matt on 2021-06-01 05:43:13 |
Other Links: | branch diff | manifest | tags |
2021-06-01
| ||
08:40 | wip check-in: fba10f42b6 user: matt tags: v1.6584-tcp6 | |
05:43 | wip, getting closer to tcp6 based approach working check-in: 0dbc0e6225 user: matt tags: v1.6584-tcp6 | |
2021-05-29
| ||
05:15 | wip check-in: 8e59940d89 user: matt tags: v1.6584-tcp6 | |
Modified apimod.scm from [43bf5f787b] to [bcadf5a9f5].
401 402 403 404 405 406 407 | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - + - + - - + + | ;; http-server send-response ;; api:process-request ;; db:* ;; ;; NB// Runs on the server as part of the server loop ;; |
Modified commonmod.scm from [5348abd36a] to [47e2c99089].
3779 3780 3781 3782 3783 3784 3785 | 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 | - + | (define (string->sexpr instr) (handle-exceptions exn (begin (debug:print 0 *default-log-port* "ERROR: string->sexpr bad input \""instr"\"") #f) (with-input-from-string instr |
Modified fullrununit.sh from [12bf13749e] to [e6c2056159].
1 2 3 4 5 | 1 2 3 4 5 6 | - + | #!/bin/bash (killall mtest -v;sleep 1;killall mtest -v -9;rm -f tests/simplerun/.db/* tests/simplerun/logs/* tests/basicserver.log) & ck5 make -j install && wait && |
Modified rmtmod.scm from [df6ad4612b] to [3c6fe3273a].
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | + - + | chicken.port chicken.pretty-print chicken.process chicken.process-context chicken.process-context.posix chicken.sort chicken.string ;; chicken.tcp |
270 271 272 273 274 275 276 | 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | - - + + | (conns *rmt:remote*) (dbname (db:run-id->dbname rid))) (rmt:general-open-connection conns apath dbname) (rmt:send-receive-real conns apath dbname cmd params))) (define (rmt:send-receive-setup conn) (if (not (rmt:conn-inport conn)) |
294 295 296 297 298 299 300 301 302 303 304 305 306 307 | 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | + + | (write payload (rmt:conn-outport conn)) (with-input-from-port (rmt:conn-inport conn) read-string)))) (if (string? res) (string->sexpr res) res)))) ;; db is at apath/.db/dbname, rid is an intermediary solution and will be removed ;; sometime in the future. ;; ;; Purpose - call the main.db server and request a server be started ;; for the given area path and dbname ;; |
1808 1809 1810 1811 1812 1813 1814 | 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 | - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - | all-pkt-files))) (define (server-address srv-pkt) (conc (alist-ref 'host srv-pkt) ":" (alist-ref 'port srv-pkt))) (define (server-ready? host port key) ;; server-address is host:port |
Modified tests/unittests/basicserver.scm from [fc6484b63a] to [a2f1479995].
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 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 | + - + + + | ;; Run like this: ;; ;; ./rununittest.sh server 1;(cd simplerun;megatest -stop-server 0) (import rmtmod trace http-client apimod dbmod launchmod) (trace-call-sites #t) (trace ;; db:get-dbdat ;; rmt:find-main-server rmt:send-receive-real rmt:send-receive ;; sexpr->string ;; server-ready? ;; rmt:register-server ;; rmt:open-main-connection rmt:general-open-connection ;; rmt:get-conny ;; common:watchdog ;; rmt:find-main-server ;; get-all-server-pkts ;; get-viable-servers ;; get-best-candidate |
68 69 70 71 72 73 74 75 76 77 78 79 80 81 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | + + + | (define apath *toppath*) (define dbname ".db/2.db") (define remote *rmt:remote*) (define keyvals '(("SYSTEM" "a")("RELEASE" "b"))) (test #f 'server-started (api:execute-requests *db* 'get-server (list *toppath* ".db/2.db"))) (set! *dbstruct-db* #f) (exit) (test #f #t (rmt:open-main-connection remote apath)) (test #f #t (rmt:conn? (rmt:get-conn *rmt:remote* *toppath* ".db/main.db"))) (test #f 'server-started (rmt:send-receive-real *rmt:remote* *toppath* ".db/main.db" 'get-server `(,apath ,dbname))) (thread-sleep! 2) (test #f #t (list? (rmt:general-open-connection *rmt:remote* *toppath* ".db/2.db"))) |