0

I am working with BeagleBone. I need to have two services. One is simple web application to make configuration (call i an A) , and other is application that use that configuration (call it a B).

So the problem is when I connect to TingoDB over mongoose/tungus with both applications at the same time. If I am connected at the same time and add something to database from A application, I can see the change in file, but the B application that uses that database cant see that change. I don't know why because every time I need to read from database, in B application, I connect all over again, read, and then disconnect.

When I restart B application it's working fine, and uses the "newest" data. Is there any way to see these changes or read directly from file.

1 Answers1

1

From the source it appears that the file is only read from on collection init, until you close it and init it again. This is far from ideal for multiple services accessing concurrently. Further, I don't see any code that would support concurrent access from multiple processes.

Since Tingo purports to be a clone of Mongo with respect to API, and your use case exceeds what it appears Tingo was designed to accommodate, I would suggest migrating your project to use MongoDB instead.

Will
  • 2,163
  • 1
  • 22
  • 22