Haskell, successing crossplatform API standart

Hello! (1) Is anybody aware of SOA approach being supported in Haskell? Found HAIFA package (SOAP, WEB services), but it seems to be a RIP project (with it's last updated in 2006) - trying to install it is a total mess (for me, a newby). (2) Please, perhaps experienced developers could suggest any better crossplatform (crosslanguage) API standart supported in Haskell? For me the main priority is orientation on "being supported everywhere in far future"... Thanks in advance -- View this message in context: http://www.nabble.com/Haskell%2C-successing-crossplatform-API-standart-tp207... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

lambda-belka:
Hello!
(1) Is anybody aware of SOA approach being supported in Haskell? Found HAIFA package (SOAP, WEB services), but it seems to be a RIP project (with it's last updated in 2006) - trying to install it is a total mess (for me, a newby).
The main web libraries are hosted on hackage.haskell.org, http://hackage.haskell.org/packages/archive/pkg-list.html#cat:Web
(2) Please, perhaps experienced developers could suggest any better crossplatform (crosslanguage) API standart supported in Haskell? For me the main priority is orientation on "being supported everywhere in far future"...
Look on hackage.haskell.org for something you'd like. -- Don

Haxr provides a basic implementation of the XML-RPC protocol, and while it looks like it doesn' t build on 6.10 at the moment, getting it to build shouldn't be a problem, and although it doesn't appear to be under active development, it does seem to be getting maintenance uploads. [1] These days, however, web services seem to be moving towards a RESTful model with a JSON layer and there are plenty of JSON libraries on hackage, which you could just throw over the fastCGI bindings. Alternately you could try JSON over one of the really lightweight haskell web servers, such as shed [2] or lucu [3]. If you go the latter route, I'd love to hear how it went. [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haxr [2] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/httpd- shed [3] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Lucu Regards, Sterl

s.clover:
Haxr provides a basic implementation of the XML-RPC protocol, and while it looks like it doesn' t build on 6.10 at the moment, getting it to build shouldn't be a problem, and although it doesn't appear to be under active development, it does seem to be getting maintenance uploads. [1]
These days, however, web services seem to be moving towards a RESTful model with a JSON layer and there are plenty of JSON libraries on hackage, which you could just throw over the fastCGI bindings. Alternately you could try JSON over one of the really lightweight haskell web servers, such as shed [2] or lucu [3]. If you go the latter route, I'd love to hear how it went.
[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haxr [2] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/httpd- shed [3] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Lucu
Yes, I'd love to see some experience reports about the light web servers. And anyone who's tried the Amazon or CouchDB or other non-traditional storage bindings, http://hackage.haskell.org/cgi-bin/hackage-scripts/package/CouchDB http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hS3 Also, HAppS is making a serious push these days, in particular, via gitit, http://lhc.seize.it/ (the lhc homepage is gitit running in happs) And HAppS has become far more available since stabilising. Maybe it is time for a "Haskell for the Web" collection. -- Don

On Sun, 30 Nov 2008, Don Stewart wrote:
Maybe it is time for a "Haskell for the Web" collection.
Two days ago I initialized http://www.haskell.org/haskellwiki/Category:Web

On Sun, Nov 30, 2008 at 17:51, Sterling Clover
Haxr provides a basic implementation of the XML-RPC protocol, and while it looks like it doesn' t build on 6.10 at the moment, getting it to build shouldn't be a problem, and although it doesn't appear to be under active development, it does seem to be getting maintenance uploads. [1]
HaXR should build with GHC 6.10 now, thanks for the prod.
These days, however, web services seem to be moving towards a RESTful model with a JSON layer and there are plenty of JSON libraries on hackage, which you could just throw over the fastCGI bindings. Alternately you could try JSON over one of the really lightweight haskell web servers, such as shed [2] or lucu [3]. If you go the latter route, I'd love to hear how it went.
I agree with this. I would only use XML-RPC to talk to legacy applications.
[1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haxr [2] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/httpd-shed [3] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Lucu
/Björn

Thanks for the info!
These days, however, web services seem to be moving towards a RESTful model with a JSON layer and there are plenty of JSON libraries on hackage, which you could just throw over the fastCGI bindings.
Oh, but JSON doesn't seem to support tree-structured data... This might turn into hell, when highly demanded in big infrastructures with complex communications. That's why I guess my choise will be XML. Don't know any good alternative with total support on every platform. -- View this message in context: http://www.nabble.com/Haskell%2C-successing-crossplatform-API-standart-tp207... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

On Wed, Dec 17, 2008 at 11:41 PM, Belka
Thanks for the info!
These days, however, web services seem to be moving towards a RESTful model with a JSON layer and there are plenty of JSON libraries on hackage, which you could just throw over the fastCGI bindings.
Oh, but JSON doesn't seem to support tree-structured data...
Whaaat? You might want to look closer.
This might turn into hell, when highly demanded in big infrastructures with complex communications. That's why I guess my choise will be XML. Don't know any good alternative with total support on every platform. -- View this message in context: http://www.nabble.com/Haskell%2C-successing-crossplatform-API-standart-tp207... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Oh, but JSON doesn't seem to support tree-structured data...
{
"value" : 5,
"left" : {
"value" : 3,
"left" : null,
"right" : null
},
"right" : {
"value" : 8,
"left" : null,
"right" : null
}
}
JSON *is* tree structured data.
/jve
On Thu, Dec 18, 2008 at 1:41 AM, Belka
Thanks for the info!
These days, however, web services seem to be moving towards a RESTful model with a JSON layer and there are plenty of JSON libraries on hackage, which you could just throw over the fastCGI bindings.
Oh, but JSON doesn't seem to support tree-structured data... This might turn into hell, when highly demanded in big infrastructures with complex communications. That's why I guess my choise will be XML. Don't know any good alternative with total support on every platform. -- View this message in context: http://www.nabble.com/Haskell%2C-successing-crossplatform-API-standart-tp207... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 18 Dec 2008, at 7:41 pm, Belka wrote:
Oh, but JSON doesn't seem to support tree-structured data...
Sure it does. In Haskell terms, data JSON = JSON_Number Double -- not entirely clear, actually | JSON_String String -- Unicode | JSON_Array [JSON] -- order matters | JSON_Object [(String,JSON)] -- Unicode keys, order no matter It supports trees well enough that encoding XML as JSON is trivial. To a first approximation, data XML = XML_CData String | XML_Element String [(String,String)] [XML] So, xml_to_json (XML_CData s) = JSON_String s xml_to_json (XML_Elment name atts children) = JSON_Object [("n", JSON_String name), ("a", JSON_Object [(k,JSON_STRING v) | (k,v) <- atts]), ("c", JSON_Array (map xml_to_json children))] One can handle the other aspects of XML, I just couldn't be bothered. Converting JSON that represents XML to XML is straightforward. Of course the converse is true too. json_to_xml (JSON_Number x) = XML_Element "n" [] XML_CData (show x) json_to_xml (JSON_String s) = XML_Element "s" [] XML_CData s json_to_xml (JSON_Array a) = XML_Element "a" [] map json_to_xml a json_to_xml (JSON_Object o) = XML_Element "o" [] [XML_Element "e" [("k",k)] (json_to_xml v) | (k,v) <- o] Again, converting XML that represents JSON to JSON is straightward, I just don't need to show it to make the point. Also obviously, you might as well use Lisp s-expressions. If you have a choice between XML and JSON, it may be worth remembering that JSON is *far* easier to parse. I would expect a JSON parser to be faster, and more importantly, I would expect it to be more reliable.

Thanks everybody for your responses, they helped a lot. And sorry for my misconcept on JSON. ;] Sterling Clover, Nov 30, 2008:
These days, however, web services seem to be moving towards a RESTful model with a JSON layer and there are plenty of JSON libraries on hackage, which you could just throw over the fastCGI bindings. Alternately you could try JSON over one of the really lightweight haskell web servers, such as shed [2] or lucu [3]. If you go the atter route, I'd love to hear how it went.
So here is my first feedback. I hope that's something like an introduction to my futher feedbacks. 1. I started with HAppS. But found it lacking some good definitions. Moreover, I'm still a newbie and not yet confident with monads, so when I accidently saw this: "Author's Note: Due to my inexperience with Monads, these explanations are probably lacking. Feel free to improve them." (HAppS tutorial2, sect. 1.1), I felt myself standing on a risky ground, where the risk is to get Monads wronger than wrong. So I decided to check Lucu and return to HAppS later (when I'm "invincible"). 2. I loved Lucu, and feel respect to it's developer. The code is nice and tidy, one can feel good style in it. Looks like Lucu author achieved great technique in Haskell, knew, how to use Monads and laziness in full power. However I still didn't understand some aspects (simply becase of lacking experience). I sucessfully managed to write a helloworld which connected to DB and provided simple WEB interface. 3. I also tried shed httpd, which is the most minimalistic WEB server. This looks like the best start for a newbie, who isn't confident with monads yet. I manager a small comparison of Lucu and Shed responce times - Lucu was 2 times faster for 1 simple query, which returned 5 rows from small DB. Now I'm planning 1. To try some modification of Lucu, so it has a DB connection in it's environment and some basic triggering (providing conditioned actions after WEB interaction process). 2. Implement one simple project on it. Regards, Belka -- View this message in context: http://www.nabble.com/Haskell%2C-successing-crossplatform-API-standart-tp207... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
participants (8)
-
Belka
-
Bjorn Bringert
-
Don Stewart
-
Henning Thielemann
-
John Van Enk
-
Luke Palmer
-
Richard O'Keefe
-
Sterling Clover