Pros and Cons of filtering messages in TCL vs Xlate

Clovertech Forums Cloverleaf Pros and Cons of filtering messages in TCL vs Xlate

Do you prefer to filter messages mostly through TCL or XLT?

You must be logged in to participate.
  • TCL
  • XLT
  • Creator
    Topic
  • #122159
    Yutaka
    Participant

      What are the Pros and Cons of mostly filtering in TCL vs XLT?  I’ve been at organizations that do it both ways.  I generally prefer to filter messages in XLT since modern hardware can handle the processing, it’s easier for beginners to read and build, easier to debug, and even if there are errors on one route it should not prevent other routes from sending out messages.  The Pros for TCL might be easier to stack multiple filters with arguments on one route and functionality is limitless.

    Viewing 1 reply thread
    • Author
      Replies
      • #122161
        Jim Kosloskey
        Participant

          email me and I will send you what I did to evaluate the performance differences between Tcl filtering and Xlate filtering – including chaining for filtering.

          I will send you the evaluation and the testing components I used to do the evaluation which you can run on your environment. If you do decide to run the evaluation, I would be interested in your evaluation.

          email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

        • #122162
          Jason Russell
          Participant

            I think you’ve noted some of the major pros and cons between the two. I think Jim Kosloskey has done a load and timing comparison doing TCL vs Xlate, and I think the difference was minimal.

            I will add this, when we were coming onboard with Cloverleaf, they (Cloverleaf reps/trainers) pushed against filtering in Xlate.

            However, the answer comes down to “it depends”. It’s a whole lot easier and cleaner to write generic filters (we have a lot of facility and department filtering) that are stored in master that a LOT of our interfaces use. You call the filter, pass in a table, and it does it’s work based on that. When troubleshooting, while it does add an extra step, you know it’s there, it’s marked and you immediately understand what it does. There is no need to parse the entire message (just pop out the data you need, check to see if it needs to go, and work it based on that).

            On the inverse, when you get to specific filtering that is unique to a specific vendor/interface, it’s almost easier to do in the XLate. However, when doing it that way, there has to be an easy way to see if you’re filtering in the Xlate. Comments and whatnot can help, but again, that’s a high level design choice. Filtering in TCL helps quickly see IF it’s happening, and then you dig deeper to see how it’s happening. Keeping the filters in Xlates means you have to dig into the Xlate itself and see if it’s filtering and how it’s filtering it.

            And this is my personal opinion, to me it’s easier to read filter rules in TCL, depending on how it’s written (assuming some decent style guides and good variable naming).

            One of the things that a senior tech has emphasized is “make it so it’s easy as possible to troubleshoot at 3 AM after being woken up out of a deep sleep, and you didn’t write it”.

            • #122163
              Rob Lindsey
              Participant

                here here Jason – make it easy to troubleshoot at 3am.

                Just so it is here… mine is to do it via TCL as that way you are not over processing things… if you can get rid of a data message on the inbound TPS stack then it does not have to do the complete breakdown of the message and use up extra memory.  If you have your TCL writing out the data to process logs when things are removed and you have them going to splunk or some other logging service, then you do a whole lot of other things based upon that.  Just my $0.02.

                Rob

              • #122164
                Jim Kosloskey
                Participant

                  Chaining Xlates is a way to identify filtering is going on in the NetConfig or NetMonitor via Xlates.

                  The first Xlate does the filtering and only the filtering, the second does any transformation warranted. Naming the first filter something indicating filtering helps.

                  I have begun experimenting with ‘globalizing’ filter Xlates. The INCLUDE Xlate Action could be instrumental with a few changes to its functionality (some of which I have requested on this forum) along with appropriate variant definitions.

                  At my last employer before the INCLUDE was available, I accomplished some of this. I was just beginning that work when the employer decided to get rid of Cloverleaf and I departed.

                  I think it is close to doable, but I do not have any testing to evaluate and describe how-to and impacts.

                  I also use Tcl for filtering but less and less these days simply because many of my clients do not have the staff to support Tcl beyond very simplistic functionality, but they do understand the Xlate better.

                  That situation is what drove me to do my evaluation of the performance differences. If they were substantial, it would not be fair to my clients to not recommend Tcl over Xlate.

                  For the environments where there appeared to be a big difference, I frequently discover an architectural issue like overloaded processes or sites (more frequently overloaded sites).

                  email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

            Viewing 1 reply thread
            • You must be logged in to reply to this topic.