Copy to clipboard
[13:47:21] mdavey_ [~chatzilla@82.195.100.25] hat #tikiwiki betreten
[13:50:52] <mdavey_> q to the developers - is there any tiki code at the moment that provides a callback mechanism? I don't recall seeing anything like that in tikiwiki.
[13:50:58] <toggg> yes, nobody should be able to force you !!!
[13:51:12] <toggg> a callback ?
[13:51:45] <toggg> for what ? and when ?
[13:52:14] <mdavey_> I'm planning to add a register-callback feature to tiki-registration.php (don't get confused byt he slightly different uses of the word 'register' here)
[13:52:49] <toggg> Hmmm... you mean on given events ?
[13:53:00] <mdavey_> The idea is that mods will be able to ask tiki-core to be notified when someone new registers with the site, and thus take the appropriate actions.
[13:53:07] <mdavey_> yes, on events.
[13:53:38] <toggg> as we could say for instance a page change
[13:53:50] <toggg> or some setting in admin ...
[13:53:59] <mdavey_> yes. or simply logging in.
[13:54:13] <toggg> ah la la
[13:54:23] <toggg> that's future ...
[13:55:11] <toggg> yeah ... a few more db accesses ...
[13:55:28] <toggg> that's becoming a pity on tw.o ...
[13:56:08] <mdavey_> perhaps something that has been integrated by tiki-integrator needs to provide a seperate login at the moment (such as 3rd party bulletin board) - a callback mechanism would allow a little bit of glue code to be written to also log the user into the bulletin board, when one logs into the site proper.
[13:56:54] <toggg> yes, such mechanism can have many uses
[13:57:15] <toggg> even to communicate with some crons, for instance
[13:58:01] <mdavey_> My thought was that perhaps some less-used feature was already using its own callbacks - perhaps calendar or blogs? But I don't recall actually seeing such code in my own travels throught the source - so asking other developers for their eyeballs - anything in tiki that does callbacks at the moment?
[13:58:04] <toggg> or simply stack a message ... perhaps ...
[13:58:59] <toggg> so far I remember, not in that "callback" acceptance
[13:59:31] <toggg> something like that could actually save requests too
[14:00:38] <mdavey_> (db accesses) yea, Id be interested to learn why db accesses on tw.o has jumpted from ~75 to ~300 on homepage recently.
[14:00:42] <toggg> you could imagine to have "your messages", last comments, last changes ... in only one table
[14:00:47] <mdavey_> *jumped
[14:01:04] <toggg> we are loosing prospects because of that
[14:01:14] <toggg> I hear some noises ...
[14:01:36] amette has been thinking of some kind of <buzz>Tiki Message Bus</buzz> also...
[14:01:38] <toggg> and never we should need that
[14:01:56] <toggg> that's quite static that whole !
[14:02:20] <toggg> (if we had events ... perhaps ... right ! )
[14:02:28] <amette> I don't remember, how I came to think about this, though... but e.g. the RSS-generation could subsribe to the changed_wiki_page message and then generate the RSS - would make the RSS in sync
[14:02:40] <mdavey_> actually I think just timestamps would help in some places.
[14:03:25] <toggg> but, releasing as is is a suicide
[14:03:27] <mdavey_> for instance, main menu. If you know the main menu hasn't been changed since march, you don't need to fetch it from the db every time.
[14:03:42] <toggg> voila
[14:03:49] <amette> yup, same with RSS generation.... you don't need to do anything, if nothing changes...
[14:04:20] <toggg> even if you have lot of connections ... better even normally
[14:04:33] <toggg> should just have been done
[14:04:51] <toggg> but we have some perms set into account
[14:05:59] <mdavey_> Actually, I think one of the main priorities is to get the mods feature working correctly. Once that is done, every feature could be turned into a mod and then a core profile could install tiki core without any mods at all, and a basic-enabled profile will install the mods that give you an environment like the current basic-enabled profile.
[14:05:59] <toggg> all "events" are re- and re- ... calculated ... perhaps somehow
[14:06:45] <toggg> yes, I'm dreaming of speed.tw.o which would have only a subset of tw.o
[14:07:12] <mdavey_> ...then we could kick-off a tiki-core project to improve the workings of the core while staying true to the 3rules.
[14:07:20] <toggg> could be I care only of wikis or only of forums
[14:07:50] <toggg> 3rules are no obstacle here
[14:08:12] <toggg> it can be easily made optionnal
[14:08:13] <mdavey_> toggg yes that would be easy to do with mods and profiles - a tikilite profile that only gives wiki, a tikiforums profile that only gives forums, etc.
[14:08:30] <toggg> for example
[14:08:49] <toggg> but I would perhaps do it direct in code
[14:09:05] <toggg> generating the menu tpl, for example
[14:09:31] <toggg> but, that's bloody, cache should do it
[14:09:48] <toggg> something is wrong here
[14:10:02] <mdavey_> (optional) true, but if everything has been moved to mods and the profiles install mods as I described, it makes it much easier to make changes without breaking things.
[14:10:08] <toggg> or "ther's something rotten in this kingdom"
[14:10:54] <toggg> why is cache not doing it ?
[14:10:55] <mdavey_> I think the cache code is probably in the wrong place. If you look outside of tikiwiki, things like Java put the cache at the db abstraction layer.
[14:11:48] <toggg> I mean , should depends on date and perms for example for menu
[14:12:40] <toggg> anyway, you can see that sites without a lot of features are speed already
[14:12:47] <mdavey_> and tikiwiki is really 2-layer architecture at the moment: frontend (display logic, layout control (smarty), business logic (libs)) and db abstraction, db.
[14:12:52] <toggg> tw.o is quite peculiar
[14:13:20] <toggg> ah la la , only 2 layers ?
[14:13:54] <mdavey_> moving to a proper 3-layer architecture with the business logic in a seperate layer would help, I think. But then it becomes more heavyweight.
[14:14:09] <mdavey_> I'd say tikiwiki is 2-layer. Would you disagree?
[14:14:57] <toggg> no, perhaps not ... (if you forget client side)
[14:15:09] <toggg> layers ...
[14:15:35] <mdavey_> more heavyweight means more temptation to put the different layers on different boxes. That may be a negative from an evaluator's point of view. Makes tikiwiki look more complex than alternatives.
[14:16:08] <mdavey_> Have you looked in-depth at mambo source? Nice architecture but much slower than tikiwiki 1.8.5
[14:17:09] <toggg> anyway, I would like to see what are these some 300 requests we have in a page, some trace ...
[14:17:59] <toggg> no, never crawled to deep in mambo, tw and pear me enough the last monthes
[14:19:47] <toggg> drupal are lucky they got money (from subscription, 10.000$ I think) and a new server (from sun)
[14:26:38] <mdavey_> I used to work for Sun ;)
... cut some talk about paper vs e-dictionaries, computer cooling/silencing, etc ... ;)
[19:21:10] <mdavey_> amette, franck can you think of anywhere in tikiwiki code where you have seen a function-callback-on-event mechanism implemented?
[19:21:57] <mdavey_> callback pattern or publish-subscribe pattern
[19:22:15] <amette> mdavey_ : sorry, I don't know about anything like that...
[19:23:06] <toggg> aaahhh ... they exist but not in the schedule you mean, mdavey_
[19:23:37] <toggg> what is a watch ?
[19:23:54] <mdavey_> yea I want to know if that generic programming pattern is used anywhere in tikiwik at the moment.
[19:24:08] <toggg> cvs co
[19:24:18] <toggg> find grep
[19:24:43] <toggg> but I doubt in the extend you mean
[19:24:50] <amette> mdavey_ : I'm not deep in tiki-code, but some kind of extensible-message-bus for tiki would be imho very, very welcome - just like you said: makes Mod-development just a task of pluggin in...
[19:24:58] <mdavey_> watch is slightly different, I believe. Because it isn't a watch feature that has registered an interest in page changes with the editor feature, but rather something that is hardcoded.
[19:25:07] <toggg> make a game to try it, mdavey
[19:25:17] <toggg> the event catcher game
[19:25:18] <amette> on the other hand - this throws up some serious design questions...
[19:25:47] <toggg> watch is an event
[19:26:15] <toggg> I mean the wiki update is
[19:26:20] <toggg> sorry
[19:27:15] <toggg> but event means here , the action of mailing subscriber is something else as the update
[19:27:33] <toggg> can be done later, anyway
[19:27:46] amette thinks that must be done later
[19:27:55] <toggg> is it ?
[19:28:07] <toggg> I doubt
[19:28:19] <amette> We would need to extend the code for everything....
[19:28:55] <amette> Not only checking of permissions and functions, but sending a message with every action..
[19:29:02] toggg Markov diagrams ... Finite State Machines
[19:29:09] <toggg> lovely
[19:29:09] <amette> Any PHP-file is affected imho..
[19:29:13] <mdavey_> no, not really. There are probably only a few events that happen in tiki. Lets try to list them:
[19:29:20] <amette> ok
[19:29:26] <mdavey_> 1. user registers
[19:29:34] <toggg> no
[19:29:39] <mdavey_> 2. user changes user preferences
[19:29:43] <toggg> 100 sorts of it
[19:29:47] <amette> yup
[19:29:51] <amette> 3. wiki changes
[19:29:51] <mdavey_> 3. user changes user information
[19:29:54] <amette> 3. .wiki created
[19:30:01] <amette> 4. article added
[19:30:01] <toggg> ah la la
[19:30:06] <amette> 5. article type added
[19:30:12] <toggg> 5 is allready too much
[19:30:14] <mdavey_> no, they are all the same.
[19:30:20] <toggg> ah
[19:30:28] <mdavey_> 4. content created or modified
[19:30:28] <amette> mdavey_ : still you gotta put them into the code....
[19:30:32] <toggg> lot of things are same ...
[19:30:52] <mdavey_> 5 content deleted
[19:30:53] <amette> ok, let's listen to mdavey_ - sounds like he has got some plan....
[19:31:08] <mdavey_> 6. user banned
[19:31:25] <toggg> I've no plans, only FSM
[19:31:52] <mdavey_> 7. user logged in
[19:32:42] <mdavey_> 8. user becomes dormant <-- this one might be difficult to code. needed by things like the active users module.
[19:32:49] <mdavey_> any others?
[19:33:06] <amette> mdavey_ : hmm, do we think of other things, here?!?
[19:33:16] <mdavey_> yes
[19:33:24] <amette> ok, then I just don't get it... ;)
[19:33:40] <mdavey_> 9. feature enabled
[19:33:46] <mdavey_> 10 feature disabled
[19:33:47] <amette> Why are the ones you just listed sufficient? What are you up to?
[19:34:20] Kanzaki_Urumi [deathwolf@AToulon-201-1-27-224.w81-48.abo.wanadoo.fr] hat IRC verlassen: Read error: 60 (Operation timed out)
[19:34:43] ikkys [~chatzilla@218.208.223.68] hat #tikiwiki betreten
[19:34:49] <mdavey_> I think that is about it. Some of the wording might need changing a bit. For instance, 4 should probably be content published/changed, 5 should be content unpublished.
[19:34:52] <amette> I thought of any event creating a message - best even passive ones, like reading a page - so we got all options open for the future....
[19:35:07] <ikkys> helloss
[19:35:13] <ikkys> higuys
[19:36:11] <mdavey_> amette okay, why would a feature need to know if you were reading a page? Not saying you are wrong, just trying to see how you are thinking.
[19:37:40] <amette> mdavey_ : As a matter of fact, I don't know (that's why I thought: best - probably 'eventually' would have been better). But perhaps/eventually you want to gather some kind of statistics - if we implement such a service, then we should take care, that it can handle anything...
[19:38:11] <amette> ... I thought of making it optional - pretty much like permission system: generate messages for....
[19:38:23] <mdavey_> My plan would be to provide some kind of generic mechanism that would allow tiki mods to ask tiki-core to be notified when an event occurs, allow any code to tell tiki-core about an event, and allow tiki mods to unregister for event notification when done.
[19:39:40] <mdavey_> tiki-core would maintain a list of events and functions to call when that event happens, and would be responsible for actually performing the callbacks.
[19:39:42] <amette> Yes, pretty much that was my thought, too - only I thought of making every action capable of generate a message to, say Tiki-core
[19:40:14] <amette> yup, that's what I thought of, why don't you want to make it as granular as Tiki is at the moment?
[19:41:06] <mdavey_> okay, same kind of thinking. My initial thought was to use php, but xmlrpc or soap or some kind of message service would work just as well.
[19:41:32] <amette> On the other hand: we don't have to make that immediately with the first try - when this Tiki-Core is established, it should be only one line of code in every function to be added later on...
[19:42:00] <amette> Yes, I thought of php, too. But using xmlrpc or soap I think is actually much better
[19:42:50] <mdavey_> okay, statistics yea I hadn't thought of that. That would be nice - different people could write modules to do different types of graphs, of hits, or browser distribution, most popular pages, etc.
[19:43:27] <mdavey_> but start with the simple stuff. registration is simple because AFAIK, there is only one route, through tiki-registration.php
[19:43:44] <mdavey_> login is pretty simple too, a login screen and a login module.
[19:45:02] franck [~franck@adsl-67-124-190-154.dsl.lsan03.pacbell.net] hat #tikiwiki verlassen
[19:45:04] <amette> Yes, why not start with that as a proof of concept! This Tiki-core would have to be modular anyways...
[19:46:20] <toggg> oh nice :) TNT-devs ?
[19:46:39] <mdavey_> when I say tiki-core, I mean the ill-defined set of files that includes tiki-setup.php, smarty, tikilib, ...
[19:46:45] <amette> And Tiki-Mods shouldn't only be able to subscribe to Tiki-core, but also register their own message-functions there - and now we really get into some serious design-trouble....
[19:47:19] <amette> mdavey_ : yes, we are just ripping it apart to make it a Tiki-Micro-Kernel and add all the other functions as daemons...
[19:47:20] <toggg> TNT is the onliest way
[19:47:49] <amette> Tri-Nitro-Tuluol?
[19:48:13] <amette> toluol
[19:48:18] <toggg> something like that, yes, dynamite
[19:48:27] <toggg> ahahah
[19:48:47] <toggg> soft dynamite
[19:48:59] <amette> toggg : please explain yourself....
[19:49:30] <toggg> oh ... that was another nick ...
[19:49:53] <mdavey_> amette (micro-kernel) yea kinda a web os or web desktop
[19:51:08] <amette> mdavey_ : yup, that would be cool - and without being a real coder - I think most of the code of Tiki could be reused.... eventually... ;)
[19:53:40] <mdavey_> but *this* change will be very lightweight - this is still Tiki1 afterall and there are 3rules. Hmm, starting to think that this mythical 3rules is like the Cable that controlls the Internet. Maybe there is no 3rules either?
[19:54:53] <lorinc> true :)
[19:55:30] <lorinc> but versioning is in praxis, and "renaming"... lets put kernel stuff into tiki2
[19:56:08] <mdavey_> http://en.wikipedia.org/wiki/There_is_no_Cabal
[19:56:11] toggg [~bertrand@lns-th2-2-lyo-82-249-206-146.adsl.proxad.net] heiÃt nun redadair
[19:56:23] Pris [~FU@200.69.24.3] hat #tikiwiki betreten
[19:56:23] redadair [~bertrand@lns-th2-2-lyo-82-249-206-146.adsl.proxad.net] heiÃt nun red_adair
[19:56:27] WebWeasel [~WebWeasel@CPE-24-208-125-172.kc.res.rr.com] hat #tikiwiki betreten
[19:56:42] <amette> yes, this all sounds like real tiki2 stuff - but what is tiki 2 anyways....?!? (rhetoric question)
[19:57:11] <mdavey_> vapourware
[19:57:15] <amette> lol
[19:57:19] <lorinc> this whole talking and maybe acting upon common consensus? or another luis ;)
[19:57:28] <mdavey_> oh rhetorical, damn ;)
[19:57:32] <amette> hehe ;)
[19:58:11] <lorinc> implementing a demo using login for example would be nice for core-starters ;)
[19:58:57] <red_adair> ahahah registered !!! Red Adair :)
[20:00:46] <amette> lorinc : yes, that's true... still it's some work to do...
[20:02:06] <amette> toggg : we are not putting out fire - we are starting one
[20:07:34] <mdavey_> I'm game. I'll start looking into this properly towards the end of next week.
[20:08:21] <amette> He got game! And I'm in game, too!