-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
notes
108 lines (88 loc) · 3.22 KB
/
notes
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
;; -*- mode: outline; outline-regexp: " *[-\+]"; indent-tabs-mode: nil; fill-column: 120 -*-
todo
-----------
- add additional optional plan and request to method calls
- example
-
- build headers
- provide static version in rgraphql
- headers({})
- build a text and set gql_headers
- CORS
- Access-Control-Allow-Origin: origin
- get origin from request or *
- Access-Control-Allow-Headers: *
- if OPTIONS use value of request Access-Control-Request-Headers
- Access-Control-Allow-Credentials: true
- Access-Control-Max-Age: 3600
- HTTP/2
- upgrade connection to http/2 (h2)
- handle like current conneciton but by stream instead for writing
-
- TLS
- openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -days 365 -subj '/CN=localhost'
- -nodes means no password
- graphql
- validation
- refs
- http://www.rubydoc.info/github/rack/rack/master/file/SPEC
- docs
- yardoc
- needs alterations
- cp misc/glue-diagram.svg doc
- cp misc/agoo_128.svg doc
- edit doc/index.html
- replace misc/agoo_128.svg with agoo_128.svg
- replace misc/xxx_md.html with file.xxx.html
- previous
- rdoc -t Agoo -m README.md -x "test/*" -x "example/*" -x extconf.rb
use nice -n19 perfer when on same machine
- tests
- cd test && tests.sh
- bin/agoo -I ext -I lib -I example -r simple /simple@Simple
- localhost:6464/simple
- cd example && rackup -I ../ext -I ../lib -r agoo -s agoo
- localhost:9292
- cd example && ruby -I ../ext -I ../lib config.rb
- localhost:9292
- cd example && ruby -I ../ext -I ../lib hello.rb
- localhost:6464/hello
- cd example && ruby -I ../ext -I ../lib tls.rb
- localhost:6465/hello
- cd example/push && rackup -I ../../ext -I ../../lib -r agoo -s agoo
- localhost:9292/websocket.html
- localhost:9292/sse.html
- cd example/push && ruby -I ../../ext -I ../../lib pubsub.rb
- localhost:6464/websocket.html
- localhost:6464/sse.html
- cd example/push && ruby -I ../../ext -I ../../lib push.rb
- localhost:6464/websocket.html
- localhost:6464/sse.html
- cd example && ruby -I ../ext -I ../lib mem.rb
- memory and performance with perfer
- perfer -t 2 -c 100 -k http://127.0.0.1:6464/hello -d 30
- top
- cd example && ruby memx.rb
- memory and performance with perfer, multiple workers
- cd example/graphql && ruby -I ../../ext -I ../../lib subscribe.rb
- localhost:6464/websocket.html
- localhost:6464/sse.html
- curl -w "\n" -H "Content-Type: application/graphql" -d 'mutation{repeat(word: "foo")}' localhost:6464/graphql
- curl -w "\n" -H "Content-Type: application/graphql" -d 'mutation{repeat(word: "bar")}' localhost:6464/graphql
- server log hook
- log callback grabs gvl
- remote cluster
- worker server
- connect, maybe with some kind of security
- server feeds to worker
- as packets arrive from con
- needs to attach a connection id to each packet
- worker reassemples
- or create packet on server and pick a worker to sent it to
- maybe based on how many outstanding to that worker and most recent latency
- multiple and pick lowest
- packet is con id + len + request
- doesn't die
- cd example/push && ruby -I ../../ext -I ../../lib push.rb
- localhost:6464/websocket.html
- localhost:6464/sse.html