Thanks All experts,<br>There are many things I have to study about Erlang and programing :D.<br>And I am studying now :D.<br><br>I choose Comet because Not all Browser support webSocket ( especially old version browser).<br>
And number of users use old browser is so many.  am I wrong ?<br><br><br><div class="gmail_quote">On Wed, Nov 2, 2011 at 4:45 PM, Joe Armstrong <span dir="ltr"><<a href="mailto:erlang@gmail.com">erlang@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="HOEnZb"><div class="h5">On Wed, Nov 2, 2011 at 4:58 AM, Summer nguyen <<a href="mailto:summer0nguyen@gmail.com">summer0nguyen@gmail.com</a>> wrote:<br>

> Hello experts,<br>
> My job is implementing a Chat System between a Web user ( Comet client) and<br>
> a Swing Desktop Client.<br>
> After searching google, I found a topic of a Facebook Engineer that make me<br>
> choose Erlang:<br>
> <a href="http://www.facebook.com/note.php?note_id=14218138919" target="_blank">http://www.facebook.com/note.php?note_id=14218138919</a><br>
><br>
> So I'm very new to Erlang and Thrift.<br>
> After studying , Here is my solution:<br>
><br>
> Comet Server ( using Erlang)<br>
><br>
> Accept Comet Clients<br>
> If the client is New, Call Processing Server  using Thrift to generate an ID<br>
> for him.<br>
> Store Response Object in a Dict using the abobe ID<br>
> Get Message from Comet Client and Call Processing Server  using Thrift to<br>
> send Message to Swing Desktop Client<br>
> Open a Thrift Server Service (1) that listen from Processing Server action:<br>
> send message to ID xxx ( and then response to the right comet Client)<br>
><br>
> Processing Server ( Using Java)<br>
><br>
> Accept Swing Desktop Client<br>
> Open a Thrift Server Service (2) that listen from Comet Server actions:<br>
> generate ID, send message ( and then Send to Swing Desktop Client)<br>
> Receive message from Swing Desktop Client , then Call Comet Server  using<br>
> Thrift to send Message to Comet Client<br>
><br>
> Please give me advice if Erlang have a better solution for me.<br>
> If you don't understand my idea, please tell me. My english is not good.<br>
> Thank you very much.<br>
<br>
</div></div>Why would you want to use Comet? If you write the swing client yourself you can<br>
open a direct socket to the Erlang server. Is there any good reason<br>
for using comet?<br>
<br>
Comet is a mess - it solves a problem that should not exist in the first place.<br>
Using symmetric by-direction sockets is far easier.<br>
<br>
If direct sockets is unacceptable - then use http websockets.<br>
<br>
Comet is a technology that should become obsolete - the only reason<br>
for using Comet<br>
that I can think of is you have a legacy system that uses Comet.<br>
<span class="HOEnZb"><font color="#888888"><br>
/Joe<br>
</font></span><div class="im HOEnZb"><br>
<br>
><br>
> --<br>
> Name: Nguyen Huu Ha<br>
> HCMC University of Technology<br>
> Faculty of  Computer Science & Engineering<br>
> Tel: 01699987252<br>
> Email: <a href="mailto:summer0nguyen@gmail.com">summer0nguyen@gmail.com</a><br>
> Y!h: summer.inthesun<br>
><br>
><br>
><br>
</div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Name: Nguyen Huu Ha<br>HCMC University of Technology<br>Faculty of  Computer Science & Engineering<br>Tel: 01699987252<br>Email: <a href="mailto:summer0nguyen@gmail.com" target="_blank">summer0nguyen@gmail.com</a><br>
Y!h: summer.inthesun<br><br><br>