Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug
WEBSCALE DATABASE DERAIL

Sil posted:

How is one playing chicken? As far as I know NoSQL compromises ACID by being more relaxed about Consistency, ie. IF you have multiple shards, updates won't instantly show up in all shards.

Databases that don't use SQL give you flexibility to choose (from the CAP theorem) Consistency, Availability, or Partition tolerance by giving you choices, either at a configuration level (Riak 2.0 CP bucket types) or a software level (Riak for AP, Zookeeper for CP).

Riak (with allow_mult enabled) relaxes consistency to accept and persist writes even when nodes are down1; Riak today is AP. Redis Sentinel provides Consistency and Availability, but loses writes when there's a network partition2. Mongo isn't CP or AP, it's kinda broken3. PostgreSQL is CP once you understand that unacknowledged writes may have succeeded4.


duck monster posted:

Personally I would fire any programmer that told me ACID guarantees are not "super important".

If they conflict with business goals, they might not be important. You can frequently design a system that works correctly without them, that may be cheaper and more reliable than with them.

Let's say debit card network acknowledges or rejects transactions from a buyer to a merchant, and then reorders transactions at the end of the day to maximize the number of potential NSF fees that can be charged.

You could build the transaction ingesting part with an AP system like Riak, without consistency and isolation from ACID, because individual transactions are immutable and aren't dependent on consistency of other recent5 writes. With a high write quorum, it'll be plenty durable, especially if you have multi-site replication going on in the background too.

With that said, your application probably doesn't need a NoSQL because it probably hasn't outgrown Postgres yet. Postgres is "production ready," you can get it hosted for not much money, it hits the ACID guarantees, and CP is pretty intuitive.

FOOTNOTES
  1. http://aphyr.com/posts/285-call-me-maybe-riak
  2. http://aphyr.com/posts/283-call-me-maybe-redis
  3. http://aphyr.com/posts/284-call-me-maybe-mongodb
  4. http://aphyr.com/posts/282-call-me-maybe-postgres
  5. This originally said "temporally proximate."
  6. http://aphyr.com/tags/jepsen

40 minute conference talk from Aphyr about these posts:
https://www.youtube.com/watch?v=mxdpqr-loyA

Cocoa Crispies fucked around with this message at 00:51 on Oct 11, 2013

Adbot
ADBOT LOVES YOU

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

DreadCthulhu posted:

Is that something Angular would be a great fit for?

You'll learn more in fifteen minutes of doing the tutorial than a dozen posts in this thread.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

fidel sarcastro posted:

What's the best way to share templates between Rails and JS? I see a few gems for using Mustache in rails but they look like they're for Rails 3.X

Try them in Rails 4 anyway, it's not a huge jump from Rails 3.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

a lovely poster posted:

Is your project on GitHub? Maybe try using some of the issues and milestones features?

You can use them with https://waffle.io to get a nice view.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Mr. Wynand posted:

For god's sake just use sqlite before jumping into mongodb. In real life, most things have meaningful relationships to eachother, and 99 times out of 100 a relational database is a much better model for that than a document store or an object graph. This whole kneejerk nosql movement drives me batty to no end. Sure it has its applications and many things can be used for some fine optimizations, but I don't hold with breaking it out for no specific reason.

Not only that, mongo is a broken garbage NoSQL, and slower than Postgres to boot.

Adbot
ADBOT LOVES YOU

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Urit posted:

So what's a good ORM or some kind of library to make the mapping between tabular data and ~magical objects~ easier? The reason Mongo is so easy to plug in is you literally just feed it JSON objects and it barfs JSON objects back, no translation required.

What else are you running on the backend? I mostly use Rails, and as such I use ActiveRecord as an ORM with Postgres.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply