Hi Kashyap,

> 1. Open pil + from terminal 1 and run (pool "test.db")
> 2. Open pil + from terminal 2 and run (pool "test.db")

Ah, no, this wont't work. Two separate processes don't know of each other and
can't synchronize.

Normally, browser sessions connect to one port (e.g. 80 or 8080) where the
parent process listens, and get their own session (child process of the parent).

Alternatively (without a browser, just REPL) you can use bin/psh
to create a terminal session or connect to a running session
by passing the port and session ID.


> 3. Run (put '{1} 'X 10) followed by (commit) in terminal 1
> 4. Run (get '{1} 'X) from terminal 2 -> we get 10 as expected
> 5. Run (put '{1} 'Y 20) followed by (commit) in terminal 1
> 6. Run (get '{1} 'Y) from terminal 2 -> this returns NIL

This is fatal, and creates havoc in the DB. Ends up wit a corrupted DB in the
worst case.


> I suppose the two processes in the above sequence are not a family so the
> scenario is not identical and perhaps the above is expected.

Yes, exactly! Only a "family" of processes guarantees consistent concurrent
modifications.

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to