Re: Building a REST API / efficient RPC interface in Clojure
On Monday, February 11, 2013 2:48:30 AM UTC+1, Mikera wrote: Thanks bernardH - these are great links, probably pretty close to what I was looking for. Will try some experiments with these over the next few days. Hi, I, for one, would be interested by the results of those experiments. Also, you (amongst others !) might be interested by http://clojurewest.org/sessions#ashworth Introducing Pedestal: Architecture and Services Pedestal is a set of libraries for building rich interactive Web applications using Clojure, ClojureScript and EDN. This talk starts with the big picture: problems Pedestal is designed to solve and the typical architecture of a Pedestal application. Then it dives into HTTP services, covering the details of the plumbing, including it's relationship to Ring, and how they enable collaborative applications. by Brenton Ashworth (@brentonashworth https://twitter.com/brentonashworth) and Tim Ewald - Relevance, Inc. I'm eager to discover this Pedestal ! Cheers, Bernard -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Building a REST API / efficient RPC interface in Clojure
Thanks bernardH - these are great links, probably pretty close to what I was looking for. Will try some experiments with these over the next few days. On Saturday, 9 February 2013 19:01:09 UTC+8, bernardH wrote: Hi, On Saturday, February 9, 2013 4:47:26 AM UTC+1, Feng Shen wrote: Hi, I did something similar during work (we are using Clojure) 1. Use HTTP as the transport: browser ajax call, mobile API call, intertal use 2. JSON as encoding. Javascript support it natively, mobile can decode it easily, Clojure has very good support for it Clojure can decode and encode json*[1]* very efficiently. Nginx can be configured to zip the data to save bandwidth. I, for one, would love to use fressian [*], for reasons explained by Rich Hickey [**]. Would you consider including this possibility in your lein template (which I'd very much like to use, considering the quality of your http-kit !) As for REST, have you considered liberator [***] ? Cheers, Bernard [*] https://github.com/Datomic/fressian [**] http://skillsmatter.com/podcast/scala/the-language-of-the-system/mh-6213 [***] https://github.com/clojure-liberator/liberator -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Building a REST API / efficient RPC interface in Clojure
Hi, On Saturday, February 9, 2013 4:47:26 AM UTC+1, Feng Shen wrote: Hi, I did something similar during work (we are using Clojure) 1. Use HTTP as the transport: browser ajax call, mobile API call, intertal use 2. JSON as encoding. Javascript support it natively, mobile can decode it easily, Clojure has very good support for it Clojure can decode and encode json*[1]* very efficiently. Nginx can be configured to zip the data to save bandwidth. I, for one, would love to use fressian [*], for reasons explained by Rich Hickey [**]. Would you consider including this possibility in your lein template (which I'd very much like to use, considering the quality of your http-kit !) As for REST, have you considered liberator [***] ? Cheers, Bernard [*] https://github.com/Datomic/fressian [**] http://skillsmatter.com/podcast/scala/the-language-of-the-system/mh-6213 [***] https://github.com/clojure-liberator/liberator -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Building a REST API / efficient RPC interface in Clojure
Define an API in terms of messages I'm not familiar with the concept - just out of curiosity, what does a mesagge-based API consist of? Is the drastically different from most REST/JSON web APIs out there? Thank you - Victor -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Building a REST API / efficient RPC interface in Clojure
Hi All, I'm looking for a library (or set of libraries that can easily be composed) that lets me do the following: - Define an API in terms of messages - Maintain a mapping between these messages and specific data types (some Java classes, Clojure data structures etc.) - Also maintain a mapping between the API and handler functions that get called in response to receiving a message - Expose the API as a general purpose REST API for the web - Also expose the same API using some form of efficient binary serialisation for RPC usage FWIW, the objective is make the same API available to both external users and internally within a cluster, without duplicating code but also without adding substantial messaging overhead to internal cluster usage. What would be the best tools / approach in the Clojure ecosystem at the moment for doing something like this? Mike. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Building a REST API / efficient RPC interface in Clojure
Hi, I did something similar during work (we are using Clojure) 1. Use HTTP as the transport: browser ajax call, mobile API call, intertal use 2. JSON as encoding. Javascript support it natively, mobile can decode it easily, Clojure has very good support for it Clojure can decode and encode json*[1]* very efficiently. Nginx can be configured to zip the data to save bandwidth. http-kit*[2]* to do http very efficiently. Compojure[3] can be used to define the mapping cleanly. One API, used everywhere. I am currently writing a lein new template plugin, to setup the config automatically, kills boilerplate, I expect it to be ready in the next few days. [1] https://github.com/clojure/data.json [2] http://http-kit.org [3] https://github.com/weavejester/compojure On Saturday, February 9, 2013 9:54:54 AM UTC+8, Mikera wrote: Hi All, I'm looking for a library (or set of libraries that can easily be composed) that lets me do the following: - Define an API in terms of messages - Maintain a mapping between these messages and specific data types (some Java classes, Clojure data structures etc.) - Also maintain a mapping between the API and handler functions that get called in response to receiving a message - Expose the API as a general purpose REST API for the web - Also expose the same API using some form of efficient binary serialisation for RPC usage FWIW, the objective is make the same API available to both external users and internally within a cluster, without duplicating code but also without adding substantial messaging overhead to internal cluster usage. What would be the best tools / approach in the Clojure ecosystem at the moment for doing something like this? Mike. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.