Fork me on GitHub
#off-topic
<
2018-11-01
>
orestis09:11:46

What’s a reasonable approach if you want to migrate from Database X to Database Y? Do you start migrating “Bound Contexts” one by one meaning for some period of time there are two sources of truth — and how do you deal with cross-DB links?

orestis09:11:48

(Background is — a mongo DB which mostly has relational stuff, I’m exploring possible avenues to move to Postgres while keeping things running along. Datomic is a no-go, sadly.)

Mario C.15:11:12

@orestis That's what we are doing MongoDB --> PostgreSQL.

Mario C.15:11:59

Saving to two DB's concurrently long enough to make sure everything is good to go then we are cutting off Mongo

☝️ 4
donaldball16:11:53

I’ve done with before and used that approach, augmented with integrity checkers run against snapshots of the two databases taken at logically equivalent points in time to gain confidence.

☝️ 4
orestis17:11:07

So for some period you have code that both reads and writes to/from both DBs? /cc @mario.cordova.862 @donaldball

Mario C.17:11:50

Yes that is correct

Mario C.17:11:29

We set the main source of truth (MongoDB) and read from both but retrieve from that

Mario C.17:11:03

we do an equality check on retrieval

orestis17:11:22

Oh nice. So this runs in production all the time?

orestis17:11:08

Do you use any complex mongo pipelines? They can be very nice, I was always wondering how the equivalent SQL would look like.

orestis17:11:37

A blog post or brain dump would be highly appreciated :)

Mario C.18:11:30

Its not in prod just yet. We are still testing and setting things up but we are hoping to go to prod but the end of the month.

Mario C.18:11:01

I am very junior here so I may not be well suited for knowledge dumps 😛

eggsyntax19:11:12

Anyone here whose first language is Spanish? I was thinking today about how beginning programmers often get confused about equality, and was wondering if that comes more naturally for Spanish speakers, since Spanish distinguishes between identity (lo mismo) and equivalence (igual). Caveat: my Spanish is so-so; my understanding of the distinction may be shaky.

pvillegas1219:11:58

In my experience it does not make any difference @eggsyntax 🙂

pvillegas1219:11:33

math helps more than natural languages

4
deliciousowl20:11:04

I'd recommend SICP and a book of algorithms 😄 programming is magic!

deliciousowl20:11:26

but oddly enough its true that certain (natural) languages don't really support certain things, that's where the stereotype for germans being unfunny comes from

deliciousowl20:11:32

Also I've read somewhere that while western languages are subject/object oriented, mandarin is more declarative, but I can't really vouch for the accuracy there

deliciousowl20:11:11

i,e. "he broke the window" vs. "the window became broken"

andy.fingerhut20:11:21

There are multiple context-dependent meanings for many English words, including "identical" and "equal", and many people are casual in their use of them as synonyms in contexts where it might be nicer if they did make a distinction. First, one has to learn that they can mean different things.

dpsutton20:11:23

i was thinking of the many articles you have written on this very subject.

andy.fingerhut20:11:05

I am sure I have spoken out loud and used those words as synonyms, where if we wrote down a transcript and went back through it to see more precisely what I meant, I would have chosen the other word.

andy.fingerhut20:11:09

It is also pretty common to use words like "choose" and "decide" when describing the behavior of computers running our programs, when if we were later asked "do you believe computers can make choices in the same way humans do?" some of us would say "No, I think that is a fundamental difference between humans and computers." But it is much easier to speak that way in casual circumstances where it is understood "I don't think computers actually make choices."

ljosa20:11:58

"Don't anthropomorphize computers; they don't like it."

andy.fingerhut21:11:10

Oh, heck no. At least half a dozen times the root cause for bugs I've found was "the computer didn't like what I said about it in an off hand way" 🙂