aboutsummaryrefslogtreecommitdiff
path: root/NOTES.txt
blob: 1a4f2d211ca4f2d4c91a6a62643991a8dfe9326d (plain)
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
scratchpad for the development of iemnet
========================================

speed & syslocks
================
one bottleneck right now is the synchronisation with Pd's 
main thread to register a clock callback.
doing a sys_lock() whenever a package arrives will slow down things immensely.

alternatives:
 no sys_lock(): will eventually crash Pd (no option)
 use sys_trylock(): this might eventually fail to notify Pd of newly arrived 
                    packets (bad for throughput)
 external polling: no syslock needed at all, but more complicated
 keep track of clock_callback: "notified" flag tells us, whether we have already
           sent a notification which has not yet been handled...no need to notify again

 #4 looks most promising


tests for tcpclient/server:
	client disconnects -> server should get notified
	server disconnects -> client should get notified
	client crashes -> server should disconnect
	server crashes -> client should disconnect