[erlang-questions] Help my with Chat System

Joe Armstrong <>
Wed Nov 2 11:23:00 CET 2011


On Wed, Nov 2, 2011 at 10:58 AM, Summer nguyen <> wrote:
> Thanks All experts,
> There are many things I have to study about Erlang and programing :D.
> And I am studying now :D.
>
> I choose Comet because Not all Browser support webSocket ( especially old
> version browser).
> And number of users use old browser is so many.  am I wrong ?

Sorry - I read you mail too quickly - I missed the bit about the web
clients. I mistakenly thought
that there were only swing clients.

As for the old browsers - there are lot's of them but I would hate to
have to support programs
running on old browsers. If you want to support applications running
on old browsers
I think most problems will be in the incompatibility between browsers.

I think I'd use something really simple for old browsers - just
polling. And web-sockets/HTLM5 for modern
browsers.

/Jow

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



More information about the erlang-questions mailing list