We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    It's a fairly basic message queue, where you subscribe to topics and send or read messages to/from the topic. More documentation is definitely needed on the Registry, but the examples in this thread should cover the basics for now. Perhaps if you have some specific questions, those can help inform the documentation that needs to be written.
      • 22303 MODX Staff
      • 10,725 Posts
      FYI, I have some initial documentation up at http://rtfm.modx.com/display/revolution20/modRegistry — feedback appreciated.
        • 33968
        • 863 Posts
        Do these forums in any way use the registry to handle topic subscriptions? If so, it might be useful to dig into the code for Discuss to see what's going on there...
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: okyanet at Aug 29, 2011, 03:53 PM
          Do these forums in any way use the registry to handle topic subscriptions? If so, it might be useful to dig into the code for Discuss to see what's going on there...
          No, they don't.
            • 15083
            • 697 Posts
            Great Post, very interested in this. I would like to add a few more questions which u touched on opengeek:
            In relation to using revo:

            1. The sessions in the db, does this place much of an extra burden on the mysql instances running on each server?
            I mean would it be a concern for very highly trafficked sites?

            2. Cache: We use a separate sub-domain to manipulate a master DB, which is sync'ed with each web server. The file systems on each server are identical, so i guess each server can maintain a separate cache. How could we set up the cms master domain to force each box to clear it cache when the master db is updated? Is this what u detailed with the two plugins?

            I've used MODx for years, but now need to try and sell it into a much bigger setup than i am used to (single sites running 1 instance of modx), have you any killer PowerPoint slides knocking about regarding MODx and large multiserver setups?






              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: jusmeig at Aug 30, 2011, 03:32 PM

              1. The sessions in the db, does this place much of an extra burden on the mysql instances running on each server?
              I mean would it be a concern for very highly trafficked sites?
              It certainly can, since in a typical load-balanced environment the database servers are not local to the web servers, forcing a much more expensive database connection via TCP (rather than via local sockets). You can use your own session handler however very easily. I've seen some very high-traffic deployments successfully use the default file-based PHP session handler (just set the session_handler_class System Setting to blank to use whatever session handler you have configured for in your PHP ini) along with something called "sticky" sessions, where a specific client remains on a specific web node for the duration of their session (controlled by the load balancer).

              Quote from: jusmeig at Aug 30, 2011, 03:32 PM

              2. Cache: We use a separate sub-domain to manipulate a master DB, which is sync'ed with each web server. The file systems on each server are identical, so i guess each server can maintain a separate cache. How could we set up the cms master domain to force each box to clear it cache when the master db is updated? Is this what u detailed with the two plugins?
              That is a good summary of what I detailed, yes. When clearing cache from the manager, the first plugin looks up all the web node instances currently registered by the remote commands plugin and sends a command message to each instance to clear it's local cache.

              Quote from: jusmeig at Aug 30, 2011, 03:32 PM

              I've used MODx for years, but now need to try and sell it into a much bigger setup than i am used to (single sites running 1 instance of modx), have you any killer PowerPoint slides knocking about regarding MODx and large multiserver setups?
              Not at the moment, but great idea for a future presentation. smiley





                • 15083
                • 697 Posts
                Quote from: opengeek at Aug 30, 2011, 05:49 PM

                Not at the moment, but great idea for a future presentation. smiley

                Well put me down for a copy!
                Another question,. this one would be VERY important for us:
                Cache: At the moment we use CI fragment caching and DB caching.

                1. How does the new Revo caching stand up to these?
                2. Is caching done per Context, as I want to setup multiple domians in the one install, and then setup users who can access Contexts (IE restrict one user to one domains.....another guy can see 2 domains etc etc)
                3. Can I clear the cache for one site...or would the plugin just send a general flush for all contexts?
                4. From your experience, would we be better maintaining seperate managers per site, to avoid the more complex setup (doing this is not an issue)
                5. Sorry for all the questions, and many thanks for helping out with answers!
                  • 22303 MODX Staff
                  • 10,725 Posts
                  Quote from: jusmeig at Aug 31, 2011, 02:48 AM

                  Cache: At the moment we use CI fragment caching and DB caching.

                  1. How does the new Revo caching stand up to these?
                  I will have to look into CI's caching mechanisms to give you an answer on this another time; I am not familiar.

                  Quote from: jusmeig at Aug 31, 2011, 02:48 AM

                  2. Is caching done per Context, as I want to setup multiple domains in the one install, and then setup users who can access Contexts (IE restrict one user to one domains.....another guy can see 2 domains etc etc)
                  There are many partitions involved in MODX caching, responsible for specific pieces of data, and yes, each Context has it's own part of the context_settings partition.

                  Quote from: jusmeig at Aug 31, 2011, 02:48 AM

                  3. Can I clear the cache for one site...or would the plugin just send a general flush for all contexts?
                  You could extend the RemoteCommands plugin to refresh specific Contexts, specific Partitions, or just about anything you can imagine. See http://rtfm.modx.com/display/revolution20/Caching#Caching-UsingmodCacheManager%3A%3Arefresh%28%29%28forMODX2.1andlater%29 for more information on refreshing the MODX cache.

                  Quote from: jusmeig at Aug 31, 2011, 02:48 AM

                  4. From your experience, would we be better maintaining seperate managers per site, to avoid the more complex setup (doing this is not an issue)
                  It would be much less complex to have one domain, separate from any of the front-end Contexts, serve the manager UI and serve as the main instance. If you need site-specific managers to respond on each domain, then you might be better off using separate installs.
                    • 15083
                    • 697 Posts
                    Thanks opengeek, just coming back to this one now.
                    Looks like I may be implmenting Revo in a load balanced enviornemt and wondering if you could share any of the snippets regarding:
                    Registering the node content servers
                    Sending the clear cache?

                    Excuse my noobism...but this is my first implementation in this enviornment and I dont full understand the above (lol I just typed it)
                    The "message" that gets send from the master to the nodes....what type of connection is it.
                    Assuming that our DB's sync with the master quite frequently, is there a flag in the DB that says "Clear the cache down" and the nodes would get this and clear their local cache?
                    If this possible?

                    Thanks for the help, greatly appreciated. [ed. note: jusmeig last edited this post 15 years ago.]
                      • 36906
                      • 34 Posts
                      TheNewManifesto Reply #20, 15 years ago
                      Hi Jusmeig,

                      The two snippets you need are on page 1 of this post.

                      I believe messages can be file or DB based...
                      They aren't sent as such - its more like you subscribe to the message topic from a consuming node.

                      The two snippets are implemented as plugins, which respond to two important system events - one on the master DB, and the other on any web nodes.

                      Any web node that wants to subscribe to the 'clear cache' message topic, must first register its IP address with the master DB.


                      Whenever the cache is cleared on the master DB, it looks to see which nodes have subscribed, and then stores the 'clear-cache' message alongside the node IP.

                      Whenever a node connects to the master DB, it can see whether it has been told to clear the local cache based on the IP/Clear message - and then reacts.

                      It really is very cool, considering there is actually very little code to implement!