new to erlang: need ideas for server software

Joe Armstrong (TN/EAB) <>
Thu Aug 17 09:35:44 CEST 2006


Interesting - can somebody answer the following:

cometd looks to be a ideal application for Erlang. I have written this
try of application *many times*

<aside>
I have implemented a similar thing (many times). With the following
differences:

- instead of using JSON encoded message bodies I can send an
message with an arbitrary encoding, determined by the mime-type
of the message.

   In fact I use binary encoded Erlang terms (using
term-to_binary(Message))

   When I compared this with XML encoded terms, my version ran 16 times
faster

- the set of messages

      * handshake
	* connect
	* reconnect
	* disconnect
	* status
	* subscribe
	* unsubscribe
	* ping 

Was different 

- I use what I call "poly ports", poly ports understand
multiple-protocols
so even though I use port 80 and HTTP I can interleave non-http messages
on the port 80 channel (A kind of short form of the HTTP) instead of
sending GET .... or POST ... I just send "eBin...." meaning "here comes
an Erlang term encoded with term_to_binary. When I decode this term I
get
the parse tree of the HTTP GET/POST etc. request, again much faster

</aside>

Now I have some questions about cometd.

- Is this an "interesting" application - ie if implemented in an
efficient manner will
  anybody be interested and use the implementation?

- Just how high performance is desirable?

  How many message/sec should a single server handle?
  How many simultaneously open connections should a single server
handle?

Also
  How frozen is the protocol?

  A really large server would benefit from an addition message in the
protocol set,
for example:

	* redirect (client - server message)
	* hand-over (server - server message)
   
   redirect can move a connection to a new server, the server send
redirect to the client
with a new server IP. The client closes the connection and connects to
the new server.
  
   hand-over is used between server to negotiate a redirection before it
occurs.''

   This can be used for:

	- load balancing (a busy server can redirect connections to a
unloaded server)
      - taking a server out of service, without interrupting the service
	- scaling the capacity of the server.


/Joe


> -----Original Message-----
> From:  
> [mailto:] On Behalf Of Roberto Saccon
> Sent: den 17 augusti 2006 04:32
> To: 
> Subject: Re: new to erlang: need ideas for server software
> 
> oh, this is exactly what I am working on right now.
> 
> > A cometd implementation:
> >
> > http://cometd.com/
> 
> --
> Roberto Saccon
> 



More information about the erlang-questions mailing list