Avahi support for Glom



Hello,

I was investigating Avahi support for Glom yesterday and want to hear opinions now.

An obvious solution would use a TCP/IP enabled DBus server announcing
Glom databases available on a computer. To let other Glom instances
find that "Glom Broker" it would announce itself via Avahi. Despite the
bad reputation[1] of dbus-glib this should be quite easy to do. Look at
the code in the tarball. 

Sequence diagrams of this approach can be found in

  glom-sharing-with-broker.svgz and
  glom-access-with-broker.svgz

It is a nicely layered approach, but it as problems: 

 - Round trips. First you'd do a Zeroconf trip to find the broker, 
   then you'd have to talk with the broker to retreive its database list. 
 - We get another service that has to be robust.

So before going to bed I had a another idea yesterday. Postgresql has
builtin functions for reading files. So after moving/symlinking the
Glom configuration file "sample.glom" to "glom_postgres_data/data/",
the following SQL statement is possible:

        SELECT pg_read_file('config.glom', 0,
              (pg_stat_file('config.glom')).size);

This statements lists the entire content of the Glom configuration
file. So when:

- libgda supports running that query
- we decide to abuse Postgresql as configuration file provider

Glom sharing could work without any additional software. Glom just
would have to to get a command line switch to run in headless hosting.
When running in that mode, Glom would execute the sequences described
in "glom-direct-sharing.svgz" and "glom-direct-access.svgz".

Opinions?

Ciao,
Mathias
-- 
Mathias Hasselmann <mathias openismus com>
www.openismus.com

image/svg

image/svg

image/svg

image/svg

Attachment: dbus-service.tar.gz
Description: application/compressed-tar



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