1

I use Berkeley DB(BDB) in nginx. When a request arrives, nginx passes the URI as a key to BDB and checks if that key has a value in BDB file.

I actually did in an example. I add some data in BDB, and run nginx, it's OK. I can access it. But when I add some data in running BDB with nginx (using Python), I can't get the new data. Even I use the another python interpreter access the BDB file, it was actually has the new data.

Steps of the request in nginx:

  1. start up nginx, and it will init my plugin (BDB env and init)
  2. a request comes in
  3. control in plugin, check if key(uri) has a value. If true, return it, or pass
  4. ...rest of process
Dreampuf
  • 1,161
  • 1
  • 13
  • 28
  • possible duplicate of [can a berkeley database be opened and accessed from multiple programs at the same time?](http://stackoverflow.com/questions/1749885/can-a-berkeley-database-be-opened-and-accessed-from-multiple-programs-at-the-sam) – codeape Oct 19 '11 at 08:47
  • See the related question, I updated it with correct links to the Oracle documentation, including http://download.oracle.com/docs/cd/E17076_02/html/programmer_reference/lock.html – codeape Oct 19 '11 at 08:56

1 Answers1

1

it supports

  • A Single Process With One Thread
  • A Single Process With Multiple Threads
  • Groups of Cooperating Processes
  • Groups of Unrelated Processes
sjngm
  • 12,423
  • 14
  • 84
  • 114
wag
  • 26
  • 1
  • 1