Best way to emulate network switching on PCB
How many modules are we talking about here?  10?  10,000?

There are a couple of possibilities, depending on what sort of I/O capability the boards have and how many boards you want to connect.  I'm not aware of any obvious off-the-shelf solutions, however.  

One method is to provide each module with one or more Ethernet PHY chips, and then use some commodity ethernet switch chips to connect them together, presuming the compute modules can interface well with a PHY chip.  This could work well if a non-mesh network is OK (I don't think el cheapo ethernet switches can handle loops).  If you want to do something a bit more complicated, you could make a bunch of small boards with a handful of compute modules, PHY chips, and an integrated switch, then connect the boards together with a larger off-the-shelf Ethernet switch.  You would probably be limited to using gigabit ethernet, though.  

Another possibility is to use some FPGAs.  Inside of an FPGA there is a decent number of block RAMs that can be configured as dual port RAMs or FIFOs.  If you have a relatively small number of compute modules, you can just connect them all to a single large FPGA with enough pins, then put togther an FPGA configuration with all of the interface logic as well as a bunch of interconnecting block RAMs and/or FIFOs.  If you have a large number of modules, then what you can do is use FPGAs to build a mesh network with a small number of compute modules connected to each FPGA.  This way you have complete control over the routing of data between modules.  I would recommend using either parallel interconnections between the FPGAs or possibly serialized LVDS for more bandwidth, depending on if the FPGAs have transceivers and how crazy you feel like getting with the board layout.