On this day in 1833, a couple of U.S. gentlemen — Jacob Ebert and George Dulty — patented the first soda fountain. The various attempts over the centuries have represented a desire to capture the nature mineral waters that bubbled up from the ground in many places around the world.
The device combines flavored syrup or syrup concentrate and carbon dioxide with chilled and purified water to make soft drinks, either manually, or in a vending machine which is essentially an automated soda fountain that is operated using a soda gun. Today, the syrup often is pumped from a special container called a bag-in-box (BIB).
The soda jerk's fountain generally dispensed only unflavored carbonated water, to which various syrups were added by hand.
According to wikipedia