Well, the Superboard and I are back in Chicago after surviving PyCon. What a great conference--it's always exciting to see 1400 enthusiastic Python programmers in one place!
In case you missed it, you can now watch the video of my Building a Cloud Computing Service for my Superboard II presentation. In this post, I just briefly wanted to fill in more details about the talk, including some links to prior blog posts, ported libraries, code, etc.
First, as background, you might check out some of my earlier blog posts that describe audio encoding/decoding as well as the problem of building an emulated version of the Superboard using Py65. Here are some links:
An earlier talk about the Superboard was given at the January, 2011 Chipy meeting. This talk was quite a bit different than the Pycon presentation and focused more on the problem of building an emulated Superboard. It also includes some live demos and more general history about the Superboard.
In the Pycon talk, I described how I built a 6502 assembler from scratch. At one point, I was planning on writing a separate blog post about that, but for now, you can just look at the raw code here. Related to that, you can also see the assembly code for the Superboard messaging driver.
ZeroMQ played a big role in the project--specifically, I used it to build all sorts of client applications on the Macintosh. The starting point for that code was a program aciamsg.py that implemented the binary messaging link to the Superboard and bridged it to clients via a set of ZeroMQ sockets. Client services were supported by a class defined in msgservice.py. For example, divmod.py computes the divmod of two variables and fibo.py computes fibonacci numbers.
An emulated Superboard was created using Py65. An earlier blog post describes that project, but the version I used for my Pycon talk is in a file superboard2.py. Essentially, it emulates a superboard in a VT100 compatible terminal window. Operations on the video ram are translated into VT100 compatible terminal commands. You might be shocked at the size of the emulator--it's only around 220 lines.
For the cloud service, a special supercloud.py service is used to listen for USR(0) requests. This service feeds work into a queue that is processed by a superrun.py program which runs emulated the Superboards in the background. The code is actually written in a way that allows for different implementations of the job queue and program store. In the talk, I described the use of Redis, but that's not the only option.
There are a few other bits of code not shown, but the above fragments should give you enough of a general idea how things were put together. I have to admit that some of the code was rather hastily written so don't expect too much from it.
When did you find time to do this?
This entire Superboard project was nothing more than an interesting hobby project. Most of the really hard work including the audio encoding/decoding, 6502 assembler, and messaging device driver were coded over a couple of weekends in late August 2010. For a few months after that, I messed around with different possible designs of a "cloud service", but since I also had other work to do, progress was spread out and sporadic. Initially, I thought the service was going to implement a kind of remote "gosub" service (i.e., BASIC programs on the Superboard could remotely GOSUB to code living elsewhere and that remote code would be able to see the BASIC workspace via shared memory), but that never really panned out. In January, 2011 I was fooling around with Py65 and created the first emulated Superboard. That work resulted in the final design of the system presented at Pycon (namely, having a cloud of emulated Superboard instances). I have to admit that I liked this design much better than my original GOSUB idea.
Ported Python3 libraries
You can find some of the libraries I ported to Python 3 on Github. Some of the other libraries are still just sitting on my machine. Eventually I'm hoping to have everything published online on my Github account as time allows.
The Superboard's Favorite Pycon Talks
I wanted to mention a few really outstanding Pycon talks that I attended. First, check out Richard Saunder's Everything You Wanted to Know About Pickling, But Were Afraid To Ask. I have to admit that to me, pickling is almost more mysterious than the GIL. Richard did a great job peeling back the covers. I also really enjoyed Van Lindberg's How to Kill a Patent with Python. Van Lindberg is one diabolical lawyer indeed.
As always, I enjoyed meeting everyone at Pycon. If you ever want to meet the Superboard in person, you should come to one of my Python courses in Chicago.
08/01/2009 - 09/01/2009 09/01/2009 - 10/01/2009 10/01/2009 - 11/01/2009 11/01/2009 - 12/01/2009 12/01/2009 - 01/01/2010 01/01/2010 - 02/01/2010 02/01/2010 - 03/01/2010 04/01/2010 - 05/01/2010 05/01/2010 - 06/01/2010 07/01/2010 - 08/01/2010 08/01/2010 - 09/01/2010 09/01/2010 - 10/01/2010 12/01/2010 - 01/01/2011 01/01/2011 - 02/01/2011 02/01/2011 - 03/01/2011 03/01/2011 - 04/01/2011 04/01/2011 - 05/01/2011 05/01/2011 - 06/01/2011 08/01/2011 - 09/01/2011 09/01/2011 - 10/01/2011 12/01/2011 - 01/01/2012 01/01/2012 - 02/01/2012 02/01/2012 - 03/01/2012 03/01/2012 - 04/01/2012 07/01/2012 - 08/01/2012 01/01/2013 - 02/01/2013 03/01/2013 - 04/01/2013 06/01/2014 - 07/01/2014 09/01/2014 - 10/01/2014
Subscribe to Posts [Atom]