I'm working on a game that allows you to add other users as your friend. The game is in Flash AS2 and the server is Python. 
I'm currently hoping to make it so the game sends an HTTP request to an API server that will then verify everything, such as if they're already friends, if they can be friends, etc, and then if everything's okay, I'd then insert the request into a request able. Anyway, if the user is currently online, I would like to send the user a notification through the server. 
The only way I could see this happening is if I opened up a socket connection through the add friend script and then sent a special packet letting the server know that it needs to send the notification. Right now that seems like it would take a while to do and not so efficient if a lot of users used it daily.
How would I best approach this and is there any other efficient ways?
I've decided it would be better if I still do the HTTP request, but depending on what the request returned, I could have the client send a packet to the server telling it to give the specific user a notification.
For example, if I tried adding user ID #323095643, I send the HTTP request and everything turns out okay and I get an OK response, the flash client sends a packet to the server basically saying "Hey, give user ID #323095643 a notification saying '_ wants you to be their friend'" and it sends it to that user.
Communicating to Socket Server From External Script