Using UPNP to synchronize data between android and desktop
Niranjan Rao
nhrdls at gmail.com
Tue Oct 22 17:21:34 EDT 2013
The use case is pretty simple. To improve integration between android
and desktop versions. Its little cumbersome to synchronize data between
two right now.
I know gnucash is desktop application and its data/file format is
"private", that is not officially documented. My alternative was to use
python API which essentially is wrapper across C code gnucash uses. By
using UPNP services this task seems to be feasible - at least in my
simple stupid prototype. To get this in state where it can be released,
there is some work involved. I am just trying to scope out the problem
and see if I missed anything else.
Longer term, by android, I just don't mean phone, but tablets etc where
we can have some more real estate to do more interesting stuff. This
might be a tiny step in direction.
Problems you mention are real problem and need to be thought through.
Appreciate the input.
Regards,
Niranjan
On 10/21/2013 11:58 PM, prl wrote:
> It's unclear what your use case is exactly, but I'd add two more
> potential problems:
>
> 6. If Gnucash on the server is working on the file when the
> synchronisation is done, it would either fail if the synchronisation
> respected the Gnucash file lock, or changes made in the
> synchronisation would be lost when Gnucash wrote out its file.
> 7. There doesn't seem to be any way of resolving conflicts if the
> account file has been modified on both the server and the Android device.
>
> Peter
>
> On 22/10/13 17:06, Niranjan Rao wrote:
>> I tried sending this message to developer's list first, but it looks
>> since
>> I am not a member of the list it's being removed. Apologize if you
>> see this
>> message twice.
>>
>> I was playing Cling UPNP library (http://4thline.org/projects/cling/)
>> and
>> thought that this might be one more way to support data synchronization
>> between gnucash and it's android companion. If things go as dreamed, it
>> might be as simple as picking up a server when user exports android data
>> and your data automagically will be updated using python calls. Android
>> application user won't have to export to OFX format as python binding
>> might
>> be used to update the data. This approach also can be used to provide
>> any
>> other data that future android versions might need.
>>
>> Over the weekend, I wrote a POC which is able to serve the files
>> desired by
>> android version and is able to accept the files. It definitely looks
>> usable
>> from this angle.
>>
>> On the device and android emulator, my services do show up, though Cling
>> demo code for android does not allow me to fire the service.
>>
>> I see following problems in this approach. Any other thoughts and/or
>> criticism on this approach are greatly appreciated.
>>
>> 1. User needs to have java installed. There are UPNP libraries in
>> python,
>> but most of them are media oriented. I have not investigated python
>> libraries yet.
>> 2. User need to have python bindings installed.
>> 3. To use UPNP, you need to have WIFI on your home router.
>> 4. Stability of python API for gnucash
>> 5. UPNP is not secure by design. But then android users can send
>> emails to
>> get the exported data and mobile users do use many UPNP features such as
>> DLNA to steam media.
>>
>> Regards,
>>
>> Niranjan
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>>
>
More information about the gnucash-user
mailing list