Re: Avahi support for Glom




On Thu, 2007-10-25 at 12:52 +0200, Mathias Hasselmann wrote:
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.

What would be the advantage of a separate broker to do this? The Glom
client would use avahi to discover the broker and then ask the broke for
the running Glom servers. Why not just use avahi to discover the running
Glom servers directly?

 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.

I'd like to avoid depending on specific Postgres features where
possible. And the use of this feature seems possibly more complicated
than just providing the XML as a blob of data over TCP.

 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
_______________________________________________
glom-devel-list mailing list
glom-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/glom-devel-list
-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com




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