| 1 |
---- |
|---|
| 2 |
presentation_topic: Kwiki |
|---|
| 3 |
presentation_title: Kwiki and the Symlink |
|---|
| 4 |
presentation_place: YAPC::Tokyo |
|---|
| 5 |
presentation_date: April 4, 2007 |
|---|
| 6 |
author_name: Ingy döt Net |
|---|
| 7 |
author_email: ingy@cpan.org |
|---|
| 8 |
---- |
|---|
| 9 |
Welcome To YAPC |
|---|
| 10 |
Let Insanity BEGIN |
|---|
| 11 |
PERL In The House Yo |
|---|
| 12 |
---- |
|---|
| 13 |
WELCOME TO YAPC |
|---|
| 14 |
LET INSANITY BEGIN |
|---|
| 15 |
PERL IN THE HOUSE YO |
|---|
| 16 |
---- |
|---|
| 17 |
Ingy 2.0 |
|---|
| 18 |
Kwiki 2.0 as Well |
|---|
| 19 |
orz hackers |
|---|
| 20 |
---- |
|---|
| 21 |
Kwiki to Japan |
|---|
| 22 |
Ingy Shows 2.0 Stuff |
|---|
| 23 |
A Topic for Spring |
|---|
| 24 |
---- |
|---|
| 25 |
Haiku is OK |
|---|
| 26 |
But Ingy Likes Limericks |
|---|
| 27 |
Please Let Me Explain |
|---|
| 28 |
---- |
|---|
| 29 |
The Poetry Known as Haiku |
|---|
| 30 |
Leaves a hacker with too much to do. |
|---|
| 31 |
The minding of syllables... |
|---|
| 32 |
I'd rather watch kill-a-bills. |
|---|
| 33 |
Kill Bill has far better Kung Fu. |
|---|
| 34 |
---- |
|---|
| 35 |
Ingy dot Net was a man, |
|---|
| 36 |
Who hacked on weird plan after plan. |
|---|
| 37 |
As hard as he tried, |
|---|
| 38 |
His ideas always died. |
|---|
| 39 |
But at least he is big in Japan. |
|---|
| 40 |
---- |
|---|
| 41 |
There once was a hacker named Ingy |
|---|
| 42 |
That darned YAPC wiki was his thingy. |
|---|
| 43 |
He went to Japan, |
|---|
| 44 |
And he got a great tan... |
|---|
| 45 |
When they sent him back home in a dingy. |
|---|
| 46 |
---- |
|---|
| 47 |
This Ingy it often was said, |
|---|
| 48 |
Would hack all day in his bed. |
|---|
| 49 |
But the harder he hacked, |
|---|
| 50 |
The weirder and whacked |
|---|
| 51 |
Were his h@><. zomg orz. |
|---|
| 52 |
---- |
|---|
| 53 |
... |
|---|
| 54 |
---- |
|---|
| 55 |
* Sometimes old stuff is the best stuff |
|---|
| 56 |
* Maybe it's not shiny anymore |
|---|
| 57 |
* But a little polishing goes a long way |
|---|
| 58 |
* And then you just call it 2.0! |
|---|
| 59 |
|
|---|
| 60 |
Last Year I Made Two Big Upgrades... |
|---|
| 61 |
---- |
|---|
| 62 |
== Ingy 2.0 |
|---|
| 63 |
|
|---|
| 64 |
Brian Ingerson |
|---|
| 65 |
Legally Ingy dot Net |
|---|
| 66 |
Old is New Again |
|---|
| 67 |
---- |
|---|
| 68 |
* In September I changed my name legally to "Ingy dot Net" |
|---|
| 69 |
* Ingy is my first name |
|---|
| 70 |
* "dot Net" is my last name |
|---|
| 71 |
* "dot" is *not* my middle name |
|---|
| 72 |
---- |
|---|
| 73 |
{image: legal.jpg} |
|---|
| 74 |
---- |
|---|
| 75 |
* But "Ingy dot Net" is not my "real" name |
|---|
| 76 |
* My real name is *Ingy döt Net* |
|---|
| 77 |
* But the US Government is ASCII only |
|---|
| 78 |
* Well more like EBCDIC only |
|---|
| 79 |
---- |
|---|
| 80 |
== Degrade Gracefully |
|---|
| 81 |
* Ingy 2.0 degrades gracefully |
|---|
| 82 |
* In a fully compliant environment it is Ingy döt Net |
|---|
| 83 |
* In reality it takes many forms |
|---|
| 84 |
---- |
|---|
| 85 |
INGY DOT NET |
|---|
| 86 |
---- |
|---|
| 87 |
{image: passport.jpg} |
|---|
| 88 |
---- |
|---|
| 89 |
DOTNET, INGY |
|---|
| 90 |
---- |
|---|
| 91 |
IngyDotNet |
|---|
| 92 |
---- |
|---|
| 93 |
== Non Graceful Degradation |
|---|
| 94 |
* Sometimes things just go wrong |
|---|
| 95 |
* |
|---|
| 96 |
---- |
|---|
| 97 |
Ingy d?t Net |
|---|
| 98 |
---- |
|---|
| 99 |
Ingy dt Net |
|---|
| 100 |
---- |
|---|
| 101 |
Ingy D Net |
|---|
| 102 |
---- |
|---|
| 103 |
Ingy.Net |
|---|
| 104 |
---- |
|---|
| 105 |
Ingy Net |
|---|
| 106 |
---- |
|---|
| 107 |
+orz!! |
|---|
| 108 |
---- |
|---|
| 109 |
Thank you Mr. Net |
|---|
| 110 |
---- |
|---|
| 111 |
== Kwiki 2.0 |
|---|
| 112 |
|
|---|
| 113 |
There once was a project called Kwiki, |
|---|
| 114 |
Whose maintenance proved to be tricky. |
|---|
| 115 |
To make the thing go, |
|---|
| 116 |
They tacked on "2.0". |
|---|
| 117 |
And now it's one heck of a wiki. |
|---|
| 118 |
---- |
|---|
| 119 |
== Kwiki 1.0 |
|---|
| 120 |
|
|---|
| 121 |
Kwiki is to Wiki |
|---|
| 122 |
as Perl is to Programming |
|---|
| 123 |
|
|---|
| 124 |
* Kwiki is not so much about being a wiki |
|---|
| 125 |
* Kwiki is all about being a Lego set |
|---|
| 126 |
* Kwiki is about being easy and fun to play with |
|---|
| 127 |
* Kwiki is about a community |
|---|
| 128 |
---- |
|---|
| 129 |
== Kwiki 1.0 |
|---|
| 130 |
|
|---|
| 131 |
* Kwiki was a successful CPAN Project |
|---|
| 132 |
* > 150 CPAN Dists - `Kwiki-*` |
|---|
| 133 |
|
|---|
| 134 |
---- |
|---|
| 135 |
== Kwiki 1.0 |
|---|
| 136 |
|
|---|
| 137 |
* Kwiki-0.38 was released April 2005 |
|---|
| 138 |
* But Kwiki was too stable |
|---|
| 139 |
* Stable == Dead |
|---|
| 140 |
|
|---|
| 141 |
---- |
|---|
| 142 |
== Kwiki 1.0 |
|---|
| 143 |
|
|---|
| 144 |
* But being dead is not always bad |
|---|
| 145 |
* Because you can then be reborn |
|---|
| 146 |
* Enter Kwiki 2.0 |
|---|
| 147 |
|
|---|
| 148 |
---- |
|---|
| 149 |
== K2 |
|---|
| 150 |
|
|---|
| 151 |
{image: k2.jpg} |
|---|
| 152 |
|
|---|
| 153 |
---- |
|---|
| 154 |
== Kwiki 2.0 |
|---|
| 155 |
|
|---|
| 156 |
* In December 2006 I decided to make Kwiki come back to life |
|---|
| 157 |
* I started a new brand new kwiki.org wiki |
|---|
| 158 |
* I set up a Trac for project planning |
|---|
| 159 |
* I started a new svn repo |
|---|
| 160 |
* I gave all the #kwiki people commit bits |
|---|
| 161 |
|
|---|
| 162 |
---- |
|---|
| 163 |
== No CPAN |
|---|
| 164 |
|
|---|
| 165 |
* I decided to move away from CPAN for a while |
|---|
| 166 |
* The Kwiki on CPAN is at a stable state |
|---|
| 167 |
* Why muck with it? |
|---|
| 168 |
* Hacking on SVN is agile |
|---|
| 169 |
|
|---|
| 170 |
---- |
|---|
| 171 |
== Kwiki Problems |
|---|
| 172 |
|
|---|
| 173 |
* Too Many Modules to Install |
|---|
| 174 |
* Kwiki is Slowie |
|---|
| 175 |
* No Documentation |
|---|
| 176 |
* Too many plugins to choose from |
|---|
| 177 |
* Some bad abstractions |
|---|
| 178 |
|
|---|
| 179 |
---- |
|---|
| 180 |
== Kwiki 2.0 Focus |
|---|
| 181 |
|
|---|
| 182 |
* Too Many Modules to Install |
|---|
| 183 |
** Make Kwiki Easy To Install |
|---|
| 184 |
* Kwiki is Slowie |
|---|
| 185 |
** Make Kwiki Faster |
|---|
| 186 |
* No Documentation |
|---|
| 187 |
** Document Kwiki |
|---|
| 188 |
* Too many plugins to choose from |
|---|
| 189 |
** Kwiki Flavors |
|---|
| 190 |
* Some bad abstractions |
|---|
| 191 |
** Kwiki::Boot - TMTOWTDI |
|---|
| 192 |
|
|---|
| 193 |
---- |
|---|
| 194 |
== Kwiki Installation |
|---|
| 195 |
|
|---|
| 196 |
* Kwiki 2.0 currently comes with over 500 perl modules. |
|---|
| 197 |
* It takes < 1 minute to install! |
|---|
| 198 |
|
|---|
| 199 |
---- |
|---|
| 200 |
== Kwiki Software Installation Instructions |
|---|
| 201 |
|
|---|
| 202 |
> svn checkout http://svn.kwiki.org/kwiki/trunk ~/src/kwiki |
|---|
| 203 |
> export PATH=~/src/kwiki/bin:$PATH |
|---|
| 204 |
|
|---|
| 205 |
* That's it. |
|---|
| 206 |
* You get *Spork* for free! |
|---|
| 207 |
---- |
|---|
| 208 |
== Kwiki Wiki Creation Instructions |
|---|
| 209 |
|
|---|
| 210 |
> kwiki -new ~/Sites/my-wiki |
|---|
| 211 |
|
|---|
| 212 |
> vim ~/Sites/my-wiki/plugins |
|---|
| 213 |
> kwiki -update ~/Sites/my-wiki |
|---|
| 214 |
|
|---|
| 215 |
> kwiki -start ~/Sites/my-wiki |
|---|
| 216 |
|
|---|
| 217 |
---- |
|---|
| 218 |
== Kwiki Software Upgrade Instructions |
|---|
| 219 |
|
|---|
| 220 |
> svn up |
|---|
| 221 |
|
|---|
| 222 |
---- |
|---|
| 223 |
== The Great Kwiki Source Code Reorg |
|---|
| 224 |
|
|---|
| 225 |
* I gathered all the Kwiki source code: |
|---|
| 226 |
** All Old SVN Kwiki modules - in separate author directories |
|---|
| 227 |
** All CPAN Kwiki modules |
|---|
| 228 |
** Some Kwiki hacks lying around on various machines |
|---|
| 229 |
* I grabbed all the CPAN modules that Kwiki uses |
|---|
| 230 |
* I stole some modules from Socialtext |
|---|
| 231 |
|
|---|
| 232 |
---- |
|---|
| 233 |
== Enter the Symlink |
|---|
| 234 |
|
|---|
| 235 |
* All 500 modules are "preinstalled". |
|---|
| 236 |
* I made a `lib` tree with symlinks to all the modules in place |
|---|
| 237 |
* Kwiki knows where to find this huge module tree |
|---|
| 238 |
* Installing Kwiki has zero dependencies |
|---|
| 239 |
* Installing Kwiki has zero impact on your system |
|---|
| 240 |
* It is pretty much guaranteed to work |
|---|
| 241 |
|
|---|
| 242 |
---- |
|---|
| 243 |
== Win32 and Perl |
|---|
| 244 |
|
|---|
| 245 |
* Symlinks don't work on MSWin32 (Windows) |
|---|
| 246 |
* Neither does Kwiki |
|---|
| 247 |
* Kwiki is a server app |
|---|
| 248 |
* Unix is for servers |
|---|
| 249 |
* Also Kwiki requires Perl 5.8.3 |
|---|
| 250 |
+* Why make life so hard? |
|---|
| 251 |
* No CPAN, No old Perl, No Windows == EASY! |
|---|
| 252 |
|
|---|
| 253 |
---- |
|---|
| 254 |
== Kwiki is Kwiker |
|---|
| 255 |
|
|---|
| 256 |
* Ingy wrote Kwiki::Cache::Formatter |
|---|
| 257 |
* Miyagawa wrote Kwiki::FastCGI |
|---|
| 258 |
|
|---|
| 259 |
---- |
|---|
| 260 |
== Kwiki::FastCGI |
|---|
| 261 |
|
|---|
| 262 |
* FastCGI Rocks! |
|---|
| 263 |
|
|---|
| 264 |
---- |
|---|
| 265 |
index.cgi |
|---|
| 266 |
|
|---|
| 267 |
use Kwiki::Boot; |
|---|
| 268 |
Kwiki::Boot->debug->boot->kwiki->process; |
|---|
| 269 |
|
|---|
| 270 |
+index.fcgi |
|---|
| 271 |
|
|---|
| 272 |
use Kwiki::Boot; |
|---|
| 273 |
use CGI::Fast; |
|---|
| 274 |
while ( my $cgi = CGI::Fast->new ) { |
|---|
| 275 |
Kwiki::Boot->debug->boot->kwiki->process; |
|---|
| 276 |
} |
|---|
| 277 |
|
|---|
| 278 |
---- |
|---|
| 279 |
== Kwiki Documentation - Doolittle |
|---|
| 280 |
|
|---|
| 281 |
* http://doolittle.kwiki.org |
|---|
| 282 |
* Kwiki::Doolittle::Formatter |
|---|
| 283 |
** Kwiki::Formatter:Pod |
|---|
| 284 |
* Pull all POD out of each module |
|---|
| 285 |
* Symlink into a bi Kwiki database of documentation |
|---|
| 286 |
|
|---|
| 287 |
---- |
|---|
| 288 |
== Kwiki Flavors |
|---|
| 289 |
|
|---|
| 290 |
* There are too many Kwiki plugins |
|---|
| 291 |
* Which ones do you want to start with? |
|---|
| 292 |
* Kwiki Flavors are prebuilt configurations |
|---|
| 293 |
* You can start with a known flavor |
|---|
| 294 |
* And then customize it |
|---|
| 295 |
* You can save your own flavors |
|---|
| 296 |
* Kwiki flavors are inheritable |
|---|
| 297 |
|
|---|
| 298 |
---- |
|---|
| 299 |
== Kwiki Configuration Inheritance |
|---|
| 300 |
|
|---|
| 301 |
* In Kwiki 2.0, Kwiki installations form an inheritance chain. |
|---|
| 302 |
* The following files are inherited: |
|---|
| 303 |
** plugins |
|---|
| 304 |
** config |
|---|
| 305 |
** template |
|---|
| 306 |
** css |
|---|
| 307 |
** javascript |
|---|
| 308 |
** theme |
|---|
| 309 |
* Your kwiki inherits from a flavor, which inherits from a base. |
|---|
| 310 |
* You can make subwikis which inherit from your wiki |
|---|
| 311 |
|
|---|
| 312 |
---- |
|---|
| 313 |
== Kwiki Configuration Inheritance |
|---|
| 314 |
|
|---|
| 315 |
* Inheritance is all done with symlinks. |
|---|
| 316 |
* Every level has `www/__` symlink. |
|---|
| 317 |
* `href="www/__/__/css/formatter.css"` |
|---|
| 318 |
* Kwiki::Paths knows how to find everything |
|---|
| 319 |
|
|---|
| 320 |
---- |
|---|
| 321 |
== Kwiki::Boot |
|---|
| 322 |
|
|---|
| 323 |
* Kwiki has a certain core set of plugins |
|---|
| 324 |
* The Kwiki process depends on those plugins |
|---|
| 325 |
* How do I change those core things? |
|---|
| 326 |
** Without breaking existing Kwiki sites |
|---|
| 327 |
|
|---|
| 328 |
---- |
|---|
| 329 |
== Kwiki::Boot |
|---|
| 330 |
|
|---|
| 331 |
* I put all the startup code in Kwiki::Boot::V1 |
|---|
| 332 |
* Then I can write Kwiki::Boot::V2 to do new stuff |
|---|
| 333 |
** V2 sets up a different set of core plugins |
|---|
| 334 |
* The Flavors stuff is all V2 |
|---|
| 335 |
* You can write your own Kwiki::Boot module |
|---|
| 336 |
|
|---|
| 337 |
---- |
|---|
| 338 |
== Kwiki::Boot |
|---|
| 339 |
|
|---|
| 340 |
* How do you switch to a different Boot module? |
|---|
| 341 |
* KWIKI_BOOT=V2 |
|---|
| 342 |
|
|---|
| 343 |
KWIKI_BOOT=V2 kwiki -new ~/Sites/my-wiki |
|---|
| 344 |
|
|---|
| 345 |
* After `-new`, environment vars are cached in `kwiki.env` |
|---|
| 346 |
|
|---|
| 347 |
---- |
|---|
| 348 |
== Spork |
|---|
| 349 |
|
|---|
| 350 |
* These slides were done using Spork |
|---|
| 351 |
* The Spork project is related to Kwiki |
|---|
| 352 |
* They both inherit from Spoon |
|---|
| 353 |
** A Spork ISA Spoon |
|---|
| 354 |
* Spork is now moved into K2 |
|---|
| 355 |
* So if you install Kwiki 2.0, then: |
|---|
| 356 |
|
|---|
| 357 |
spork -new KwikiAndTheSymlink |
|---|
| 358 |
|
|---|
| 359 |
---- |
|---|
| 360 |
== Future Kwiki Plans |
|---|
| 361 |
|
|---|
| 362 |
* Implement MediaWiki with Kwiki |
|---|
| 363 |
* Completely Customizable Formatter |
|---|
| 364 |
** Make your own markup |
|---|
| 365 |
* Get everything back to CPAN |
|---|
| 366 |
|
|---|
| 367 |
---- |
|---|
| 368 |
The END Draweth Nigh. |
|---|
| 369 |
Kwiki Loves You. Love Her Back. |
|---|
| 370 |
Have You A Question? |
|---|