一个简化远程数据访问的 Haskell 库:Haxl

lidki 10年前


Haxl是一个Haskell库,简化了远程数据的访问,比如数据库或基于Web的服务。 Haxl能够自动化

  • batch multiple requests to the same data source,
  • request data from multiple data sources concurrently,
  • cache previous requests.

Having all this handled for you behind the scenes means that your data-fetching code can be much cleaner and clearer than it would otherwise be if it had to worry about optimizing data-fetching. We'll give some examples of how this works in the pages linked below.

There are two Haskell packages here:

  • haxl: The core Haxl framework
  • haxl-非死book(in example/非死book): An (incomplete) example data source for accessing the 非死book Graph API

To use Haxl in your own application, you will likely need to build one or more data sources: the thin layer between Haxl and the data that you want to fetch, be it a database, a web API, a cloud service, or whatever. Thehaxl-非死bookpackage shows how we might build a Haxl data source based on the existingfbpackage for talking to the 非死book Graph API.



项目主页:
http://www.open-open.com/lib/view/home/1427030000886