digitalmars.D - Any project started for libmongoc?
- tirtihen (15/15) Dec 10 2019 Hi, I'm fairly new to the D language, I found it when searching
- JN (4/10) Dec 10 2019 You could give dpp (http://code.dlang.org/packages/dpp) a try, or
- tirithen (2/13) Dec 10 2019 Thanks, I'll give that a try this evening. :)
- Daniel Kozak (5/8) Dec 10 2019 Have you looked at:
- tirithen (21/31) Dec 10 2019 Yes, I did briefly, I read an article about that team in the blog
- Andrea Fontana (8/33) Dec 11 2019 Transactions and sessions were not available when I wrap
- Laeeth Isharc (4/14) Dec 11 2019 It's only just recently been ready and we had to get dpp working
- Adam D. Ruppe (5/7) Dec 10 2019 There's this fork https://github.com/symmetryinvestments/mondo/
- tirithen (5/12) Dec 10 2019 Thanks for the help, I'll have a look at that version of mondo as
Hi, I'm fairly new to the D language, I found it when searching for a fast compiled C-like language with less configuration than C++. I'm mainly a Node.js and Go developer previously so I guess I have been a bit spoiled with a lot of ready made off the shelf third party packages being available. I want to use it for web development and I'm looking for a good MongoDB driver. I have tried the one used by vibe.d but it lacks a lot of features and I'm now after some way of doing distributed transactions (https://docs.mongodb.com/manual/core/transactions/). There seem to be a good official C library (http://mongoc.org/) and D is supposed to be good at interfacing against C but it looks like quite a lot of work for a D beginner (around 50 header files). Is there anyone else that have started on this or similar MongoDB driver already?
Dec 10 2019
On Tuesday, 10 December 2019 at 08:53:52 UTC, tirtihen wrote:Hi, I'm fairly new to the D language, I found it when searching for a fast compiled C-like language with less configuration than C++. I'm mainly a Node.js and Go developer previously so I guess I have been a bit spoiled with a lot of ready made off the shelf third party packages being available. [...]You could give dpp (http://code.dlang.org/packages/dpp) a try, or DStep (https://code.dlang.org/packages/dstep) to generate the C bindings.
Dec 10 2019
On Tuesday, 10 December 2019 at 09:01:39 UTC, JN wrote:On Tuesday, 10 December 2019 at 08:53:52 UTC, tirtihen wrote:Thanks, I'll give that a try this evening. :)Hi, I'm fairly new to the D language, I found it when searching for a fast compiled C-like language with less configuration than C++. I'm mainly a Node.js and Go developer previously so I guess I have been a bit spoiled with a lot of ready made off the shelf third party packages being available. [...]You could give dpp (http://code.dlang.org/packages/dpp) a try, or DStep (https://code.dlang.org/packages/dstep) to generate the C bindings.
Dec 10 2019
On Tue, Dec 10, 2019 at 9:55 AM tirtihen via Digitalmars-d <digitalmars-d 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
Dec 10 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 puremagic.com> wrote: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. :DHi, 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
Dec 10 2019
On Tuesday, 10 December 2019 at 14:21:44 UTC, tirithen wrote:On Tuesday, 10 December 2019 at 09:29:12 UTC, Daniel Kozak wrote:We're actually using it for other projects as well!On Tue, Dec 10, 2019 at 9:55 AM tirtihen via Digitalmars-d <digitalmars-d puremagic.com> wrote: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.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/mondoBut 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.Transactions and sessions were not available when I wrap libmongoc. They were added later (in MongoDB, a write operation is atomic on the level of a single document). I was not aware of symmetry's fork. I wonder why they didn't create a pull request instead! Andrea
Dec 11 2019
On Wednesday, 11 December 2019 at 08:33:02 UTC, Andrea Fontana wrote:On Tuesday, 10 December 2019 at 14:21:44 UTC, tirithen wrote:It's only just recently been ready and we had to get dpp working better on Windows first. I think it's okay now, but not sure.[...]We're actually using it for other projects as well![...]Transactions and sessions were not available when I wrap libmongoc. They were added later (in MongoDB, a write operation is atomic on the level of a single document). I was not aware of symmetry's fork. I wonder why they didn't create a pull request instead! Andrea
Dec 11 2019
On Tuesday, 10 December 2019 at 08:53:52 UTC, tirtihen wrote:Is there anyone else that have started on this or similar MongoDB driver already?There's this fork https://github.com/symmetryinvestments/mondo/ which used dpp to generate the files. see bsonc.d and mongoc.d in there. not sure if it will build out of the box but it shows the result
Dec 10 2019
On Tuesday, 10 December 2019 at 14:35:22 UTC, Adam D. Ruppe wrote:On Tuesday, 10 December 2019 at 08:53:52 UTC, tirtihen wrote:Thanks for the help, I'll have a look at that version of mondo as well. I completely missed that it used dpp to generate the files. I'll compare what I need to do with mondo compared to the vibe.d version and see which one is easiest one for my use case.Is there anyone else that have started on this or similar MongoDB driver already?There's this fork https://github.com/symmetryinvestments/mondo/ which used dpp to generate the files. see bsonc.d and mongoc.d in there. not sure if it will build out of the box but it shows the result
Dec 10 2019