Any project started for libmongoc?

tirithen tirithen at gmail.com
Tue Dec 10 14:21:44 UTC 2019


On Tuesday, 10 December 2019 at 09:29:12 UTC, Daniel Kozak wrote:
> On Tue, Dec 10, 2019 at 9:55 AM tirtihen via Digitalmars-d 
> <digitalmars-d at puremagic.com> wrote:
>>
>> Hi, I'm fairly new to the D language, I found it when searchi
>> Is there anyone else that have started on this or similar 
>> MongoDB
>> driver already?
>
> Have you looked at:
> https://code.dlang.org/packages/mondo
> https://github.com/2night/mondo

Yes, I did briefly, I read an article about that team in the blog 
as well and it seems they are using the code for their online 
magazine, which is a plus.

But when I search for "transaction" or "session" on GitHub I 
don't get any hits. It seems like both mondo and vibe.d is fine 
for plain queries. But for my use case I need the document that 
is about to be inserted have the next incremental index and also 
a hash of the previous document as I'm trying to build a 
blockchain/event store kind of application that is also supposed 
to run on a MongoDB database setup with replicated instances that 
all needs to agree on the next index for the next document.

The only way I can think of making this work is with a 
transaction that reads the previous document and increments and 
takes the hash from that. Possibly I need to lock the entire for 
writing collection as well across the replicas. MongoDB version 
4+ seems to have a lot of these features, and D seems like a nice 
language to write the application in. I just need to find a good 
enough driver somehow. As I'm still new to D the challenge is 
enough getting the transactions/locking and blockchain/event 
store right. :D


More information about the Digitalmars-d mailing list