Skip to content

Commit 3276079

Browse files
committed
added project ewarp-web-bridge
1 parent f0e710f commit 3276079

File tree

4 files changed

+78
-4
lines changed

4 files changed

+78
-4
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,24 @@ This project is currently work in progress.
1717
## code structure
1818

1919
* ewarp-core
20-
2120
Core module containing the runtime handling, node discovery, ...
21+
2222
* ewarp-web
2323

2424
Web runtime adapter to start Erjang in a Java Servlet container, e.g. Tomcat
25+
26+
* ewarp-web-bridge
27+
28+
Bridges HTTP requests into the Erlang code. Uses [simple_bridge](https://github.com/nitrogen/simple_bridge) on the inside
29+
2530
* ewarp-example-web
2631

2732
Sample application
28-
* ewarp-web-bridge (planned)
2933

30-
Bridges HTTP requests into the Erlang code
3134
* ewarp-aws (planned)
3235

3336
Node discovery and advertising in a Amazon EC2/Elastic Beanstalk environment
37+
3438
* ewarp-osgi (planned)
3539

3640
Runtime adapter to start Erjang in an OSGi environment, e.g. Eclipse Equinox or Apache Felix

ewarp-web-bridge/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# ewarp web bridge: Bridges HTTP requests into the Erlang code
2+
3+
4+
## Web bridge
5+
6+
* Uses [simple_bridge](https://github.com/nitrogen/simple_bridge) and ```servlet_bridge``` companion project on the inside
7+
* Servlet filters and routes incoming requests
8+
* Any web framework supporting simple_bridge can be used (or none at all for simple projects)
9+
10+
## Configuration
11+
12+
**TODO** web.xml fragment, configuration options
13+
14+
## How to use
15+
16+
**Note**: as this is work in progress, there are not yet full instructions...
17+
18+
1. Get and build Erjang from GitHub:
19+
20+
git clone https://github.com/trifork/erjang.git
21+
cd erjang
22+
ant jar otpjar
23+
24+
2. Get and build ewarp from GitHub:
25+
Build using [Gradle](http://www.gradle.org/), which is downloaded automatically, when called as ./gradlew
26+
27+
git clone https://github.com/jetztgradnet/ewarp.git
28+
cd ewarp
29+
./gradlew war
30+
31+
3. Upload the created .WAR-file (`build/libs/ewarp-0.1.war`) to your Servlet container (e.g. Tomcat or Jetty)
32+
The Gradle-based build allows to run the WAR file inline using the following command:
33+
34+
./gradlew jettyRun
35+
36+

ewarp-web-bridge/build.gradle

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apply plugin:'java'
2+
apply plugin:'eclipse'
3+
4+
group = 'erjangx'
5+
version = '0.1'
6+
7+
repositories {
8+
//flatDir(dirs: "../erjang/lib")
9+
mavenCentral()
10+
}
11+
12+
dependencies {
13+
compile project(':ewarp-core')
14+
compile project(':ewarp-web')
15+
16+
// servlet api
17+
compile "javax.servlet:servlet-api:$servletVersion"
18+
19+
// logging
20+
compile "org.slf4j:slf4j-api:$slf4jVersion"
21+
compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
22+
23+
// erjang, OTP
24+
compile files("../../erjang/erjang-${erjangVersion}.jar")
25+
26+
// testing
27+
testCompile group: 'junit', name: 'junit', version: '4.8.2'
28+
}
29+
30+
31+
task wrapper(type: Wrapper) {
32+
gradleVersion = '1.0-milestone-4'
33+
}

settings.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[
22
'ewarp-core',
33
'ewarp-web',
4+
'ewarp-web-bridge',
45
'ewarp-example-web',
56
].each { project ->
67
include project
7-
}
8+
}

0 commit comments

Comments
 (0)