Difference between revisions of "Yhc web service"

From HaskellWiki
Jump to navigation Jump to search
(Added major images)
Line 29: Line 29:
   
 
[[image:compilelog.jpg|log viewer]]
 
[[image:compilelog.jpg|log viewer]]
  +
  +
  +
[[image:newentry.jpg|new entry form]]

Revision as of 03:15, 8 March 2008

Part of Yhc

(Download)

Yhc Web Service

Purpose

Yhc Web Service is a web-based tool to use Yhc's Javascript back end without installation of any additional software on user's computer. Only a standards-compilant web browser is needed. The service allows to submit some Haskell source code for compilation into Javascript, and generates a xhtml1 page which is temporarily stored. A link is provided to load the generated page into user's web browser. In general, Yhc web service's user interface is similar to one of a pastebin.

Hosting

The service is currently available at the following URL: http://www.golubovsky.org:5984/static/yhcws/MainGUI.html

Technical overview

Yhc Web Service is built around CouchDB which itself is written in Erlang. CouchDB uses JSON as encoding for queries and responses. A special daemon regularly polls the database for updates. If a new Haskell source is submitted for compilation as a new document, the daemon extracts it from the database, and invokes Yhc to transform it along with modules imported into linked Yhc Core. Next, Javascript Backend is invoked, to convert the linked Core into Javascript. Finally, using the XHTML template (user-supplied or standard), a Web page is built. Output from the compiler and other programs called during compilation is also collected. Results of compilation are stored in the database as attachments to the document which contains the submitted Haskell source.

The service runs a slightly modified version of SearchPath to chase imports across the Internet. This removes the limitation on the number of modules compiled simultaneously, while only one Haskell module may be submitted via user interface.

The Service runs under Linux inside a 32-bit virtual machine which is an instance of KVM administered by KVMADM on a 64-bit Linux host. Since CouchDB currently lacks any access control to its databases, Squid is used as reverse proxy with proper access control settings.

Users guide

document browser


source viewer


log viewer


new entry form