The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Xenobius (3) [Avatar] Offline
#1
Hi, I am reading the book and in section 4.2.5 it is made clear that the recommendation would be to generate an entity's id BEFORE insertion (which makes sense too).

My question is this:

If I have a load balanced web application, ie; 2 or more instances of the same application running on separate servers... they have absolutely no way of 'synchronising' the next available number before the insert... I think that for such a scenario, you are forced to generate the ID AFTER Insert ...

Am I missing something or is this the way to go?

Thanks
X