I want to create an application like this:
http://collabedit.com/
What is the most efficient way to create this real time application?
Flash? Long pollin
All the different methods have different pros and cons, I'm not an specialist on the differences, that's why I'll recomend you to avoid making the choice, avoid the development and tuning that each approach involves, avoid the future changes in available technologies (ie. as HTML5 web sockets arrival), using a library that abstracts the transport method used, and chooses the best approach based on client capabilities:
http://socket.io/
this wonderful library makes creating realtime apps amazingly simple! and there are various server-side implementations: Python (Tornado), Java, Google GO, Rack (Ruby), besides the mainstream implementation in Node.js (server-side JavaScript)