The former isn't a great solution because it requires users to be linked to their real identity by at least one person. Real identities have some advantages, but requiring it bars a lot of good discussions that people don't want linked to their real name. Allowing pseudonyms gives people freedom to publicly say something they would traditionally only say privately or sometimes not at all. If it is paired with strong moderation, like HN is, it can prevent the greater internet fuckwad theory from going into effect which is a common problem with anonymous communities.
If you have people inviting people that they don't know the real identity of, the invite system isn't really adding anything beyond making it slightly more complicated to join. I could understand a theory that a higher barrier to entry means that only people with a high desire will join resulting in a better community. It is possible that results in better discussion, but I'm not sold because there are plenty of bad users like spammers and bots that are also highly motivated.