Up to Main Index                               Up to Journal for May, 2016

                      JOURNAL FOR TUESDAY 17TH MAY, 2016
______________________________________________________________________________

SUBJECT: Code cleaning and some networking history
   DATE: Tue 17 May 23:50:52 BST 2016

What happened to the entry from last week? I'm sorry, but I have just been too
busy with work and other obligations :(

What have I been trying to work on recently? Good question! Can't remember :(
Hold on while I consult my commit logs...

  (muttering and keyboard clacking in the background)

Anyone still there? Here we go...

To make the implementation of account handling easier I have been cleaning up
various areas of the current code. As discussed in my previous post[1], I have
been isolating the client networking code. It now has no knowledge of players,
attributes or commands. It just deals with the sending and receiving of network
data and the handling of network errors. There is also no need for it to
peek at the data received to see if a QUIT command was issued. The resulting
code for the client networking is cleaner and simpler as a result.

Testing the changes was a right bugger :( Everything appeared to be okay for
up to 20,000 players. Above that and my small system had issues running the
server and all of the clients without excessive swapping to disk[2]. In the
end I deployed my bot for simulating clients onto another similar machine and
ran 60,000 clients across 100Mbit/s Ethernet. Above 10,000 clients I was
sometimes seeing some weird disconnect issues. Hopefully these issues are now
resolved. Why test with more clients than there are probably MUD players left
in the entire world? Because I can. Also it sometimes finds more errors faster
than with just a few clients.

I've also been cleaning up the command parser and state code. The state code
has seen the most work. It is now simpler, cleaner and more logical to follow.
A lot if this is due to no longer passing the dispatch function around between
methods as a func(*state). I'm not even sure why I did it that way in the
first place. The NewState function is a lot saner now as well.

When will these changes hit the public dev branch? As soon as I get some time
to do a little more polishing on a few outstanding changes I'm working on.

Talking about networking I was asked a question out of the blue the other day.
Will WolfMUD run over a dial up connection. Wow! Last time I used dial up was
on a US Robotics 56K modem[3] to connect to the internet back in July 2004. By
the end of July 2004 I had moved to the super fast 1Mbit/s broadband! Now I
have 'up to' 8Mbit/s ADSL and could upgrade 'up to' 76Mbit/s with fibre.

Actually there are two ways you could use dial-up with WolfMUD. Dial in to a
serial console or connect to an Internet provider via dial-up and use TELNET
normally, if somewhat slowly. Exactly how I'd have to read up on as it was a
long time ago since I played with modems - I seem to remember PPP, SLIP, PAP
and CHAP were part of the necessary incantations...

Actually thinking about all of this maybe having a modem - that is only
collecting dust anyway - on a serial port for dial in access in emergencies is
not such a silly idea after all.. but could I dial in using a smartphone?

--
Diddymus

  [1] Wednesday 4th May, 2016: 4.txt

  [2] Only 2Gb RAM with 256Mb allocated to zram swap.

  [3] It's currently at work for emergencies - no idea what we'd dial into now.


  Up to Main Index                               Up to Journal for May, 2016