[erlang-questions] http client and server: inets, ibrowse, yaws

Ingela Anderton Andin <>
Thu Apr 5 10:22:41 CEST 2007


> Hi,
> I am looking for advice about the inets standard modules of OTP for http
> connection.


> My first goal is to embed an HTTP client. I see a lot of applications using
> 'ibrowse' module. I would like to use inets only because it is in standard
> otp (no dependency). Can anyone give a quick difference between the two?

Well from the beginning there was no HTTP-client in OTP, and then one was contributed
but it was not officially supported due to lack of resources. Alas the contributed one
did not really have product quality so ibrowse was born. Now the OTP HTTP-client has
been rewritten and has product quality,and hence is officially supported. We have also looked at ibrowse and taken influence from it to support all things that we thought it did good that was lacking in OTP. The OTP one also may support some things not supported by ibrowse, if that did not change since last time I looked at ibrowse. (Cookie handling I think was one of them.)


> Also I need to embed an simple HTTP server and got the same problem with
> using 'yaws' or inets 'httpd'. Furthermore I cannot figure out how to start
> httpd without config file or root directory ... yaws is simplest to embed.


This one is harder to answer. The intes httpd and yaws have different approaches  
and both have their pros and cons. The Inets one is very old and inspired by apache. It also has a lot of legacy, that I would rather get rid of but that is impossible as we have customers that use it a lot. I  think that yaws is also used a lot in the open source community and I can see things I like about it. 

There is no officially supported way to start inets
without a config file, although webtool does that. I would not really recommend using webtools
strategy as it might change without warning. It's in the plans for inets to improve start
strategies but I am not making any promises until when this will be ready. 

So I am afraid I can not really recommend one or the other it so much depends on what you value the most for your particular situation. 

Regards Ingela - OTP team

 




More information about the erlang-questions mailing list