How data can be synchronized among multiple linux servers [closed] - linux

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have basically 4 servers for running the same project. I want make changes in database from UI.
What should I do so that all changes are reflected on all server so that all servers contain the same data.

You can use replication in database for your purpose.

You can use data replication. replicate all the data from all four servers at one single location.

Database replication is the frequent electronic copying data from a database in one computer or server to a database in another so that all users share the same level of information. The result is a distributed database in which users can access data relevant to their tasks without interfering with the work of others. The implementation of database replication for the purpose of eliminating data ambiguity or inconsistency among users is known as normalization.

Related

What is the difference between JDBCRealm and DataSourceRealm? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I read this comment: "don't use JDBCRealm at all: it does not scale at all since there is a single JDBC Connection object used for all database communication. You are better off using DataSourceRealm"
What does it mean in a greater detail?
Incase you don't know about why and what realms are- for JAVA web applications, authentication and authorization can be handled either by the application or by the container(Tomcat etc.). If one chooses to use the container, you need to specify a user-store(a place where usernames,hopefully encrypted passwords, roles etc are stored). This could even be your tomcat-users xml incase of Tomcat. Or you could use a database(MYSQL etc.) or a directory(Active Directory etc.) . Tomcat connects to the database using JDBC(your JDBC realm) and to the directory using JNDI(your DataSourceRealm).
Coming to your question JDBC connections are expensive, have pooling limitations, and suffer from high synchronization which means in a high load application, authentication may fail for some requests due to unavailability JDBC. JNDI has better pooling being read optimized, and as such gives better performance.

dedicated servers for socket.io? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
One of the main features in my website is a simple One-to-One chat.
I'm debating whether or not I shall dedicate a server (or a cluster) for the sole purpose of this chat feature. The simpler option would be combining this feature as part of the web-servers and just scale out when necessary.
It is worth mentioning I'd like in the future to enable images transfer within the chat.
So what is the better option and why?
Well yes, Whether to use another dedicated server is not depending on how much traffic your site will have to handle. If you're dealing with images It will be a good idea to store them in another server and keep the root server clean.

Mongo DB - is 1 DB per client really recommended for multi-tenant SAAS? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
this article suggests that using MongoDB for a SAAS application that you should use one DB for each client - can this be right? http://docs.mongohq.com/use-cases/marketing-platforms.html (see bottom of page)
If so are there any occasions when it would still pay to put all clients into one DB?
I asked a similar question
Is it better to use multiple databases when you are managing independent sets of things in MongoDB?
The conclusion seems to be its not really very efficient to have multiple databases. But its still a valid way of doing things.
A more important consideration is if you want to do queries across customers for whatever reason, then your job gets a lot more difficult if they are in separate databases.

marklogic replication similar to couchdb [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Is it possible to setup a 2-way replication with marklogic 6 similar to couchdb? Scenario: Use database on location b if location a is offline and automatic resync if a is online again, additionaly a + b are used simultaneus by pushing / syncinc data automagically in 2 ways a -> b and b -> a
MarkLogic has two kinds of replication. "Flexible Replication" which replicates documents as logical units, and "Database Replication" which replicates transactional updates using journal frames.
The Flexible Replication approach is comparable to CouchDB, since it writes by the document and does not group writes from a transaction on the master db into a transactional group on the replica. Couch does not have transactions in the first place so this is comparable. Flexible replication can replicate two ways if the same documents are not updated on both sides. Database replication cannot replicate two ways.
Be careful, because two-way replication in any system requires some solution to conflicts. MarkLogic handles this by requiring you to specify sets of master data on each server (each identified by a non-conflicting "domain" such as a collection or directory). Couch appears to keep conflicting versions without telling you which one you're getting, so there's a difference there.

put all images in a database or just in a folder [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am developing a website which uses a lot of images.
The images get manipulated very often (every few seconds, by the clients). All images are on a linux server. It is also possible that two clients try to change an image at the same time.
So my question is: should I put the images into a database or just leave them in a folder (how does the OS handle the write-write-collisions?)?
I use node.js and mongoDB on the server.
You usually store the reference to the file location inside of the database. As far as write-write collisions In most whoever has the file open first gets it however it mostly depends on the OS that you are working with. You will want to look into file locking. This wikipedia article gives a good overview.
http://en.wikipedia.org/wiki/File_locking
It is also considered good practice in your code to check and notify the user if the file is in use if write collisions are likely to occur.
I suggest you store your images within the MongoDB using the GridFS file system. This allows you to keep images and their metadata together, it has an atomic update and two more advantages, if you are using replica sets for your database:
Your images have the same high availability as the rest of your data and get backed-up together
You can, eventually, direct queries to secondary members of the set
For more information, see
http://docs.mongodb.org/manual/applications/gridfs
http://docs.mongodb.org/manual/replication/
Does this help?
Cheers
Ronald

Resources