Up to Main Index                             Up to Journal for April, 2012

                     JOURNAL FOR SUNDAY 29TH APRIL, 2012
______________________________________________________________________________

SUBJECT: Debugging memory leaks
   DATE: Sun Apr 29 02:26:22 BST 2012

Well it's now getting early. Spent most of the day trying to debug the latest
memory problems. It seems like when a player connection is started so are two
goroutines. One for the actual player and one for async output - what you are
doing, what someone else is doing and what is going on around you messages.
Somewhere along the line the output goroutine is not dying and I end up with
thousands of them, each one not releasing resources so memory usage is slowly
going up as well.

*sigh* Debugging a program can be tedious, debugging a multithreaded
networking program can get pretty insane - especially if the bug only happens
when you have a lot of threads and a lot of networking going on!

Still got a few bugs to sort out but now the night jobs and backups are
kicking in so might as well goto bed for a while and sleep on it.

--
Diddymus

______________________________________________________________________________

SUBJECT: Rethinking new WolfMUD design
   DATE: Sun Apr 29 17:29:55 BST 2012

Awake again and fresh as a daisy - well sort of awake anyway. Once caffeinated
I spent time rereading some Go documentation. Specifically:


  The Go Memory Model [1]
  Effective Go concurrency section [2]
  Go Concurrency Patterns: Timing out, moving on [3]
  Go Programming Language Specification [4]
    - Channel Types [5]
    - Go Statements [6]
    - Select Statements [7]
  Codewalk: Share Memory By Communicating [8]


Oh how I long for an O'Reilly book on Go and a nutshell book with all the
references in it! Just looked through their New, Upcoming and Early release
sections on their website[9] and I can't see anything :(

For now it's back to reading from the screen - I much prefer dead tree
references, I have large bookcases full of reference books. One of my few
prized possessions.

I have a feeling I'm going to need to redesign the redesign of WolfMUD. As I'm
working on the foundations still I'm not too fussed. With a little more effort
things should turn out even better ;)

--
Diddymus

  [1] https://golang.org/ref/mem
  [2] https://golang.org/doc/effective_go.html#concurrency
  [3] https://golang.org/doc/articles/concurrency_patterns.html
  [4] https://golang.org/ref/spec
  [5] https://golang.org/ref/spec#Channel_types
  [6] https://golang.org/ref/spec#Go_statements
  [7] https://golang.org/ref/spec#Select_statements
  [8] https://golang.org/doc/codewalk/sharemem/
  [9] http://shop.oreilly.com/



  Up to Main Index                             Up to Journal for April, 2012