Skip to content


Objective-C BEncoding Framework

I recently found my interest piqued by the open-source, cross-platform BitTorrent client, Transmission. Upon downloading the source code for Transmission, we were disappointed to see that libtransmission featured only a very low-level BEncoding implementation. The unofficial BitTorrent specification refers to implementations in several languages, including Objective-C.

The Objective-C implementation provides a nice high-level library of methods (in reality, only two are needed!), but has a few flaws: there are some memory leaks, it doesn’t quite implement the specification entirely correctly and string-handling functionality is cumbersome. We’ve improved upon it in these respects and are releasing the code after the jump.

Continued…

Posted in Devblogs.

Tagged with , , , .


Packet Manipulation with Xbridge

As explained in our previous article, Xbridge is technically not a bridge per se, but a router. While we chose to use the term ‘bridge’ in the name of this software, the nomenclatural distinction is actually an important one with respect to the technical implementation of the software.

Xbridge is necessarily a router due to a number of caveats associated with typical consumer-grade networking equipment. Wireless network adaptors are increasingly popular, but promiscuous mode on these devices is rendered redundant on account of them dropping all traffic not for them on a hardware-level, unless in monitor mode. Likewise, few routers and switches deployed in the home environment allow for multiple hardware addresses to be associated with a single network port. As such, our software operates as a router, determining the correct destination for network traffic according to its protocol address (i.e IP address).

This requires on-the-fly modifications to all network packets passing through Xbridge, otherwise devices on the network will not know where their traffic should go. We shall begin this article by explaining the architecture of a typical packet.

Continued…

Posted in Xbridge.

Tagged with , , .


Running a C# Web Service on Linux: Mono, XSP and mod_mono

Recently, I’ve shifted my focus away from a pet XNA project in favour of another iPhone application that we’ve started developing. I wanted to get up and running quickly with the back-end web service, so given my recent experience with C#, it seemed a natural choice to go with ASP.NET and Visual Studio 2008. We run a Linux server, so I figured this would be the perfect opportunity to test out the Novell funded Mono project.

Continued…

Posted in Devblogs.

Tagged with , , .


Xbridge: Network bridging in OS X

Xbridge is an application that we recently began developing. It addresses a niche that the OS X operating system lacks: network bridging. Network bridging is a function found in Linux and Windows (since XP), but as yet has not made its way into OS X. For some time, OS X has included Internet Connecting Sharing, but this uses network address translation (NAT) to achieve its goal. 99% of the time, this is not an issue, but when your needs exceed the functionality that OS X provides, you’re left out in the cold.

There are a few cases when this might happen. NATs provide a nice service, wherein multiple devices behind the NAT can effectively share a single external IP address (that being the one of the computer or router providing the service) and traffic can freely flow out through the NAT and responses are duly transmitted back. Where NATs fall short is allowing external entities to initiate connections to devices behind the NAT: there is no systematic method by which the router can determine the correct device behind the NAT to which the connection should be forwarded. Technically-inclined readers will be aware of this issue and one common solution; port forwarding. This is usually easy enough to set up on the routers that many people have at home, but this is not the case for people using OS X’s internet connection sharing.

Continued…

Posted in Xbridge.

Tagged with , .


iPhone Banking Proxy

While we are quite pleased with the performance of the Banking iPhone application when a wifi network is available, the speed at which account balances and transaction histories are retrieved over 3G (and even more noticeably; 2G) leaves a lot to be desired. Even though 3G bandwidth is quite respectable (usually about 1 mbit/s on my Optus 3G connection), latency is the performance killer. 3G connections can be likened to the “long, fat pipe” model often used to describe the woeful one-way satellite connections of yesteryear. By that we mean it takes a long time for a round-trip between your phone and the bank’s servers, but the data contained in that round trip is quite generously portioned.

Typical latency on a 3G connection on a good day can range from anywhere between 500ms to more than a few seconds. This is bearable (just!) when surfing the web using Mobile Safari, but is a real killer if you want to load half a dozen pages (or more, depending on the bank you use and how many accounts you have) in quick succession and you can’t parallelise it on account of not knowing the correct URLs ahead of time. This is compounded by the SSL/TLS underpinning secure web surfing requiring a substantial handshake.

Continued…

Posted in Banking.

Tagged with , , .


Banking for the iPhone

Banking is an application that has been under development for several months now. At first, it was designed with the goal of getting around Westpac’s annoying password entry mechanism – a nightmare to use on the iPhone. Soon thereafter, we realised that rather than just being a wrapper around UIWebView, it would be kind of neat to implement a native iPhone application that acted as an appealing and easy-to-use interface to the rather archaic banking websites that we have the displeasure of dealing with in Australia.

Basically, we wanted to create an equivalent of the superb application offered by Mint.com, sadly unavailable to Australian users. Better yet, we wanted full transaction history for all our accounts spread across numerous banks and the ability to make transfers and payments from the phone in a matter of seconds, not minutes.

Continued…

Posted in Banking.

Tagged with , , .


Digital (Game) Distribution

We have done and will continue to do quite a substantial amount of market research. We have taken a particular interest in market statistics and development tips for digital distribution of games. To to be even more specific, information pertaining to the console marketplaces, in the form of services like Xbox Live Arcade, WiiWare and PlayStation Network.

Film Victoria recently hosted the 2009 Digital Distribution Summit, Small Games Big Market. There were some really knowledgeable speakers with some really useful presentations that are particularly relevant to indie game developers. The videos of the presentations are available online at the Digital Distribution Summit website.

There are several hours of footage there which I highly recommend, but I thought I would share my interpretation of some key points discussed throughout some of the talks.

Continued…

Posted in Devblogs.

Tagged with , , .


S3TC DXT1/DXT5 Texture Decompression

Earlier this year I offered to write the S3TC decompression routines that allowed texture exporting functionality to be included in the ‘Collada Exporter’ plug-in for the C4 Engine. After doing a bit of research I was pointed towards the perfect resource by C4’s creator, Eric Lengyel. Any information I’d found prior to this made the process sound a bit convoluted but after looking over the reference I was able to write the decompression routines with relative ease.

I basically forgot about these routines until a couple of days ago when the question of how to decompress S3TC (specifically DXT1 and DXT5) textures was brought up on the XNA Creators Club forums. As a result I’ve decided to release the methods that I wrote. Continued…

Posted in Devblogs.

Tagged with , , .


Islands of Serialisation in a Sea of Concurrency

libdispatch, the technology behind Apple’s much-touted Grand Central Dispatch in OS X 10.6, has been ported to FreeBSD and is planned to be included by default in FreeBSD 8.1. This is Good News™ because widespread adoption of this library means a big win for system- and application-level responsiveness across the board. No more beach balls or hour glasses!

The reason behind the big push for GCD and libdispatch is to shift the responsibility for managing threads and their assorted overhead, execution and pitfalls from applications to the operating system. Though reduced control makes a seasoned developer scoff and dismiss new frameworks as scaffolding for greenhorns, a pervasive approach to multi-tasking is increasingly essential in this age of multi-core processors as even the best-written applications do not have full insight into everything else happening on the system and hence cannot deliver the best possible performance.

Continued…

Posted in Devblogs.

Tagged with .