[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coldsync-hackers] Automated Daemon with different actions for different palms.



Here's what I'm trying to do - which isn't supported in Coldsync at the
moment, and I'd like to see.

I have maybe 200 Handspring Visors out in the field.  They all have modems
in them, and are used to collect data.  This data is for many different
projects.  At the moment, they dial a modem on a Win98 box running the
standard hotsync software, which hopefully has accounts for all of them,
and they sync data.  If this fails, they drop the connection unhappily.

This is not good, due to Windows instability, and dialog boxes popping up
if anything goes wrong.

What I'd like is the following couple of bits of magic:

* ID either purely on username, or on username and user_id (only username
  if no user_id has been entered in the config file)
* Action taken depends on the username, i.e. backup, restore, full sync.
* Options are also available in the config.  I.E. for palms on which all
  data is being collected into 'Foo' database, I would like to only backup
  data in 'Foo', then disconnect the modem (some people are dialing from
  Mexico to Australia, so line time is a premium).
* If a username is not recognised, a default behaviour should be possible,
  either a single default, or based on username (i.e. FooP234 username will
  take the action for Foo).
* Part of 'Backup only' is that I never send any data back to the palm, so
  that nobody can set a Visor up with the same user/password pair and get
  confidential information (this is patient data) out of the modem.
  Another reason to leave Windows HotSync.


My question for the list - has anyone done anything this?  I've read
through quite a lot of the coldsync code over the past few days, and
played with a couple of options.  Unfortunately, the way the code is
now means that coldsync is quite committed to exactly what it wants
to do _before_ it knows who the palm is - or even opens a connection.

I guess the other question - is it worth me trying to re-architect
this for everyone else (would anyone else be likely to use per-palm
actions in a server only environment)?

My other option is basically to murder coldsync.c.  I really don't
like parser.y and the structs. I've decided I'm quite over the
"write your own config file parser" concept, and will probably try
to link in pcre for regex matching of palm names and something
config-file readery for dealing with the config file - preferably
one with its own magic internal structure and which provides me with
a simple API to the options.  There are just too many changes in too
many files to add another option otherwise.

Of course what would be left would be just the backup section, but
written to assume options in the config file instead of on the
command line.

Bron.


This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.