
What was the technology stack driving the original Ultima Online servers? - jdmoreira
http://www.quora.com/What-was-the-technology-stack-driving-the-original-Ultima-Online-servers?share=1
======
Globz
Wow they didn't use any DB at the start of UO, that is amazing haha

"As Raph also notes, there were no databases originally involved in the
storage of game state or player data for UO (disregarding analytics here),
everything was kept in flat files. Backups worked by flagging a moment in time
where no one was allowed to cross server-boundaries -- during that moment,
each areaserver was commanded to fork(), essentially duplicating itself in
memory (it's more complicated than this, thanks to Copy-on-Write, but let's
simplify). After everyone had fork()ed, the "lock" preventing boundary-
crossing was cleared. Then each areaserv began to dump out its huge chunk of
memory-state into a file on an NFS server. Those files were then all tarred
together and kept as a "backup" of the state of the server. These heavyweight
backups happened at half-hour intervals, I believe."

~~~
codingdave
I'm not so shocked... I'm a web developer, not a game developer, but databases
were avoided as part of production stacks in the 90s. Most people tried to
stick to flat files. A database layer added complexity and decreased
performance. Even most content management systems had an option to write
everything to a flat file to serve via a web server. Those were the days that
Apache servers and a huge pile of flat files was the norm.

Once web content began to be personalized, that was no longer realistic.
Databases became a required part of the stack, web servers ran applications
instead of just serving file, we gained massive amounts of functionality, and
haven't really looked back.

~~~
eli
By most defintions, I think structured "flat files" in a filesystem IS a type
of database.

~~~
TeMPOraL
It is, but it adds the requirement for installing and configuring another
application running in the background. Before SQLite, flat files really seemed
like the best option for small projects.

~~~
eli
I don't understand what background application you're referring to. If I have
an app that reads and writes to a bunch of CSV files how is that any different
from using libsqlite3 to read and write to an sqlite file?

~~~
TeMPOraL
I meant RDBMSes that are _not_ SQLite. For MySQL or Postgres or whatever you
usually need to do a system-wide package install and have a daemon running in
the background. Portability of (compiled version of) your program disappears.
That's why desktop apps - games in particular - tend not to use any database
other than SQLite or flat file structure.

------
pixelmonkey
I brought this up on Twitter, but I think the term "shard" referring to a
partitioned database originated from Ultima Online.

The game's fiction included reference to shards of a wizard's crystal that
created duplicate worlds -- a convenient explanation within that universe for
the need to run multiple, duplicate servers with different users on them.

[https://twitter.com/amontalenti/status/615116231092371456](https://twitter.com/amontalenti/status/615116231092371456)

~~~
jghn
I've always thought the same thing,

~~~
jrub
Same.

When I first heard the term "shard," I thought we were talking about UO. I
still think about it every time time I hear "shard."

I don't ever run into anyone who has played UO either, and so everyone looks
at my like I have 3 eyes when I explain the connection. haha.

~~~
jghn
The only folks I personally know who played UO were my actual friends :) I
have coworkers who were also old enough to remember it but they all started
withy EQ or WoW.

In my mind no game will surpass closed beta era UO. It had the sandbox and
freedom combined with q culture that was actually into the idea instead of the
grieving

------
careersuicide
This is really awesome! I had always just assumed the servers ran on Windows
NT or similar. I'm not really sure why I thought that. Maybe because
SphereServer and RunUO are/were for Windows so the association stuck in my
head? But I never would have guessed Solaris.

It's really hard to have a discussion about UO without the urge to talk about
how important it was to me (I've noticed I'm not the only one).

So rather than resist that urge... Ultima Online is directly responsible for
me being a programmer. I was 13 when I got a copy of the game and an account
thanks to my parents. It wasn't the first game I'd played where I'd wondered
how it had been made but it was the first game I'd played where I couldn't
even conceive of how it could possibly work. It was so different from anything
else that I'd played before, including the first 8 Ultima games. Trying to
figure that out led me towards programming in general and to SphereServer, the
UO server emulator. The scripting system for SphereServer allowed me to change
the game (for me and my friends only, but still) and really explore what's
possible. By the time I was 16 I knew what I was doing for the rest of my
life, even if it wasn't necessarily anything related to games.

~~~
penetrarthur
No gaming experience has ever been as involving as the good old UO. And I also
started my programming by coding automation scripts for one of at that time
popular and mostly prohibited playing assist programs called "UO Inject". No
other motivation keeps you as engaged in programming as writing scripts that
automatically cut the trees for you while you sleep!

~~~
careersuicide
One of the very first actually useful programs I wrote was a simple macro
program for UO. It would read a text file, parse the very basic commands in
the file and then send them to the UO client by finding its HWND via
FindWindow and calling SendMessage to send the key presses. I used this to
macro easy skills like hiding with scripts like (I don't remember the exact
command names now):

STARTLOOP

KEYPRESS F1 // client macro key for hiding skill

WAIT 1000

MOVERANDOM 4 // move 4 times in a random direction to get around server checks
for using a skill in the same spot

WAIT 8000

ENDLOOP

~~~
NamTaf
You wanted to move 8, not 4. Skill gains were made through an 8x8 grid. All
the latter skill macros through RunUO were set up for being done on a boat
sailing up and down to the east of Moonglow (where you could wrap around the
map). They spammed the skill until you got a skill gain, then halted the boat,
stepped it forward 8, and tried agian. Rinse and repeat until the 'run'
stopped, then resume just moving forward trying until you hit the next run.

This gives a good summary:
[http://www.uoguide.com/8x8](http://www.uoguide.com/8x8)

------
notlisted
Just yesterday I was reminiscing the stability of Sun Sparc servers. I
recalled the time we moved offices in 1999, and we had to shut down them down.
One last peek at the uptime showed they'd been up and running for 6 years or
so (turned on when we moved in, turned off when we moved out).

~~~
pmelendez
DTrace is another advantage of using Solaris

~~~
scott_karana
GP was referring to Sun's solid _SPARC hardware_ , never mind that DTrace
didn't exist then.

------
outworlder
> Each shard (the term sharding probably originated with UO)

Probably, as the term "shard" was part of the backstory: a gem that contained
the world ("Sosaria") was shattered, each shard then contained a version of
Sosaria.

[https://www.youtube.com/watch?v=rBeA6JHkV1I](https://www.youtube.com/watch?v=rBeA6JHkV1I)

------
zumtar
Just out of interest, I installed a couple of the European Ultima Online
servers, they were Sun E450s running Solaris 2.5.1.

They had a massive 10 Mb/s dedicated to them (with the ability to burst to 50
Mb/s) - bandwidth shaping was done with a Packeteer.

------
gavanwoolery
I met with Raph IRL once - he is a really smart guy. He is now working on a
somewhat of a spiritual successor to UO called Crowfall.
[http://crowfall.com](http://crowfall.com)

~~~
Globz
Yeah I am kickstarter funder, I can't wait to finally play this game.
Hopefully it will last more than 3 months, I can hardly remember the last MMO
I played for more than a year.

------
neals
How does ones career even look after working on something like that?

~~~
newobj
This is a really strange comment to make.

First of all, this was 1997 +/\- a year. They amount of stuff you could pull
off the internet was radically smaller than today. The number of solved
problems was radically smaller. So basically they went were few had gone
before and created something successful that persists to this day. So heir
career would be looking pretty damn good I would say.

Second, tech stack != career. I'm seeing this sentiment more and more on HN
and it's weird. Especially weird in an industry know for its rapid change.

Your question is so backwards it almost feels like trolling.

~~~
Kiro
I interpreted the comment as "these guys must have kick ass careers" and not
the other way round.

~~~
neals
This was indeed what I meant :)

------
glonq
I lucked out and was accepted as a public alpha (and later beta) tester for
Ultima Online.

I remember it being very laggy and a bit glitchy, despite having a high-end PC
(50mhz 80486, 28.8k modem). But I was still mesmerized with the concept of an
MMO, that I could see and talk to and fight with people from anywhere in the
world.

------
bevacqua
RunUO was the only reason I learned C#. I was self-taught and I don't think I
would've made such an effort to learn it if it wasn't for Ultima Online.

------
Kiro
So if I understand this correctly the game state was kept in memory in
variables/data structures and then once in a while saved down to the DB. Why
not just save stuff as they happen? Seem like the most obvious solution to
avoid rollbacks.

~~~
pjc50
Do you save write-through or write-back? If you save write-through your game
is blocked on your disk write speed, which is not very high, and if you save
write-back then (unless you're very careful with journalling) you run the risk
of inconsistent state.

(Remember, this was 15-20 years of Moore's law ago so price/performance was
about a thousand times worse than today)

------
happywolf
Salute on the craftmanship.

------
curiously
_We had a small office or closet we converted to a server room with a fan in
it. We used to hover a beachball over the exhaust._

that's so awesome. I love little stories like this from early pioneers.

~~~
putzdown
I was there on the UO team. Fun fact: this server closet also gained an
optical scanner as its security system, due I think to the generosity/love-
for-toys of Richard Garriott. The optical scanner didn't work very well, and
was way overkill, but it was super neat. We all felt like spies. Despite
actually being geeks.

~~~
curiously
what year was this?

~~~
putzdown
1997

