4 Replies Latest reply on Feb 8, 2011 1:55 AM by areohbee

    Feature Request: Friend Plugins

    areohbee Level 5

      Like friend classes in C++.

       

      I'd love if I could define some plugins to give permission to selected other plugins for metadata access, and maybe even preferences.

       

      That way I could make a plugin family suite with a bit of integration. Or, I could give metadata access to another developer's plugin who is writing a custom metadata tagset generator, or whatever.

       

      Maybe have a few different types of accesses:

       

      for friend plugin id = ....... :

      Metadata definitions only.

      +Metadata read-only or read-write.

      Preferences read-only or read-write...

       

      Somethin' like that...

       

      Rob

        • 1. Re: Feature Request: Friend Plugins
          Vladimir Vinogradsky

          Hi Rob,

           

          Yes, I agree, the point of plug-ins communicating with each other has been raised a number of times. However, rather than implementing the "friends" concept, an easier and more flexible way would be interplug-in communication in the form of registered callbacks. Lightroom could be the mediator rersponsible for supplying the caller ID along with a list of parameters. This way any plug-in could respond to requests from its "friend" that go above and beyond of reading preferences and metadata fields. Technically, this would even allow for the creation of publish services that could publish photos to multiple destinations, each controlled by a "friendly" plugin.

          • 2. Re: Feature Request: Friend Plugins
            areohbee Level 5

            Hi Vladimir,

             

            I just realized that is possible now to read custom metadata of any plugin you have an ID for, so that part is actually already in place.

             

            I like your idea of interplugin communication - that would be even better...

             

            Rob

            • 3. Re: Feature Request: Friend Plugins
              DawMatt Level 3

              Hi Vladimir,

               

              I've wanted to develop this type of plugin before and tried to think of ways to implement this concept. Using the current version of the SDK but it would be rather difficult and any possible implementation would be fragile and difficult to support.

               

              On the flip side if Adobe implement this it could become a security nightmare.  Depending on how the SDK is written we could end up with a situation where careless programming allows other plugins to mess around with the internals of your plugins while they were running.  How would you envisage this SDK feature being implemented securely yet flexibly?  Presumably the caller ID would be supplied by Lightroom so code couldn't easily masquarade as another plugin, but would you expect "allowable callers" to be defined in code, in Info.lua, or somewhere else?

               

              I'm still trying to mull over the best way to do this.  Might put in a feature request once we've fleshed this out a little more.

               

              Thanks,

              Matt

              • 4. Re: Feature Request: Friend Plugins
                areohbee Level 5

                How about a file-based plugin communications scheme, which could include a ramdisk setup for better performance. - Not as a good permanent solution but as a work-around until Adobe comes up with something, or in case they dont.

                 

                Example functions:

                 

                local status, errorMessage, replyMessage =                           sendMessageToPlugin( destPluginId, message, timeToWaitForReply )

                local status, errorMessage =                                                   sendReplyToPlugin( destPluginId, messageId, replyMessage )

                local status, errorMessage, messageId, pluginId, message = waitForMessagesFromPlugins( timeToWaitForMessage )

                 

                Messages are saved in and read from files.

                 

                PS  - I now have a shared-properties file that any plugin that knows  about it is free to write to and other plugins are free to read from...   But there is no way to control security.


                Regarding Id generation, I agree Lightroom could provide more security than Lua alone. But one could come up with a semi-secure scheme that keeps honest plugins honest... Maybe even a secure external app that gets in the loop...

                 

                If I had the time... - better if Adobe does it ;-}

                 

                R