Forum OpenACS Improvement Proposals (TIPs): Tip #26 (Approved for 5.1): Exchange acs-mail-lite
If done in one step then it will be easy to communicate as 'The new acs-mail' instead of having several interim stages, which reminds me on the confusion of photo-album (is the new version now part of MAIN? etc.).
Does the contrib version of acs-mail-lite contain all the changes that has happened to the packages version of acs-mail-lite, since you forked it?
But maybe Tilmann is right, and we should go and take out the mail system confusion first. Which would lead me to the question, why do we have acs-mail and acs-mail-lite in the first place and what packages are using acs-mail. I mean, if we get rid of one of them my understanding is that we have to rename the mail-procs in each package, or am I utterly mistaken here (I admit, no look at the acs-mail code yet).
One of the major differences between acs-mail and acs-mail-lite is that acs-mail handles multipart MIME messages, encoding/decoding each part appropriately based on the content type, etc.
We need this functionality.
Does your acs-mail-lite support this?
My guess the only reason is this: Because openforce was under heavy time pressure when they had to deliver dotlrn and didn't want to bother with understanding and potentially having to fix the existing package acs-mail.
Don't know what packages are using acs-mail right now, but if we merge acs-mail-lite into it that would mean that at least we would have to change the calls in all packages that use acs-mail-lite, which is mainly notifications. And maybe some more in dotlrn.
Maybe the merge would also suggest improving / modernizing the acs-mail api which would mean that existing acs-mail calls would need to be modified as well (I'd volunteer for that). Or we can build a compatibility wrapper that maintains the old acs_mail_lite:: and acs_mail calls.
If you want this to be part of the mail system it should not be much of a deal to just copy the function from one scope to another. But here I will stay out and ask Timo to comment on this, as he was heavily working with it and has the in depth knowledge.
PLEASE DON'T BREAK EXISTING CODE
Sorry for raising my voice, but there has to be a better way to migrate to a newer and better mail package than ripping the old one out (moving it to the obsolete packages graveyard) and plunking in a new one with the same name but a different API.
There are folks out there using the current packages and they will not follow along to new releases if it breaks their production code.
Or, maybe I misunderstood what is proposed?
Randy, I don't think you misunderstood at all.
You know HIV, the virus that causes AIDS, kills its host by constant mutation. Our amazing immune systems kill most of it over and over again, but a little bit that is slightly different remains to grow up again. API changes are like giving HIV to your Open Source project. Amazing, enthusiastic programmers do their best to keep up, but eventually succumb to these tiny changes.
But I'm also reminded of how, when I was a kid, I would find a typewriter or other complex mechanical device. Not having the tools or patience to take it apart, I'd just smash it on the ground and then collect the parts that fell off. Cool!
So maybe we should stick with the *original* TIP and make a decision on this before we talk about changing the whole mailsystem. But again, this is up to the OCT.
One note on the API changes. If I'm not mistaken, mutation is welcome in the world of science, otherwise progress would not happen. What we just have to make sure is that the API does not break existing code (thereby not taking a darwinistic point of view). Which is really easy to accomplish, especially in this case.
Anyway, all I can do is to mention that there is acs-mail-lite in contrib, that does not break existing code, is compatible to the version in packages and it's up to the OCT to come to a decision whether to use it for OpenACS or not. Anyone wanting to get bouncing and documentation can still take the contrib version after all.
And it was only used in a few places.
While I'm sympathetic to the goal of backwards compatibility, do we really need to keep the worst of the worst available for use forever and forever when we know the code really sucks and is fubar'd beyond any reasonable hope of repair?
How devoted are you to this concept, Tom? If we uncover a security hole that requires an API change to fix, should we leave the hole open because of slavish devotion to the principle of maintaining API compatibility forever?
I wouldn't see any harm in deprecating acs-mail in favor of an acs-mail-lite that has all the features we need but is more efficient as long as we give people ample notice that it's going away. What is ample notice, then? Six months? A year?
Ample notice in the world of Oracle Apps is 2 releases.
6 months is a good time and lets involved parties investigate changes properly and thoroughly.
If we let bad code linger around forever, we encourage junior *and* senior OpenACS hackers to copy bad behaviour. A lot of the code written is copied/taken from already existing code, the worse the original, the worse the newly-built code.
One thing I think is important to do is make clear which packages are no longer actively developed and which have been superceded by another package. Moving them to obsolete-packages seems to be the best way to do that. bboard is a good example. People were still using it on new installs even though it had a host of problems mostly because it wasn't clear that forums was the prefered package.
In any case, I had a look through the code and here are some observations:
- acs_mail_lite::with_finally should go somewhere else (probably along side with_catch in acs-tcl utilities-procs.tcl)
- it needs upgrade scripts for existing installs (since it changes the datatype of to_addr to text/clob, and adds some columns and renames some constraints
- I dislike that it renames existing constraints since its certainly possible that some people code might check for the contraint name when an insert or update fails.
- the code has tabs rather than spaces (although since we do not have any coding standards I guess thats not a fair criticism).
I agree with Don that it should be a 5.1 thing though.
I think Malte's original TIP is a good idea, but the future of mail, combining two mail packages, changing the bad api and updating the rest of OpenACS and dotLRN (forgetting client code) in one TIP is a little much. When someone says "I approve" to this TIP, what does it mean?
On the topic of not breaking existing code - yes of course. A merge would have to consider upgrade issues as well, maybe someting like a compatibility api would be feasible.
I've got an error in the logs with the bounch processing that I will fix in the next few days.
Other then that it seems to be working for me.
Is it maintained?
It doesn't have *any* documentation at all, even the code is sparsely documented. Does it need doco?