Allin was definitly the right move. You had no way of knowing that this guy had a straight on the flop. If he would have had a Ten with some other not so important card, he would be looking for a straight, and you don't want that. However, I believe you could have played it a bit better. In my opinion, you should have raised with pocket nines in late position. The reason for this is because you get to see what everyone else does first on the flop. If you raise, most players automatically put someone on A K, or some other high cards. If high cards come, you can take a bluff at it, or just check. Most likely no one will bet cause they would be too scared, hence you can catch another card. If low cards come, you can raise and people will think that you'r bluffing
it! A win win situation. And well the people who called, youll have an idea of what they have since they called your fair raise.
But your allin was the right thing to do in my opinion. Either way, if someone has a straight caught on the flop, you could always get a full or a poker. You have outs. Btw if you want to read up on some good techniques, you should go too realpokergaming.110mb.com/home.html . This is a really good spot I discovered that helps build ones bankroll in a strategic and orderly fashion. Lots of good reading and tips.
Now well I hope I could help with my opinion. Good play on that hand but just some bad luck. Hope ta see all of you on the table some time.