You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/11/06 18:14:03 UTC

[GitHub] rob05c commented on issue #2991: WIP Traffic Ops Go ATS Configs - meta, profiles, remap.config

rob05c commented on issue #2991: WIP Traffic Ops Go ATS Configs - meta, profiles, remap.config
URL: https://github.com/apache/trafficcontrol/pull/2991#issuecomment-436353097
 
 
   I agree, and I did consider them. I'm not positive `text/template` is powerful enough, but even if it isn't, it might be worth finding a library that is.
   
   But for now, I'd like to transliterate the Perl as closely as possible, just to minimize the risk of accidentally changing the logic. There's a lot of logic, and it's a pretty critical part of the CDN.
   
   I'm actually hoping to do a lot of rewriting, once it's in Go, and easier to understand and work with. I'm also really hoping, after it's all in Go, to go back and analyze "these are all the queries, and this is all that data needed by a config file / cache", and then make a new TO endpoint that contains all that data, as a generic "cache config data" endpoint.
   
   That lets us do 2 things. We can then write a library that hits that endpoint over HTTP and builds the config files from it, which can be used by ORT. But as an intermediary step, we can also change the config file endpoints to use that single "getConfigFileData" func and struct, and then build the config files to be served using that data as well. In fact, we can do both, reducing duplicate code, as well as the total amount of SQL code, and likely also the number of queries, improving performance.
   
   Which, I'm also hoping that single "cache config data" endpoint can be used by Voluspa, and also serve as the "generic CDN cache config language/protocol" we've been wanting to make for a long time now. (Though I think the common practice of calling it a "language" or "protocol" are misusing the words, notwithstanding).
   
   And I'm guessing the best way to build those config files from the "cache data" endpoint, is going to be with templates.
   
   So yeah, hoping to do all those things. Just hoping to do them in increments, so each step is smaller and safer.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services