From: Nicolas B. <ni...@ma...> - 2004-10-07 14:50:43
|
Colin McCormack wrote: > > >Good idea for a project sometime. > >DFSA = Deterministic Finite State Automaton. State machine. > > > Wow... >>>One facility you should become familiar with is [Httpd_Suspend] and >>>[Httpd_Resume], which allows you to leave the connection open (for some >>>period) while processing other incoming connections. It might be useful >>>in this application. >>> >>> > > > >>I think in this case I would probably want the opposite; meaning I want >>to complete my current mk transaction before moving on >>to the next... >> >> > >Yes, you want to serialise mk transactions, but you can't serialise web >transactions ... they come in whenever someone initiates a connection. > >So you need to be able to put a web transaction on hold, pending the >release of the mk lock. One way to do this, I think, is to place >pending requests which are waiting on a lock into a queue, suspend the >connection, and then restart one of them when the lock is released. A >kind of poor-man's multitasking. > > Well, right now what I do is grab a record identifier (oid) from a counter when someone wants to add a record. The next person would grab the next oid... User fills in form and submits..at this point, I append to the mk db. Assuming someone else tries to appends at the same time, I would think tclhttpd would first complete the one of the appends and then move on to the next..Correct?? From then on, I just use the oid pointing to the table row to read/write from it. I dont delete rows live (which shifts rows and might confuse mk) >Otherwise, when a new connection comes in, what're you going to do? > If the server is busy (talking ms here, the users browser responds a little slower before it writes and re-directs...) > >Return an error page? > > got to go, let's resume this tommorrow.. nicolas |