CharlesHolbrow / synk

support syncing data with browser
0 stars 0 forks source link

Generating Object IDs #6

Closed CharlesHolbrow closed 7 years ago

CharlesHolbrow commented 7 years ago

Right now we are contacting the DB twice whenever we create a new Object

  1. Get Object ID
  2. Create

It seems to make more sense to contact the DB only once to create a new object. Here are two approaches:

Randomly generate

Have Redis Generate IDs

Goals

I would like a solution where I don't have to manually add an ID to an object before calling "create" sending it to redis.

I would like a solution where new objects can be copied and sent to redis via a go channel. For this to work we will need to either