Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. See MongoDB

See MongoDB

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
40 Posts 30 Posters 1 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q [email protected]
    This post did not contain any content.
    B This user is from outside of this forum
    B This user is from outside of this forum
    [email protected]
    wrote last edited by
    #18

    This is kinda absolute BS at this point, though.

    Mongo has acid transactions, and has for years now. Although this is only within the same database, there are plenty of dbms (including rdbms) that don't support cross-database transactions.

    Mongo also, since time immemorial, has had "write concern" to ensure that it's written to disk (to the journal) before the transaction is completed.

    C clif@lemmy.worldC 2 Replies Last reply
    10
    • G [email protected]

      What's ACID?

      Q This user is from outside of this forum
      Q This user is from outside of this forum
      [email protected]
      wrote last edited by
      #19

      https://en.m.wikipedia.org/wiki/ACID

      Atomicity (something happens in its entirety or not at all), consistency (database is always in a valid state --- if the database has constraints, they will always be honored), isolation (transactions don't step on each other), durability (complete transaction is complete even if there's a power failure).

      Not a database expert, my parenthetical explanations may need work.

      1 Reply Last reply
      7
      • S [email protected]

        But it's webscale

        negativenull@lemmy.worldN This user is from outside of this forum
        negativenull@lemmy.worldN This user is from outside of this forum
        [email protected]
        wrote last edited by [email protected]
        #20

        Wow, that video is 15 years old!

        https://youtu.be/b2F-DItXtZs

        1 Reply Last reply
        11
        • G [email protected]

          What's ACID?

          R This user is from outside of this forum
          R This user is from outside of this forum
          [email protected]
          wrote last edited by [email protected]
          #21

          Atomicity: either all parts of the transaction complete, or all parts of the transaction don't complete; there's no "partly complete" state

          Consistency: the state of the database after a transaction is stable; all "downstream" effects (e.g. triggers) of the query are complete before the transaction is confirmed.

          Isolation: concurrent transactions behave the same as sequential transactions

          Durability: a power failure or crash won't lose any transactions

          Traditionally, ACID is where relational databases shine.

          S 1 Reply Last reply
          20
          • 30p87@feddit.org3 [email protected]

            And yet my Uni treats it like the biggest thing in existence. Meanwhile I've never used anything other than RDBS and Redis (only for cache), neither in private nor at work.

            stizzah@lemmygrad.mlS This user is from outside of this forum
            stizzah@lemmygrad.mlS This user is from outside of this forum
            [email protected]
            wrote last edited by
            #22

            It always depends on the context... My current job is 100% on Elasticsearch and I'm not missing transactions at all.

            1 Reply Last reply
            0
            • G [email protected]

              What's ACID?

              C This user is from outside of this forum
              C This user is from outside of this forum
              [email protected]
              wrote last edited by
              #23

              You've gotten good answers from other folks but I'll provide a ELI5:

              Basically a set of rules in the database to make sure that it is immediately consistent.

              NoSQL databases offer eventual consistency in exchange for speed so they are generally not considered to be ACID compliant.

              Most traditional databases (MySQL, postgresql, etc.) are.

              There are a couple of emerging companies that try to tackle speed for traditional databases. CockroachDB offers a postgress-based database that scales more like NoSQL while still offering ACID transactions.

              TiDB is a similar company but for MySQL.

              M 1 Reply Last reply
              7
              • S [email protected]

                But it's webscale

                F This user is from outside of this forum
                F This user is from outside of this forum
                [email protected]
                wrote last edited by
                #24

                I still suggest piping data to /dev/null during meetings to see who gets the joke

                zorsith@lemmy.blahaj.zoneZ 1 Reply Last reply
                12
                • B [email protected]

                  This is kinda absolute BS at this point, though.

                  Mongo has acid transactions, and has for years now. Although this is only within the same database, there are plenty of dbms (including rdbms) that don't support cross-database transactions.

                  Mongo also, since time immemorial, has had "write concern" to ensure that it's written to disk (to the journal) before the transaction is completed.

                  C This user is from outside of this forum
                  C This user is from outside of this forum
                  [email protected]
                  wrote last edited by
                  #25

                  So is it just another database software at this point, then?

                  H 1 Reply Last reply
                  3
                  • F [email protected]

                    I still suggest piping data to /dev/null during meetings to see who gets the joke

                    zorsith@lemmy.blahaj.zoneZ This user is from outside of this forum
                    zorsith@lemmy.blahaj.zoneZ This user is from outside of this forum
                    [email protected]
                    wrote last edited by
                    #26

                    Oh man, do i have the product for you

                    https://devnull-as-a-service.com/

                    P 1 Reply Last reply
                    12
                    • C [email protected]

                      Jumping in this, bingo. JavaScript only shops scare the fuck out of me.

                      noobface@lemmy.worldN This user is from outside of this forum
                      noobface@lemmy.worldN This user is from outside of this forum
                      [email protected]
                      wrote last edited by
                      #27

                      why is my deploy process so slow? ©_©=> 500k npm packages

                      1 Reply Last reply
                      1
                      • C [email protected]

                        You've gotten good answers from other folks but I'll provide a ELI5:

                        Basically a set of rules in the database to make sure that it is immediately consistent.

                        NoSQL databases offer eventual consistency in exchange for speed so they are generally not considered to be ACID compliant.

                        Most traditional databases (MySQL, postgresql, etc.) are.

                        There are a couple of emerging companies that try to tackle speed for traditional databases. CockroachDB offers a postgress-based database that scales more like NoSQL while still offering ACID transactions.

                        TiDB is a similar company but for MySQL.

                        M This user is from outside of this forum
                        M This user is from outside of this forum
                        [email protected]
                        wrote last edited by
                        #28

                        Not all NoSQL databases are the same. Neo4j is acid compliant, and lightning fast for complex relationships that relational databases struggle with.

                        1 Reply Last reply
                        2
                        • J [email protected]

                          Every time I'm assigned to a project that uses a document database


                          "So how are you guys handling all your related data?"

                          Finds collection of massive JSON documents containing all the related data

                          "Oh boy."

                          B This user is from outside of this forum
                          B This user is from outside of this forum
                          [email protected]
                          wrote last edited by [email protected]
                          #29

                          What's the problem with that? In my previous team, we had a structure with four levels of nesting where we only ever needed to query the first two levels. At first we used Postgres with normalized tables, but it was just slow as hell. Switching to MongoDB actually made our performance issues vanish.

                          Of course it all depends on what kinds of queries you need to run, but I don't think that large JSON documents are necessarily a problem.

                          J E 2 Replies Last reply
                          7
                          • B [email protected]

                            This is kinda absolute BS at this point, though.

                            Mongo has acid transactions, and has for years now. Although this is only within the same database, there are plenty of dbms (including rdbms) that don't support cross-database transactions.

                            Mongo also, since time immemorial, has had "write concern" to ensure that it's written to disk (to the journal) before the transaction is completed.

                            clif@lemmy.worldC This user is from outside of this forum
                            clif@lemmy.worldC This user is from outside of this forum
                            [email protected]
                            wrote last edited by
                            #30

                            This post is very timely because I was just introducing some new people to Mongo earlier this week and led off with "Now you might still hear people say 'mongo is trash, it's not even ACID compliant!' but those people are dumb... it's had that for years and years and is just another DBMS at this point (but not relational)"

                            ... the last part also answers the other reply to this post. Yes.

                            1 Reply Last reply
                            4
                            • zorsith@lemmy.blahaj.zoneZ [email protected]

                              Oh man, do i have the product for you

                              https://devnull-as-a-service.com/

                              P This user is from outside of this forum
                              P This user is from outside of this forum
                              [email protected]
                              wrote last edited by
                              #31

                              Haha, they have a careers page.

                              zorsith@lemmy.blahaj.zoneZ 1 Reply Last reply
                              1
                              • P [email protected]

                                Haha, they have a careers page.

                                zorsith@lemmy.blahaj.zoneZ This user is from outside of this forum
                                zorsith@lemmy.blahaj.zoneZ This user is from outside of this forum
                                [email protected]
                                wrote last edited by [email protected]
                                #32

                                Licensing

                                Pick any. We license it this way then.

                                *The old Facebook ReactJS non-compete license

                                *University of Utah Public License

                                *Apple Public Source License v1.x

                                *AT&T Public License

                                *The JSON License

                                *The Occulus Rift License

                                *TrueCrypt License 3.0

                                1 Reply Last reply
                                0
                                • B [email protected]

                                  What's the problem with that? In my previous team, we had a structure with four levels of nesting where we only ever needed to query the first two levels. At first we used Postgres with normalized tables, but it was just slow as hell. Switching to MongoDB actually made our performance issues vanish.

                                  Of course it all depends on what kinds of queries you need to run, but I don't think that large JSON documents are necessarily a problem.

                                  J This user is from outside of this forum
                                  J This user is from outside of this forum
                                  [email protected]
                                  wrote last edited by
                                  #33

                                  In my previous team, we had a structure with four levels of nesting

                                  Those are rookie numbers.

                                  1 Reply Last reply
                                  1
                                  • B [email protected]

                                    What's the problem with that? In my previous team, we had a structure with four levels of nesting where we only ever needed to query the first two levels. At first we used Postgres with normalized tables, but it was just slow as hell. Switching to MongoDB actually made our performance issues vanish.

                                    Of course it all depends on what kinds of queries you need to run, but I don't think that large JSON documents are necessarily a problem.

                                    E This user is from outside of this forum
                                    E This user is from outside of this forum
                                    [email protected]
                                    wrote last edited by
                                    #34

                                    They're talking about relations between data. For example, when you delete a user, you may also want to delete their stored data.

                                    To some degree, this is less of a problem with document databases, because they don't force you to chop your data into small parts like relational databases do (e.g. you can have lists of that user's stored data as part of the JSON document). But you will likely still need some relations at some point.

                                    Chances are you have a layer in your application code which ensures these relations that way.
                                    Which is fine in my opinion. With relational databases, there's also often some relations which you cannot model in the database.
                                    But yeah, it requires somewhat more software architecture awareness, to not lump the relation checking logic into general application logic. And you can't connect a second application to that database, without having to implement the relations another time or at least pulling them out into a shared library.

                                    rayquetzalcoatl@lemmy.worldR 1 Reply Last reply
                                    2
                                    • C [email protected]

                                      So is it just another database software at this point, then?

                                      H This user is from outside of this forum
                                      H This user is from outside of this forum
                                      [email protected]
                                      wrote last edited by
                                      #35

                                      With a JS-based query language, yeah

                                      B 1 Reply Last reply
                                      2
                                      • R [email protected]

                                        Atomicity: either all parts of the transaction complete, or all parts of the transaction don't complete; there's no "partly complete" state

                                        Consistency: the state of the database after a transaction is stable; all "downstream" effects (e.g. triggers) of the query are complete before the transaction is confirmed.

                                        Isolation: concurrent transactions behave the same as sequential transactions

                                        Durability: a power failure or crash won't lose any transactions

                                        Traditionally, ACID is where relational databases shine.

                                        S This user is from outside of this forum
                                        S This user is from outside of this forum
                                        [email protected]
                                        wrote last edited by
                                        #36

                                        ACID is really just an arbitrary set of requirements for databases that made sense way back in the day when things were much simpler. ACID starts to hold you back when you want to scale out, because to have consistency you have to wait for your transaction to percolate through all the nodes of your system, and it doesn't allow for things like a replicating node to be temporarily offline or lagging behind. Turns out though that not everything needs to be strictly ACID. For example, there are many cases where it doesn't matter that a reader node has stale data for a second or two.

                                        The thing MongoDB does is that instead of being dogmatically ACID all the time it allows you to decide exactly how ACID your transactions and your reads need to be, through the writeConcern and readConcern parameters. If you want it to be completely ACID, you can, but it comes at a cost.

                                        Traditionally, ACID is where relational databases shine.

                                        Relational databases shine with ACID on single-node systems when they're not trying to solve the scale-out problem that MongoDB is trying to solve, but when they are trying to do that, they actually do much worse.

                                        For example: most RDBMS systems have some kind of replication system, where you can replicate your transactions to one or more backup nodes either for failover or to use as a read-only node.

                                        Now if you consider that whole system, replicas included, as "the database", none of them are ACID, and I don't know of any RDMBS-es that has mechanisms to automatically recover from a crashed primary without data loss, or that can handle the "split brain" problem.

                                        1 Reply Last reply
                                        2
                                        • H [email protected]

                                          With a JS-based query language, yeah

                                          B This user is from outside of this forum
                                          B This user is from outside of this forum
                                          [email protected]
                                          wrote last edited by
                                          #37

                                          Yes, ish. There are aspects of it that are really valuable, and fit some use cases extremely well. But, in some senses, yes. Like any DBMS, you've got to know it's strengths and weaknesses. And if you do, there are definitely circumstances where you'd choose it over others. But not always.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups