Synchronize data between 2 sites dynamically I currently have two Drupal sites and I would like to synchronize in a specific way the data of each one. 

More precisely, the first one contains detailed informations and the other only has the main data necesary for its work. I would like to refresh (create/update) the data of the second one when the first one is modified and also would like to refresh (create/update) the first one when the second one is modified, taking into account the content types and field names are not the same in both. In my case, the data that should be manipulated are nodes and users. 

I have already tried to find solutions through web services or feed import, but I didn't succeed to build a correct one. Moreover, I also studied the possibility to schedule periodic import from web services but it would be slow the site performance, due to the very important amount of data contained in each site.

Can someone help me?
You need to work on the database a little bit.

I think it is impossible to make it work if you just write php. Because it will generate a lot of database login errors. 

There might be a lot of ways to do that, but the only way I know is to:
First, Combine two database into one, two different databases with two different prefix.
Second, delete all the attributes you want to synchronize in the second database.
Third, link the synchronized field in the second database to the first database, you can do this in the settings.php in the second drupal site.

But there might be some dependency problems when you do step 2. Don't forget to backup at first.

This link might be helpful How to connect to multiple databases within Drupal