Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A framework written in Erlang and supporting Computational REST.
JavaScript Erlang
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ca
config
logs
priv/www
src
src_demo
src_test
support
.gitignore
COPYING
COPYING.LESSER
EPL-LICENSE
MIT-LICENSE
README
plot-crest.sh
plot-original.sh
rebar
rebar.config
shell.sh
start-dev.sh
start.sh
summarize.awk
test_remote.sh
test_spawn_multiple.sh
test_spawn_single.sh

README

CREST-Erlang

1. Introduction
2. Installation
3. Certificates and Certification Authority
4. Add a new computation
5. Authors
6. License

====================================================================

1. Introduction
This is a Web framework written in Erlang and supporting the
architectural style "Computational REST"; you can find informations
about the style at http://www.erenkrantz.com/CREST/ and about the
Master Thesis work that generated this application at
http://www.chimera-bellerofonte.eu/pubblicazioni/ (in Italian).

2. Installation
First, you need to download the dependency libraries with

./rebar get-deps

(you will need git and svn and Internet access); then you can
compile everything with

./rebar compile

and launch the server using one of the three start* scripts:
start.sh will launch the server without console output, start-dev.sh
will output some logs directly to the console.

3. Certificates and Certification Authority
This framework requires SSL mutual authentication between peers; for
obtaining this, I have included an example certification authority with
a client and server certificate; beware that they have not been
released by a real CA, and both are provided for testing purposes only.
Real certificates should be provided when deploying a server running this
application.

The CA password is "crest", the server and client certificates passwords
are "peer".

4. Add a new computation
Installing a new computation on your local server is quite easy: create a
closure following the template located at

<crest-erlang root>/support/module_sample.erl

You can develop additional libraries or additional modules supporting the
one that you see there; then compile it using erlc and add any produced
.beam file to the current bytecode path:

<crest-erlang root>/ebin

Add a line in

<crest-erlang root>/config/locals.config

With the following format:

{computation, "Keywork", "module_name", "computation_main_function", true/false}.

where the boolean value indicates if the given function has to be shown
in the manager Web page, and the first atom is fixed.
Beware that the keyword needs to be unique inside your configuration file.
Then you can install it using crest_operations:install_local/1, passing to
it the keyword itself; if the server was running when you modified the
configuration file, it will be reloaded and then your computation will be
installed. The returned UUID can be used to invoke the computation, through
the url <http://hostname:8080/url/uuid> or using crest_operations:invoke_lambda/4. 

5. Authors
Alessandro Sivieri <alessandro.sivieri@mail.polimi.it>

6. License
This framework is licensed under the "GNU Lesser General Public License";
you can find this license in the files "COPYING" and "COPYING.LESSER" under
the project directory, or at http://www.gnu.org/licenses/lgpl.html.

The demo code is licensed under the "GNU General Public License"; you can
find this license in the file "COPYING" under the project directory, or
at http://www.gnu.org/licenses/gpl.html.

The UUID generator source file is Copyright (C) 2008 Andrew Kreiling
<akreiling@pobox.com> and licensed under the "MIT license"; you can
find this license in the file "MIT-LICENSE" or at
http://opensource.org/licenses/mit-license.php.

The gen_server2 source file is Copyright (C) 2009 LShift Ltd. and licensed
under the "Erlang Public License"; you can find this license in the file
"EPL-LICENSE" or at http://www.erlang.org/EPLICENSE.

The jQuery library is licensed under the "MIT License", more details at
http://jquery.org/license; jQuery DataTables is licensed under the "BSD
License", more details at http://www.datatables.net/; jqPlot is
licensed under the "MIT License", more details at
http://www.jqplot.com/docs/files/MIT-LICENSE-txt.html.
Something went wrong with that request. Please try again.