|
| 1 | +.. _ref-introduction: |
| 2 | + |
| 3 | +============ |
| 4 | +Introduction |
| 5 | +============ |
| 6 | + |
| 7 | +Philosophy |
| 8 | +========== |
| 9 | + |
| 10 | +(Still thinking about that one.) |
| 11 | + |
| 12 | +Background |
| 13 | +========== |
| 14 | + |
| 15 | +The server emulator for `Ragnarok Online`_ that would later become Aliter |
| 16 | +started off as a small proof-of-concept codenamed "Sidewinder." |
| 17 | + |
| 18 | +It was developed by a member of the original Nyxsis private server, as a test |
| 19 | +to see if a comparable emulator to the long-standing go-to emulator, |
| 20 | +`eAthena`_, could be built in Python. This was because Sidewinder's creator as |
| 21 | +well as Nyxsis' creator had been learning Python at the time and had even |
| 22 | +created a Python-based Ragnarok control panel—Minerva. After a few weeks, the |
| 23 | +cornerstones of any Ragnarok emulator, the login server, the character server |
| 24 | +and the map (or zone) server were successfully built and the proof stopped |
| 25 | +there. |
| 26 | + |
| 27 | +Hightened interest in a more modernly coded and agile competitor to eAthena |
| 28 | +led to the current team being given permission to use Sidewinder as a |
| 29 | +foundation for builiding Aliter. After a few weeks of refactoring and |
| 30 | +rebuilding, it was found that building a server emulator in Python wasn't the |
| 31 | +ideal course of action, even though there existed a Python-based MMORPG in |
| 32 | +`EVE Online`_ by `CCP Games`_. This was mostly for architectural reasons, |
| 33 | +which included the `Global Intrepreter Lock`_ and Python's difficulty (at the |
| 34 | +time) when it came to dealing with threading. While the concept worked for a |
| 35 | +single player, at two to three concurrent players the software would quickly |
| 36 | +devour resources. `Stackless Python`_ which was the version the team later |
| 37 | +found was used by CCP, was a non-starter since the process of getting |
| 38 | +Stackless to work in the eyes of an end-user was deemed too complicated. |
| 39 | + |
| 40 | +The Python version was tagged for posterity and subsequently scrapped, leading |
| 41 | +to the emergence of a version built in `Haskell`_. |
| 42 | + |
| 43 | +.. note:: |
| 44 | + |
| 45 | + (The reasons for leaving Haskell can't be remembered by the author at the |
| 46 | + moment, so it'll be filled at a later time.) |
| 47 | + |
| 48 | +The Haskell version was tagged for posterity and also subsequently scrapped, |
| 49 | +leading to the emergence of the current Aliter project, built in Erlang. |
| 50 | + |
| 51 | +`Erlang`_ and its history as a functional programming language built for |
| 52 | +applications in telecommunications by `Ericsson`_ became the perfect fit for a |
| 53 | +server emulator. All the specifics about why the team chose Erlang can be seen |
| 54 | +below in the "Why Erlang?" section. |
| 55 | + |
| 56 | +.. _`Ragnarok Online`: http://en.wikipedia.org/wiki/Ragnarok_Online/ |
| 57 | +.. _`eAthena`: http://eathena.ws/ |
| 58 | +.. _`EVE Online`: http://www.eveonline.com/ |
| 59 | +.. _`CCP Games`: http://www.ccpgames.com/ |
| 60 | +.. _`Global Intrepreter Lock`: http://en.wikipedia.org/wiki/Global_Interpreter_Lock |
| 61 | +.. _`Stackless Python`: http://www.stackless.com/ |
| 62 | +.. _`Haskell`: http://en.wikipedia.org/wiki/Haskell_(programming_language) |
| 63 | +.. _`Erlang`: http://en.wikipedia.org/wiki/Erlang_(programming_language) |
| 64 | +.. _`Ericsson`: http://en.wikipedia.org/wiki/Ericsson |
| 65 | + |
| 66 | +Why Erlang? |
| 67 | +=========== |
| 68 | + |
| 69 | +If you're one to gloss over large words and definitions, prepare yourself. |
| 70 | +Wikipedia says this about Erlang: |
| 71 | + |
| 72 | + Erlang is a general-purpose concurrent, garbage-collected programming |
| 73 | + language and runtime system. The sequential subset of Erlang is a |
| 74 | + functional language, with strict evaluation, single assignment, and |
| 75 | + dynamic typing. For concurrency it follows the Actor model. It was |
| 76 | + designed by Ericsson to support distributed, fault-tolerant, soft-real- |
| 77 | + time, non-stop applications. It supports hot swapping, thus code can be |
| 78 | + changed without stopping a system. |
| 79 | + |
| 80 | + While threads are considered a complicated and error-prone topic in most |
| 81 | + languages, Erlang provides language-level features for creating and |
| 82 | + managing processes with the aim of simplifying concurrent programming. |
| 83 | + Though all concurrency is explicit in Erlang, processes communicate using |
| 84 | + message passing instead of shared variables, which removes the need for |
| 85 | + locks. |
| 86 | + |
| 87 | +If we haven't lost you yet, allow us to explain it: |
| 88 | + |
| 89 | +- Erlang was originally designed and developed by Ericsson, the Swedish |
| 90 | + **telecommunications** company. (You probably know them for their mobile |
| 91 | + phones.) It was built first and foremost as a language built for that |
| 92 | + industry. |
| 93 | +- It was used to create software for Ericsson's AXD301 router that |
| 94 | + were reported to achieve **reliablilty** of "nine 9s" (or 99.999999999%), |
| 95 | + which equates to mere seconds of downtime per year. It's a language that's |
| 96 | + spilt its blood for enterprise applications. |
| 97 | +- It's **concurrent** and **fault-tolerant** from the ground up. |
| 98 | +- **Hot-swapping.** Erlang can reload code on the fly. Need to make a change |
| 99 | + to a server for customizations? Make your changes and reload your code, none |
| 100 | + of your users will feel a thing. |
| 101 | +- (To be continued..) |
0 commit comments