|
From: Daniel G. <go...@b1...> - 2009-10-29 13:47:13
|
Hi Henrik, On Tuesday 27 October 2009 06:07:50 pm Henrik /KaarPoSoft wrote: [...] > I am working on porting mozilla-sync to use OSYNC_START_TYPE_EXTERNAL. Awesome! [...] > > In fact, the engine (e.g. in osynctool) will initialize a proxy, and > this proxy will send the name of the plugin and the path to the plugin > directory to the external process. By "plugin directory" you mean the member directory of the group - right? E.g. ~/.opensync/groupX/Y/ This is at what the engine uses as argument to spawn for proxy. The function osync_client_proxy_spawn() is then creating two pipes in this member directory: pluginpipe and enginepipe > > The external process will then set up an identical environment in > _osync_client_handle_initialize (at least if the external process is > coded in the simplest possible way I could find: calling > osync_client_run_and_block and letting the OpenSync libraries take care > of the rest). Right. > > This means that the engine (e.g. in osynctool) will load all plugin > modules, which in turn leads to loading all the libraries the module > depends on. > > In the mozilla-sync case that means xpcom libraries etc. Right, but ... > > It also means that the mozilla-sync plugin will need to be compiled the > Mozilla development files. > > All of this totally unnecesary, as all the Mozilla-relevant stuff is > taking place in the external process. .. you don't have to load this. > > The external process will also load all plugin modules - again totally > unnecessary since it will only need a single plugin. Why don't you try this: Just write a very tiny mozilla-sync which just contains the function "get_sync_info"? It just registers the plugin and set the start-type to OSYNC_START_TYPE_EXTERNAL. So this plugin (stub) is not using any mozilla API -> no mozilla dependecies .... Engine doesn't load those libraries. The plugin stub only does one thing: register the plugin to the OSyncPluginEnv ... and set the name and description of the plugin, as well as that the plugin is an external one and needs to be started via OSYNC_START_TYPE_EXTERNAL ... And your real "plugin" which is acutally a complete different process - or even an own application is implementing a full OSyncClient and OSyncPlugin environment? Completeyl without that get_sync_info() stuff ... I'll provide for that a proof-of-concepüt ... Or do you see already anything why this can't work? [...] Best Regards, Daniel -- Daniel Gollub Geschaeftsfuehrer: Ralph Dehner FOSS Developer Unternehmenssitz: Vohburg B1 Systems GmbH Amtsgericht: Ingolstadt Mobil: +49-(0)-160 47 73 970 Handelsregister: HRB 3537 EMail: go...@b1... http://www.b1-systems.de Adresse: B1 Systems GmbH, Osterfeldstraße 7, 85088 Vohburg http://pgpkeys.pca.dfn.de/pks/lookup?op=get&search=0xED14B95C2F8CA78D |