Different set of databases?

Hi

In the Servoy Wiki Documentation about WAR deployment, I read

make sure each Servoy Application Server … use a different set of databases

Can someone please explain to me, what this means and why?

I assume, two WARs should not use the same database. But we do have two applications, which read and write to the same database. But the two applications write to a different set of tables. One application fills valuelist tables and reads from those tables, the other application writes to. Will we run into problems? Why?

Thanks for any help and kind regards

Hi Birgit,

As far I can tell there are 2 reasons for this:

  • You use Servoy Sequences and these are managed by the Servoy Server instance, so 2 (or more) Servoy Server instances will cause new PK values (eventually) to collide.
    Of course when you don’t use Servoy Sequences but UUID’s or let the database handle the sequences you should be fine.
  • Servoy server does a lot of caching of data it already fetched from the database, and when you manually (or by another Servoy instance) add/update/delete any of this data then the other instance(s) will not see it without some way of broadcasting this change. Now if you use a single DB and your data is partitioned in some way (for example using a tenant ID) and each instance will never access the other instance’s data then you don’t have any issues.

Hope this helps.

Dear Robert

Thank you for the answer. So you say, if we are aware of the fact, that two Servoy application servers do not know of each others sequences, and that data broadcasting is not possible, we’ll not run into problems. Everything else will just work fine. That’s good to hear.

Thank you and best regards

Hi Birgit,

If you are not inserting new records in the same table that the other instance is inserting records into (when using Servoy sequences) then yes, you should be fine.

Thank you, Robert, for clarifying this.
Best regards