I would like to create a server an Erlang capable of receiving and sending AJAX messages. Is there a module that provides this functionality?
Well, i would not call it a module, perhaps a "library" would be a better description. check out these: Mochiweb, Webmachine and Nitrogen -- the master of Event Driven Web Apps.
What you need is RESTFUL services in Erlang. You want to be able to initiate HTTP GET or POST requests from your Ajax, say with JSON encoded Data and you expect to get back JSON encoded responses. Mochiweb has a good JSON parser and its Light Weight. The heavy duty Web server called Yaws is very capable of doing what you want. There is a good tutorial about RESTFUL services with Yaws. The most wonderful thing about all these is that you can use all or several of them together in the same web App (but you need some experience to do so, it aint very obvious for starters!)
However, you will need to get a grip of Erlang Concepts of doing things and you will then find all these frameworks very easy. These are not the only ones you can look into, there is ErlyWeb, Erlang Web and so many upcoming libraries.
Am sure you will find any one of these useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With