On May 10, 1876, President Ulysses S. Grant welcomed more than 180,000 visitors to the opening day ceremonies of the Centennial Exposition in Philadelphia's Fairmount Park.

Grant pulled a lever of the gigantic new Corliss engine, which powered the 800 other machines at the exposition. With the first hiss of steam, the crowd shouted and threw their hats into the air; guns roared, and church bells pealed. The fair was officially opened, and Philadelphia had secured its place as the "Workshop of the World."

I've been thinking about this history as the city prepares for Philly Tech Week, which is scheduled to kick off Friday night with demonstrations, contests, and parties.

Since 2005, the region has added 6,400 jobs in high-tech industries. Meanwhile, it has lost 25,000 traditional manufacturing jobs.

That's a net loss for the area, of course, but it isn't really news. At the peak of its industrial boom, about 300,000 Philadelphians worked in manufacturing; today, just 52,000 do. And there's no sign that technology jobs can make up the difference anytime soon.

So maybe we need to look again at what fueled Philadelphia's earlier prosperity. Part of it was the city's location, on several key waterways and only a short distance from the bountiful farms and mines of the Pennsylvania countryside. It also benefited from a steady supply of fresh immigrant labor.

But the city got a big assist from government, too, in ways we rarely recognize. And that might hold the key to reviving Philly's moribund economy — including its high-tech sector — today.

Chump change

For most of the 19th century, high tariffs protected young American industries from foreign competition. Meanwhile, state and local governments provided more than $400 million — by one measure, the equivalent of more than $1.3 trillion in today's economy — to canals and railroads, which ensured that other businesses could get their raw materials to factories and their finished products to market.

And that was chump change compared with federal subsidies of the railroads. The federal land grant to the Union Pacific Railroad alone was about the size of New Jersey and New Hampshire combined. All told, the U.S. government ceded more than 131 million acres west of the Mississippi to the railroads. If all those grants were concentrated in a single state, it would be the third biggest in the United States, behind Alaska and Texas.

The federal government also jump-started America's high-tech industry during World War II. Here in Philadelphia, it funded the world's first supercomputer, the Electronic Numerical Integrator and Computer, or ENIAC, which could predict the probable trajectory of missiles many thousands of times faster than the human beings (also called "computers") employed for the same purpose.

Lone maverick

After ENIAC, however, the government began to concentrate its high-tech contracts in the Sun Belt states of the South and West. It was especially generous to Stanford University, which partnered with private companies like Hewlett-Packard to establish an "industrial park" near its campus. And so Silicon Valley was born.

Despite our modern image of the lone maverick tinkering in his garage — think Bill Gates or Steve Jobs — the computer was a product of government dollars. But that money largely bypassed Philadelphia, which has been playing catch-up ever since.

One attempt was the establishment of University City, a term coined by planners in the early 1960s in an effort to attract high-tech companies. The district adjacent to the University of Pennsylvania was supposed to be Philadelphia's answer to Stanford's industrial park.

But it was much harder to create a high-tech district in an impoverished East Coast metropolis than it was in a bucolic California suburb. The growing minority communities of West Philadelphia objected to the proposed urban renewal of University City, which seemed like a way to wall them off from white professionals. And the professionals found it easier to locate in Palo Alto — or Austin, or Seattle — than to brave the racial politics of the City of Brotherly Love.

So as we celebrate Philly Tech Week and the energetic coterie of start-ups that are bringing new jobs to the area, we might also ask what Uncle Sam can do to help. One set of answers lies in President Obama's proposed tax deductions for high-tech companies, as well as his plan to fund partnerships between universities and the private sector.

But in the long run, Philadelphia will need more. We can't attract the industries we want unless we have better schools to train their workers and improved infrastructure to move their products. And none of that will happen without huge infusions of federal and state dollars, which powered our last technological revolution. It's time to invest in the next one.

Jonathan Zimmerman teaches history at New York University and lives in Narberth. He is the author of "Small Wonder: The Little Red Schoolhouse in History and Memory" (Yale University Press). He can be reached at jlzimm@aol.com.