Metakit (was Wiki issues)



  • 1. history info
    Hi, Does [history info] only work when tclsh is interactive? I am trying to write a control structure and would like to see the original command invocation before substitutions. something list this proc matrix { args } { puts "history is '[ history info 1 ]'" } set a [ list 1 2 3 ] set b [ list a b c ] matrix $a $b -------------- the output should be history is ' 13 matrix $a $b' Thanks, XXXX@XXXXX.COM
  • 2. BLT for 8.5?
    With Tcl/Tk 8.5 final around the corner, any chance of seeing a compatible BLT soon? Thanks. Jean-Luc
  • 3. TclCurl and FTP
    I have searched the documentation for cURL, libcurl and TclCurl but can't seem to figure out what should be a simple FTP problem. I want to FTP to a host, cd to a directory and get all files with a suffix of .txt. In other words, do a directory listing like "ls *.txt" then get the indicated files. After I get the files from the host I want to be able to either delete them or move them to a different directory. I can do all of this with the FTP package from tcllib but cannot figure it out with TclCurl. I suppose if I understood how to use the prequote, postquote and quote options I could do it there?
  • 4. TK as GUI frontend program under Windows
    On Unix, TK is commonly used as a GUI frontend to many well-known command-line programs (e.g. cbrowser for cscope). Although TK runs on Windows, it never seems to be "natural" to use it as a frontend program on Windows. It appears to me that many Windows frontend programs are actually written as native Windows applications. I'm interested in knowing how many TK frontend programs have been written for Windows command line programs. Has there been such a discussion before? /Why Tea

Metakit (was Re: Wiki issues)

Postby Mark Roseman » Sat, 24 Mar 2007 23:02:02 GMT

To give this a bit of additional perspective (and because a lot of 
people - not Neil though, I should add - have been slamming Metakit the 
last week or so without understanding it)...

Like any good tool, Metakit is at its best when used properly in the 
situations its designed for.  Using it like MySQL in a CGI-based web 
environment is certainly not what its designed for.  Despite that, as 
Neil notes, its worked well enough for years, but ran into some issues 
when severely pushed the last few weeks.  Given that wikit was a pretty 
quick hack many years ago that has not had much attention given to it, 
it's probably says something about how effective Metakit can be even 
when explicitly used in an environment that was not a good fit.

FWIW, Metakit does support concurrency between threads (when given a 
badly documented option), but that's still not the way it was designed 
to be used.  In the wiki case, switching off of CGI scripts but using 
either a fileevent/single-thread or a single-process/multi-thread 
approach would have been more than enough to address this.  The CGI 
model (multiple processes all writing to a Metakit database) is not what 
it was designed for.  To say nothing of the fact that running an active 
site on CGI these days, especially on as old a box as we have been, 
should be considered sheer madness. :-)

Use it properly, for a problem domain where it makes sense and in the 
correct environment, and Metakit is ridiculously hard to beat.  With 
ProjectForum (Tcl/Metakit based wiki) I've got a server running hundreds 
of wikis, many of them larger and more active than the Tcler's wiki, and 
each far more feature-rich, and the server barely breaks a sweat.  And 
that's not using some of the best techniques that would push Metakit 
performance even faster.  Going the traditional database route, I'd be 
very hard pressed to get anywhere close to that (I bet SQLite could do 
it, because it and Metakit share a lot of characteristics in terms of 
the types of problems they are good for, and the environments they are 
designed to run in).

Arguing what is "best" is foolish, but talking about the tradeoffs in a 
particular situation is wise, especially if you actually understand what 
those tradeoffs are.  Metakit is a niche database, no question, and if 
used in the niche it was built for, you're likely going to do better 
than a more broad-based solution.  

This community, of all groups, should certainly appreciate the immense 
value of niche solutions. ;-)


(who is not advocating Metakit or any other solution for whatever the 
future version of the Tcler's wiki becomes; just about anything would 
work fine if used properly)

Re: Metakit (was Re: Wiki issues)

Postby Alexandre Ferrieux » Sun, 25 Mar 2007 05:17:20 GMT

Hi Mark,

I understand. But surely Jean-Claude is aware of this concurrency
issue. I cannot imagine he hasn't tried some kind of mutual exclusion
between his CGI processes. Moreover, I remember here on clt many years
ago, he "invented" a very elegant pure-Tcl , system-wide, readers-
writer exclusion scheme:

    - single writer lock: [file rmdir $dir]; unlock: [file mkdir $dir]
    - multiple readers lock: [open $dir/$id w]; unlock: [file delete

So, what's going on ? What mutex principle is at work in wikit ? Isn't
it the above ? Is it flawed ?


Similar Threads:

1.Wiki issues

Does anyone see the garbled stuff on the wiki?

2.WIKI performance issue page wiki-reaper help

I have tried to run the wiki-reaper code by calling as indicated
by the author and i cannot make it work.
i do:
set u 1254  (corresponding to the page "centering a window")
wiki-reaper $u
and i get an error "invalid command name "wiki-reaper""
where have i gone wrong ?
thank you in advance

4.Help with wiki tDOM tutorial ( - WAS [ Parsing XML]

5.Help with wiki tDOM tutorial ( - WAS [ Parsing XML]

tomk wrote:
> On Jan 31, 4:55 pm, Richard Owlett < XXXX@XXXXX.COM > wrote:
>> nedbrek wrote:
>>> Hello,
>>> "Richard Owlett" < XXXX@XXXXX.COM > wrote in message
>>> news: XXXX@XXXXX.COM ...
>>>>  2. I evidently don't understand the domNode man page. For the
>>>>     "getAttribute" method it says:
>>>>        getAttribute attributeName ?defaultValue?
>>>>           Returns the value of the attribute attributeName. If
>>>>           attribute is not available defaultValue is returned.
>>>>      It also doesn't give any example(s).
>>>> Can someone point me to some sample code?
>>> If I have a Dom Document $doc
>>> Which has an element somewhere:
>>> <Foo Bar="baz">Stuff</Foo>
>>> set $node [$doc getElementsByTagName "Foo"]
>>> puts [$node getAttribute "Bar"]
>>> will print:
>>> baz
>>> Hope that helps!
>>> Ned
>> I think I'm going in right direction. Thanks.
> Just noticed this thread. Interesting stuff. I to learned on a
> mechanical typewriter back in high school and was lucky to get a C as
> I recall. 

I suspect I got a passing grade more because I was a male taking 
what was perceived as a secretarial course as an elective during 
a *VOLUNTARY* summer session.

> But it has been the most useful course I ever took. I can
> type ok now by still can't spell.

Many stories told of my spuelang (aka spelling ;/
Isn't that what spell-checkers and Google are for ?  ;>

> Regarding Tdom, stick with the study, it will be worth it in the long
> run. If you want to have some real fun, try to understand the XSLT
> stuff. It will allow you to write xslt queries that return the data
> you're interested in. Of course you have to have a valid stylesheet
> for the XML, which isn't (in my experience) usually available.

Intriguing comments.
I'm even more a XML newbie than I am a Tcl newbie.

I can GUARANTEE that there are not style sheets for the XML files 
of interest. *HOWEVER* the pages have a *EXTREMELY* well defined 
structure a very few well defined subunits. The kicker is that 
these subunits may occur in different orders and be of different 
lengths. Trivial for HUMANS to see pattern. Computers ?????

> tomk

6. Help with wiki tDOM tutorial ( - WAS [ Parsing XML]

7. I am getting following error when I am building my C program

8. A trivial problem with Tk, I am sure I am not doing it the right way

Return to tcl


Who is online

Users browsing this forum: No registered users and 2 guest