Rhoconnect synchronization data sotre


We're following Rhoconnect synchronization example, storemanager and storeserver, and we have a question about data store.

When we create an item and then we call “sync” function we see that it goes to Rhoconnect and it calls to query() and create() function. That’s right. But if we don’t return anything, query() function will remove all terminal items.

At terminal, we have a database with one new item and we want to synchronize with Rhoconnect in order to tell to other terminals that there is a new item. That’s all.

Must we store all items at rhoconnect (using a database or a text file) and then when we execute a query() function Rhoconnect will do a select to this?

In your example, you use @base variable at initialize function,

@base = 'http://rhostore.heroku.com/products'

And then, at create function you do it. But we don't understand exactly what are you doing...

rest_result = RestClient.get("#{@base}.json").body

Could you help us?