SymmetricDS: Database System Design - symmetricds

I need some advices, I want to build the database system like this using SymmetricDS.
The Orange Box is a PC that sync 1 API Database and 1 APP Database.
The Grey Box is multiple-PC that sync each API Database.
The idea is I want to make the system can handle multiple APP, so I need create API Database that synced with other API Database.
And also I need create APP Database that synced with local API Database independently (using transformation table and column).
So there is 2 SymmetricDS instances, 1 between each API System, and 1 between APP and API System.
Is that good to make separate 2 SymmetricDS instances? Or just 1 for all? Or is there other recommendation design?
Thank you.

one symmetricds instance can sync multiple databases. so, one instance per location. i.e., one symmetricds in the central hub, and one per local

Related

Syncing One Online and Multiple Offline Versions of the Same Schema DB in Rails

SETUP
I have three instances running of my app deployed in three separate geographical locations running locally (since Internet connections are not reliable).
I have one master instance of the app running on DigitalOcean.
I would like to sync the local databases with the master database daily.
MY CURRENT APPROACH
I have a cron job scheduled to pull the data from the local databases and upload them into a database running on a DigitalOcean VPS. My concern is that the id columns of the three local dbs will conflict resulting in an incorrect merge in the online master database.
I am running Rails 4.1 with Ruby 2.0 using Postgres as my DB.
I am open to any solutions that come up with a relatively simple way of keeping the databases in sync.
Thank you
Simplest solution would be to have all your unique autonumbering one column ID keys to consist of 2 different columns. An "ServerID" and an auto numbering ID. It makes your design more complicated but you never have to worry of non unique keys.

How to connect a distributed database in a web application?

I plan to use a distributed database but my question is what if you can use the database schema distributed in a web application? , In specific with Java (Servlets, JSP).
Watch what happens I plan to do a small control system for a cinema with multiple branches, where the user may buy ticket to a function, the system I want to use a distributed database but do not know if my idea is possible?.
One option is to simply use a centralized database. Why is this not an option?
Another option is to use a database at each location, and have them synchronize to a central database (master-slave), or with each other (master-master). Look at replication for your database of choice, or db sync tools like SymmetricDS.

Database dot com database syncing

I am working on a phonegap project to build a cross platform mobile app, and came to know from a website that the app's database can be deployed/built with "database.com".
The procedure is well explained but I have one question -
how to sync the database available on database.com with a database on a local server?
i.e. for e.g., if a client has his database (of his desktop application) on his local server and he requires a mobile app of the same now, what is the procedure to be followed in "database.com" to sync his server's database with the database on "database.com"?
PS: I need to use "database.com" for my database because I want to maintain it on cloud, and I do not have capability to maintain a local server.
You might need a service for data syncing if it is to be more than once. I work on a project that does exactly this.
www.overcast-suite.com
Otherwise, model your tables to Salesforce Custom Objects, export the data on the local server to CVS and use the Data Loader to import.

Should i just use 1 database?

Hi i am building a window apps retailer pos but was wondering what is the best method to design the database. Should i just use 1 database to store all my clients data?
Meaning to say if i have 100 clients from different businesses using my App, all of their data will be stored in 1 database.
e.g. i will store 1 company column in the user table to indicate which company does the customer or transaction belongs to.
My current practice is i create new database for each business and put it installed into their local machine. (Got to manually install sqlserver + sqlexpress).
Do u think it is more easier for me to design in this way? and i can just put the database online to sql server. Will i be getting any latency ? how bad will it be? I heard Window Azure able to handle this well. In my case i think the speed and data size per business is not really a concern.
Could you advice?
You should definitely look at other alternatives within Azure for storing data, specifically Azure Storage Tables and Blobs.
Utilizing all of the Azure Storage Options with SQL Azure will allow you to choose different data tiers depending on your application's needs and your desired cost structure. Running everything inside of SQL Azure will cost you more in the long run, but it makes a good place to tie together federated data for relational reporting, whereas you can store each tenant's data inside of Azure Tables, using PartitionKeys which keep each client's data separated from the others.

Storage issues in cloud when creating multiple instances

In a cloud hosting environment (amazon, rackspace,) you can create multiple instances. Let's say I have a database server (mysql,) and other persistent data.
If I create more instances, what happens to the data ? Ex.
1 Instance -> user table (in a db)
I make another 3 instances
4 Instances -> each one has it's one user table
Errors: if someone adds data to the table on instance 3 how does instance nr 4 see it ? If I merge the instances back to one, which instance data does it keep ?
Thank you
I would suggest having one (or more) dedicated database servers that all the instances connect to. If you are using Amazon Web Services check out their RDS service ( http://aws.amazon.com/rds/ )
That way you don't need to worry about replication - if you do want each server running it's own db instance you'll have to look into replication - for MySQL this is a good guide: http://dev.mysql.com/doc/refman/5.0/en/replication.html
I would strongly recommend the former solution for the database. Replication is tricky to get right and can be a nightmare to maintain
If you are using static data eg images I would recommend using amazon's S3 service for uploading to ( http://aws.amazon.com/s3/ ) - that way all your servers are getting their data from a single point instead of having to replicate over servers, which is always going to end up a less scalable solution

Resources