Piotr Gabryjeluk blog

Changes? Not Really

1267378588|%e %B %Y

As announced on Wikidot blog, CEO of Wikidot.com is changing. The position of CEO of Wikidot has been hold by Pieter Hintjens, now changed by Michał Frąckowiak, the founder of Wikidot service.

Pieter was the Wikidot front-man for its community and organized good workflow for many community and internal projects. We learned how to talk to the community, how to solve problems and how to concentrate on important things. And we're going to keep being good at it.

With the addition of data forms Wikidot becomes one of the most interesting wiki platfarms (platform + farm) on the Earth. Using ListPages, _templates and forms we allow (almost) regular folks to create applications like CMS for their co-workers, clients or friends. Things usually done by programmers are now available for smart guys without need to find proper hosting, web framework or writing a line of computer code.

What I find most interesting in building applications on Wikidot is that the platform itself is quite bullet-proof. I mean when you forget to put semicolon at the end of some line, you don't get your application crashing because of syntax error. Moreover when making application you get storage with history and e-mail notifications about changes for free, which makes your data quite safe. In case someone destroys your site (which you are informed by e-mail), you can just revert the right version).

But Wikidot applications is not the most important thing Wikidot is used for. Many sites on Wikidot are just plain wiki sites with links to store and share knowledge of certain groups. They don't use advanced features like modules, includes, templates. They usually edit and save :-) from time to time uploading some file or image. What we want to do is to review all common operations people do most often and (really really) simplify them. Sophisticated applications are worth nothing if basic usage of service is not easy.

We want to introduce features people will appreciate, like [[html]] blocks for embedding completely custom HTML, like this:

[[html]]
<h1>Custom HTML</h1>
<p>Something else</p>
<img src="anything.png" alt="hello ;-)"/>
[[/html]]

This code will just inject the HTML (including JavaScript) into the page in that place. Seems easy to do, but in fact, to make it safe for your site, we needed to implement this as a frame, that autoresizes to keep the content fit inside.

We also want to introduce [[block]] syntax for sandboxing wiki texts, for example:

[[block]]
What put inside is parsed and rendered independently, so even if you put some random [[/div]]s or other nasty things, the page outside will be rendered nicely.
[[/block]]

This will be useful for site designers to use in template pages, like this:

[[table]]
[[row]]
[[cell]]

[[block]]
%%content%%
[[/block]]

[[/cell]]
[[cell]]
some other things.
[[/cell]]
[[/row]]
[[/table]]

Putting %%content%% in block tags you make sure user won't break the original layout (the table). Without block, user could put [[/cell]] inside of his text and thus break the layout.

To let our users know what happens on their sites, we want to make live feeds of activity available for most common start-places on the web — iGoogle, NetVibes, Facebook and Twitter. Most important news from YOUR sites will be next to other things you start your day from.

We have a bunch of other fresh ideas, which we'll be sharing on blog.wikidot.com.

Comments: 0, Rating: 1

Nowa Strona -- Nowy Temat

1260472158|%e %B %Y

Stworzyłem dziś nowy temat do Wikidota będący modyfikacją Łukaszowego Orange-Black:

240.jpg

Oto wynik:

240.jpg

Poza tym co widać, zmiany dotyczą użytego fonta, wyglądu komentarzy i forum, uproszczenia okienka nowego komentarza, ustalenia pozycji tła (żeby przewijanie przewijało samą treść, a nie tło) i dodanie lekkiego prześwitywania tła, żeby było bardziej sexy.

Temat jest hostowany pod adresem: http://themes.wikidot.com/orange-black-improved.

A wszystko po to, żeby nadać naszej nowej stronce: http://parapetowa.wikidot.com/ ładnego wyglądu. A na stronce oprócz informacji co można nam kupić z okazji zbliżającej się parapetówy (jeszcze dokładnie nie wiadomo kiedy) uruchomiliśmy też bloga, gdzie pisać będziemy (a przynajmniej ja) o trudzie przystosowania mieszkania do wymagających lokatorów (czyli nas). Link do bloga:

http://parapetowa.wikidot.com/blog

Serdecznie zapraszamy!

Comments: 0, Rating: 0

Cleaning Up

1253205773|%e %B %Y

Some of you, following Wikidot code on GitHub may see it's nicely split into templates, php, web and conf directories. But this is the first impression.

Maintaining Wikidot is a bit more complex, because, files uploaded to sites are located in web, side to side with some static Wikidot php and javascript files. Also for historical reasons, there are web/files--common and web/files--local directories, which maps to /common--* and /local--* URLs and in fact, the files--local is never served directly by the web server (need to check permissions first).

Also some time ago, we made static files versioned, so that we can apply more aggressive HTTP caching to them (reducing average page load time) and still be able to fix bugs on them without waiting a few days till the cache expire. In current model, URL to static file contains version hash, this may be for example: http://static.wikidot.com/v--b44e0ce810ee/common--javascript/WIKIDOT.js (notice the b44e0ce810ee). The whole static.wikidot.com is now hosted on Amazon's CloudFront, which means you get static Wikidot files from a server nearby your location and not always from USA.

This all become quite complicated, so we decided to make things really clear and simple in the source code. The primary rule: make the source code (updatable from git) separate from files uploaded by users and generated by Wikidot. Second rule: make files that are automatically generated during installation (not in the runtime) separate from persistent files (like the uploaded by users) and from source code.

And at the end there needs to be some place for logs and a place for temporary data (we need this to generate some random cool stuff, but after generating them, files are deleted).

So we end up with something like this:

  • WIKIDOT_ROOT
    • data/
      • avatars/ — user avatars
      • sites/ — site files (both generated thumbnails and uploaded files)
    • generated/
      • static/ — generated static files. This dir can be server directly by a fast non-PHP webserver for static.wikidot.com in case we don't want CloudFront anymore
    • tmp/ — temporary files including Smarty compiled versions of templates. Content of this dir can be safely removed
    • logs/ — Wikidot logs
    • everything else — comes from git and is unchangeable by application

Application needs write-access to data, tmp and logs. Generated dir needs write access to one installing or upgrading application.

Wikidot persistent data is now ONLY database and data/ directory, so it's easy to backup and restore the application (if you have enough time to make full backup of this).

There is still one exception to this nice schema which is php/db/base directory, which is autogenerated during installation from XML database definition files, but the cleaning is not over, I still work on this.

Nice thing about this work is that it does not need a lot of code changing, because directory paths are usually stored in one (max two) places in application, so this kind of totally reorganizing directory structure does not break things. As such, it is very very worth doing it. In the end we get clean internal structure of files and it's clear which files you can safely remove, which you can restore from git (and thus you can experiment a little on them — in case of crash, just re-download application), which are "state" of the Wikidot and where to look for logs.

This all is also very important, because we aim to make current Wikidot.com source open and as such we want it to be a nice code.

Comments: 0, Rating: 0

Wikidot Crashes

1251378203|%e %B %Y

Last night we made Wikidot online again after a great crash.

Wikidot was down for about 12 hours and the time it was down was full of work for us. We got a few things that could be broken starting from recent changes of the Wikidot software, hardware failure, high load-related kernel bugs or limitations to connection number or maximum possible number or file descriptors.

The problem is Wikidot kind of worked, so some people had their sites loading, some other not and getting "500" errors. We didn't want to stop it, but at some point Wikidot was completely unusable. We switched the database to the other machine, but this was not the solution, then we switched all Wikidot traffic to the machine, still no good, we switched the software to some previous version, but this still seemed bad.

Finally we worked out, there was a site, that had so big traffic, that it killed anything else (and itself as well). When we temporarily disabled it, the whole Wikidot started to work nicely again. Then Michał made some improvements for the high traffic site serving and the situation is stable again.

In the middle of everything, we had huge problems with our hosting company and their service called Portable IP addresses. It seems that switching DNS is much more reliable that using Portable IPs that took hours to switch (and were supposed to take seconds to switch)! DNS switching time was 15 minutes.

We learned a lot from the situation. Hardware upgrade postponed from really long time needs to be done quite quickly. We need more servers, to see which element breaks. For example if database server has high load, we know we need to tune database settings. If we have all on one massive server and one brick on it crashes, it usually causes all the server overloaded and this causes other bricks to crash as well, so it's hard too tell what the real problem is.

Another thing is that we see our users want information on what happens. It's bad when Wikidot crashes, but it's even worse, when it crashes and they have no information about this.

So, the next time a similar disaster happens we'll update on each technical detail possible, to let you know, that we know it's broken and we work hard to fix it. Other thing is, we plan having more fail-over servers in case something dies.

Thank you all for using Wikidot, it's a great pleasure working (and fixing things) for you!

Comments: 3, Rating: 1

page 1 of 15123...1415next »

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License