In the end, Hussain ibn Mahmuds services were required for a military purpose. The Sultans researches, led by an Arab and a Peranakan Chinese, had led to a particularly effective form of cannon, and Hussains services were needed to create a prototype.
The chief failing of cannons in the Indian Ocean, as well as elsewhere, had always been in reloading. Some cannons, such as those mounted on wheels for transportation, sailed backward uncontrollably upon firing, often injuring or killing their operators. Moreover, such cannon were difficult to use in fixed positions such as aboard ships or in fortifications because they required a great deal of room to maneuver.
A different version of cannon had been developed previously which did not use wheels. These cannons were primarily used aboard naval vessels, and they did not shoot backward as much upon firing. But they had a different problem. Being placed in small turret windows, they were very difficult to reload. Since they were not mounted on wheels, the cannon had to be hauled away from their berths, turned horizontal, and reloaded, often taking as long as ten minutes to fire a second round. In the heat of battle, this was only sufficient as long as the opponents cannons were equally slow, and it hindered the effectiveness of grounded cannon.
The solution, designed with the Grand Canal of China and its supporting rigs to pull along boats in mind, was to place a cannon on a fixed track. A fired cannon would be propelled backward, as one on wheels, but in a controlled fashion, remaining on a relatively fixed rail. Moreover, this backward propulsion would put the cannon in place for reloading and easier shoving back to the berth at which it fired from.
The estimated increase in firing efficiency from the invention was considerable; cannons previously reloaded in ten minutes could now be reloaded in as few as two, cutting down substantially on wasted time and allowing far more effective firing.
Unfortunately, the new models were hardly foolproof. Many developed a tendency to be propelled too far backward, leaving the tracks onto which they had to be reloaded. The occasional injury resulted. Retraining garrisons would prove to be something of a challenge as well, although the Sultans military advisers considered their soldiers to be adept at such adaptations to new technology.
Would the new cannons keep Malacca safe, and her seas free of pirates? Probably not; news of the technology would be sure to spread, no matter how secretive the government remained. But a slight edge was achieved, for a time at least.