OSSP CVS Repository

ossp - Check-in [2572]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2572
Date: 2002-Oct-14 10:05:49 (local)
2002-Oct-14 08:05:49 (UTC)
User:mlelstv
Branch:
Comment: more brains storming

PR: Submitted by: Reviewed by: Approved by: Obtained from:

Tickets:
Inspections:
Files:
ossp-pkg/sio/BRAINSTORM.txt      1.1 -> 1.2     61 inserted, 0 deleted

ossp-pkg/sio/BRAINSTORM.txt 1.1 -> 1.2

--- BRAINSTORM.txt       2002/10/07 13:49:31     1.1
+++ BRAINSTORM.txt       2002/10/14 08:05:49     1.2
@@ -302,3 +302,64 @@
 int         sio_pop      (sio_t *sio);
 int         sio_swap     (sio_t *sio1, sio_t *sio2);
 
+###########################################################################
+
+mlelstv sez:
+
+sio pipe:
+- two chains of handlers for reading and writing
+- "bucket brigade"-buffers, degenerates to static buffer(ptr,len)
+- handler degenerates to (handle,read(2),write(2)) ?
+
+dispatching:
+- sio_strategy(chain)
+  h = chain;
+  while (h) {
+      if h->call(sio) // reader or writer
+        h = h->next;
+      else
+        h = h->prev;
+  }
+
+? eof/error propagation -> global flags, (byte offset ?)
+
+- sio_write(buf)
+  push sio->writebuffer, buf;
+  sio_strategy(sio->writers);
+  buf = pop sio->writebuffer;
+
+- sio_read(bound)
+  sio->readbuffer->append(buf);
+  sio_strategy(sio->readers);
+  pop sio->readbuffer;
+
+
+buffer:
+- bytestream(policy for chunks ?)
+- drop bytestream
+- append bytes to bytestream (ptr, len) == copy
+- prepend bytes to bytestream (ptr, len) == copy
+- append static buffer to bytestream
+- splice bytestream into new bytestream (offset, length, dest)
+- truncate bytestream (offset, length) == splice but drop data
+- traverse chunks of bytestream forward (offset, length)
+- traverse chunks of bytestream reverse (offset, length)
+- splice last chunk from bytestream (convenience function)
+- splice first chunk from bytestream (convenience function)
+- flatten chunks of bytestream into target buffer (convenience function)
+- garbage collection ? pullup ? seek cache ?
+- read consistency while traversing ?
+
+bytestream, chunks, buffer
+
+chunk memory allocator needed
+buffer memory allocator ?
+
+---
+
+stdio "emulation"
+
+fixed buffer <-> bytestream
+EOF handling
+
+

CVSTrac 2.0.1