There are many things that you need to consider.
First, 9mm is a fine cartridge for self-defense. At one time, it's reputation was not so good, but that was mainly because of the ammunition available at the time (FMJ or primative JHP's). So long as you stick with a modern JHP from a reputable manufacturer, 9mm is a perfectly sound choice. Examples of good loadings include Speer Gold Dot, Winchester Supreme SXT, Winchester Ranger, Remington Golden Saber, Federal HST, and Federal Hydra-Shok.
While 9mm is a good cartridge, it is not the only good one. .357 Sig, .40 S&W, .38 Special, .357 Magnum, and .45 ACP are also excellent choices which are relatively common and should be available at most respectable gun shops. Other cartridges like 10mm Auto and .44 Special are good, but they may not be as available as the others I've mentioned.
The next issue is that of semi-automatic vs. revolver as both have advantages and disadvantages. A revolver's main advantages are simplicity, better size-to-power ratio, and less sucseptability to common malfunctions relating to ammunition or improper grip. A semi-automatic, on the other hand, will usually offer higher capacity, faster reloads, and less recoil for a given power cartridge. Also some find the single-action trigger of a semi-auto to be easier to master than the double-action trigger of most self-defense revolvers. I do, however, note that the DA trigger of a revolver is typically better than the DA trigger of most autos.
Finally, I'll address the Glock in particular since you mentioned that brand specifically. A Glock is a fine weapon and one would be well armed with such, but they aren't the be-all, end-all that some make them out to be. There are some features that prevent a Glock from being the right choice for everyone.
First and foremost, we have the Glock's trigger and safety mechanisms. While a Glock is legally defined as a double-action-only handgun and has numerous safety features, it still has a relatively short and light trigger pull and all the safety features are passive. The Glock's trigger is defined as DAO because the striker is only partially cocked until the trigger is pulled. However, the weight and length of a Glock's trigger is much more similar to a SA trigger like that of a 1911 or Browning Hi-Power than it is to a more traditional DA trigger like that of a Beretta M92, S&W metal-frame auto, Sig, or revolver. Also, unlike many SA autos, the Glock's only safety features are passive, meaning that no conscious effort beyond depressing the trigger is required to deactivate them. The only purpose that a Glock's safety really serves is to ensure that the pistol will not inadvertently discharge if dropped.
Secondly, the polygonal rifling of a Glock's barrel require jacketed bullets while conventionally rifled barrels are compatable with both jacketed and cast lead bullets. While most 9mm ammo uses jacketed bullets anyway, there is some out there with cast bullets. If you wish to use cast bullets in your Glock, you need to buy an aftermarket barrel such as those available from Lone Wolf.
Finally, while a Glock's polymer frame does significantly reduce weight, reduced weight usually makes recoil more pronounced. A heavier, all-steel gun will typically have less recoil than a lighter aluminum-alloy or polymer gun.
I am not trying to discourage you from buying a Glock, they are the perfect choice for some people. I am, however, trying to help you make an educated decision. I would encourage you to research and handle (shoot if possible) as many different handguns as you can before making a decision. At the end of the day, it's really a very personal thing.