-
Notifications
You must be signed in to change notification settings - Fork 0
/
implementation.txt
76 lines (53 loc) · 2.42 KB
/
implementation.txt
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
Postback Delivery Implementation
use hosts to set computer to resolve postback-agent.com to 45.55.35.202
browse to http://postback-agent.com/post-request.html
Stopwatch on sets timestamps to be visible in the endpoint's GET request
send the Postback Request with the 'Post to /ingest.php' button
response from ingest.php is printed to the browser
monitor service interactions in a shell with 'pm2 logs'
pop-from-redis is the node that pulls data from the redis queue and sends to the endpoint
receiver-one is the endpoint - it adds the received timestamp (down to milliseconds) in the response but does not see the timestamps unless stopwatch is 'on'
postback-monitor receives time data from receiver-one and charts it
still working on a visualization of the response times
this will be in a node that will be the default for the server
here I should show the pm2 logs
Known issues / Todo:
Set up postback-monitor.com to show server activity - IP address should default to here
I got this set up as a node based on the socket.io simple chat client
next up: create a branch based on this post:[http://stackoverflow.com/questions/27953338/socket-io-trigger-events-between-two-node-js-apps]
browsing to 45.55.35.202 redirects to http://postback-agent.com/ingest.php
posting from http://45.55.35.202/post-request.html errs out
Other notes
pm2 start/manage apps on restart
pop-from-redis - pops data from redis queue
receiver-one - test data receiver
pm2 logs
and
pm2 monit
after changing a node, use pm2 gracefulReload [all|appname]
test sending data to ingest
/var/www/postback-agent.com/html/post-request.html
data is pushed to redis list 'postbackQueue'
/var/www/postback-agent.com/html/ingest.php
data is popped from redis
/var/www/postback-agent.com/popper/app.js
data receiver
/var/www/receiver-one.com/app.js
Analytics
post-request.html
send with timestamp (S1) in object
receive and set another timestamp (R1)
push to redis with
- stopwatch = 'on' if S1 was sent - otherwise stopwatch = 'off'
- S1,R1 and another sent timestamp (S2)
pop from redis and set another timestamp (R2)
IF stopwatch = 'on' send S1,R1,S2,R2 and another timestamp (S3)
receiver-one.com
receive and set another timestamp (R3)
still to do
write to a log with data
response-time.com
read and average response times for each stage
show top 10 longest response times
show top 10 shortest response times
click to show response times for data posted within 2 seconds of that item