Up to Main Index                          Up to Journal for February, 2014

                    JOURNAL FOR FRIDAY 7TH FEBRUARY, 2014
______________________________________________________________________________

SUBJECT: Q&A for WolfMUD Go server running on unrooted Nexus 7
   DATE: Fri  7 Feb 23:12:36 GMT 2014

Well judging by my inbox yesterday's journal entry[1] was really popular and a
lot of you had a lot of questions. So I thought I would put together a Q&A and
answer as many questions at once as I can.


 Q: Why!?
 A: I don't know, just seemed like a good idea - don't you ever get bored and
    curious at the same time? :)


 Q: What other Android devices have you run WolfMUD on?
 A: I've had WolfMUD running on an old HTC Desire HD smartphone with the stock
    Android 2.3.5 - Gingerbread.

    This is a screen shot of it running: HTCDesireHD-WolfMUD.jpg

    Instead of using Google Drive to copy the files over I used a USB cable
    and mounted the SD card on my Linux desktop. Then I copied the files to
    /sdcard/download.

    Then I found out there was no 'cp' copy command and 'mv' move was weird
    and instead of moving the files seemed to be trying to hardlink them
    across file systems and failed. In the end I used cat! So step 5 become:


      cd /data/data/jackpal.androidterm/shared_prefs
      mkdir wolfmud
      cd wolfmud
      mkdir data
      cat /sdcard/download/server > server
      cat /sdcard/download/config.wrj > data/config.wrj
      cat /sdcard/download/zinara.wrj > data/zinara.wrj
      chmod 755 server


 Q: Why did you statically compile the server?
 A: Usually the server will dynamically link to a few libraries such as libc
    and libpthread. For the binary to run the ABI of the libraries and the ABI
    of the kernel must be compatible. Android has it's own custom libc called
    bionic and a custom pthread implementation. By statically linking the
    binary it has it's own copy/implementation of the libraries and only the
    ABI of the kernel needs to support the features the binary needs.


 Q: How many players can the Nexus 7 support?
 A: I'm not sure I didn't test :( I did however experiment with the HTC a bit
    - which is the older and slower of the two. The HTC can easily handle
    512+1 players - 512 randomly wandering around bots and a real TELNET
    session - at once over the Wifi with no noticeable lag and the phone was
    still very responsive. When trying to run more I hit the 'too many files
    open' problem - ulimit was unlimited so I guess it's a kernel tunable but
    I didn't have the time then to look into it further. With the 512+1
    players Android said it was using about 13Mb and Go said it had 2Mb
    allocated. Another screen shot: HTCDesireHD-WolfMUD-513Players.jpg


 Q: Does this have any real practical applications?
 A: I'm not sure. It's geeky and fun does that count? Basically you could
    write any type of program, utility or server to run on your Android tablet
    or phone.


 Q: It's all command line based, can it have graphics and a GUI?
 A: Well if you want it to have a native GUI you would have to use the native
    Android libraries. However Android has the normal local network interface on
    127.0.0.1 and Go has excellent support for writing servers and generating
    HTML. So you could write a client/server type app and use a web browser to
    talk to the server locally and provide the interface. This also still
    keeps everything portable as well :)


 Q: What about battery usage?
 A: Bearing in mind it's an old phone, display was kept on while testing, Wifi
    running continuously with 512+1 players, airplane mode turned on to turn
    the radio off. It used up about 8% of a full charge over about 30 minutes.


 Q: Will ithis work for iOS?
 A: I have no idea, but doubt it. I'm not really an iThing fan. In fact I'm
    not really an Android developer - I just tinker, this just started off as
    a 'I wonder...' experiment. I am getting into Android stuff more and love
    working with ARM processors.


 Q: What's next?
 A: I have no idea. Maybe setup a co-processing cluster of a Nexus 7, HTC
    Desire and a 3Q 10" tablet? Maybe shanghai a Hudl[2] or two as well :)


         "Imagine a Beowulf cluster of these!" - as seen on Slashdot


As before if you have any comments or questions feel free to drop me an email:

  diddymus@wolfmud.org


--
Diddymus

  [1] See yesterday's entry: 6.html

  [2] A cheap £119 7" Tablet from Tesco that is actually surprisingly good for
      the money: 1.5 Ghz quad-core A9, 1Gb RAM, 16Gb internal flash, upto 48Gb
      Micro-SD, 7" 1440x900 screen, runs nearly stock Android Jelly Bean.

      Wikipedia Entry: https://en.wikipedia.org/wiki/Tesco_Hudl


  Up to Main Index                          Up to Journal for February, 2014