You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2019-08-05_on-the-way-to-durable-applications.md 6.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. Title: On the way to durable applications
  2. Date: 2019-08-05 00:00
  3. Category: News
  4. Slug: on-the-way-to-durable-applications
  5. Lang: en
  6. ![Pskov's veche][screenshot]
  7. This article describes our first durable application for desktop PCs: PSKOV static site generator.
  8. **Durability**
  9. A durable application is an application that functions without a single change on operating systems released in years 2010-2030. In other words, a durable application has backward compatibility of 10 years and has the stability to run for 10 years. Actually, [PSKOV][pskov] runs even under Windows 2000, so PSKOV has backward compatibility of 19 years.
  10. From technical side, PSKOV is a single HTML file with layout (HTML), styles (CSS), and code (JavaScript) packed inside. PSKOV runs strictly inside a web browser without connecting to any server.
  11. Such an implementation gives PSKOV the following features:
  12. * it can be copied without restrictions
  13. * it can be hosted anywhere
  14. * it can run locally
  15. * it can operate without Internet
  16. We can't guarantee stability for 10 years because we can't control the future. However, the history of HTML, CSS, and JavaScript evolution tells us these technologies are developed with maximum backward compatibility. First, new JavaScript features leave older ones still working. Second, web browser developers are interested in making their web browsers work with as many web sites as possible. For example, [<center> tag][center-tag], being declared deprecated in 2014, still works as expected 5 years since, in 2019.
  17. At the same time, each web browser application has a serious restriction called sandbox, a deceptive name for a cage. The cage prevents access to both local file system of users and almost any Internet resource without its owner's explicit permission (CORS). As a result, the application can only communicate with users either through the distinct server, or by offering files to download manually. Downloading files one by one or as an archive is inconvenient, that's why nowadays server oriented approach reigns the world. We'll touch problems of that approach in a moment.
  18. To free PSKOV from the cage, [LFSA][lfsa] was created, a tiny Python script that needs to be run manually while PSKOV is running. LFSA allows PSKOV to access the user’s local file system. Python was selected because Linux and macOS have Python installed by default, and users can easily install Python on Windows (even Windows 2000).
  19. **Track record**
  20. PSKOV has been successfully used to create the following small sites:
  21. * [open game studio project site][ogs]
  22. * [PSKOV itself][pskov]
  23. * [LFSA][lfsa]
  24. * [example of a simple blog][pskov-sample]
  25. Now let's see why PSKOV was created as a durable application for web browsers.
  26. **Reason №1: collect and keep knowledge in an accessible form**
  27. We have been creating convenient game development tools for several years now. So far the collected knowledge was represented by [native applications][ogs-mahjong-1] for desktop PCs, [education articles][osgcpg] for related technologies, and [showcase videos][showcase]. Such forms of the collected knowledge are basically dead:
  28. * few would download an unknown application
  29. * few would watch some videos
  30. * even fewer would read some articles
  31. In many ways, this death is due to inaccessibility: one has to make an unknown amount of effort to achieve an unknown result. Hardly anyone would have interest in this. A web browser application, potentially accessible anywhere, is a totally different deal: you only need to make a known effort, click a link, to achieve an unknown result. The history of conducting [twitter revolutions][twitter-revolutions] proves that almost anyone can open a link and "like" the change of a "bloody regime".
  32. **Reason №2: rule by people**
  33. Nowadays any Internet activity is performed by the means of services that almost always belong to some company: [messages][msg], [maps][map], [search][search], [music][music], [source code][src], etc. Such power usurpation leads to [shutdowns][shutdown-01] of [services][shutdown-02] that their owning companies deem unprofitable. They usually do it without any consent with those users who brought life to these services in the first place.
  34. Other times companies simply block competing browsers from accessing their service, as it was recently the [case with the web version of Skype][skype-block]. Luckily there are people who don’t agree with such politics. Thanks to them, [unlocking tools][skype-free] appear.
  35. As for us, we deem such a way of handling things as inappropriate. However, savage business is not the only one to blame here; average users, every one of us is guilty, too. You may argue that users have no choice, that someone else (government, aliens, underline what you like) made this world unfair. Some people even blame government/aliens directly and believe that without them, life would be amazing. However, human history [tells us a different story][story]: "**the state** is not some enemy horde that occupied the society, but that which **grows out of society and mirrors it**".
  36. Being part of the people, we decided to start with ourselves and use our power for the best: create applications that we need in such a way to make them usable and accessible to everyone everywhere. PSKOV is the first attempt, which already exceeded our expectations. Sure, PSKOV has limitations like LFSA and unencrypted HTTP; there's a lot to do to increase the accessibility of PSKOV, however, we're ready to dare anyone: current PSKOV version will keep functioning for 10 years to come without any maintenance.
  37. That's it for describing our first durable application for desktop PCs: PSKOV static site generator.
  38. [screenshot]: ../../images/2019-08-05_on-the-way-to-durable-applications.jpg
  39. [pskov]: http://opengamestudio.org/pskov
  40. [center-tag]: https://www.w3schools.com/tags/tag_center.asp
  41. [lfsa]: http://opengamestudio.org/lfsa
  42. [ogs]: http://opengamestudio.org
  43. [pskov-sample]: http://opengamestudio.org/pskov/sample/03.Blog/en/blog/index.html
  44. [ogs-mahjong-1]: ../game/ogs-mahjong-1.html
  45. [osgcpg]: https://github.com/OGStudio/openscenegraph-cross-platform-guide
  46. [showcase]: https://youtu.be/_t8TGhSgJG4
  47. [twitter-revolutions]: https://en.wikipedia.org/wiki/Twitter_Revolution
  48. [msg]: http://twitter.com
  49. [map]: http://2gis.ru
  50. [search]: http://google.com
  51. [music]: http://music.yandex.ru
  52. [src]: http://github.com
  53. [shutdown-01]: https://techcrunch.com/2015/03/13/google-kills-off-google-code/
  54. [shutdown-02]: https://www.reddit.com/r/sysadmin/comments/62orq9/codeplex_shutting_down_and_fosshub_is_sad/
  55. [skype-block]: https://www.reddit.com/r/firefox/comments/aw1umv/skype_web_is_now_blocked_in_firefox/
  56. [skype-free]: https://addons.mozilla.org/ru/firefox/addon/firefox-web-skype/
  57. [story]: https://translate.google.com/translate?sl=ru&tl=en&u=https%3A%2F%2Fria.ru%2F20190723%2F1556775012.html