Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marschall/seaside-servlet-squeak
run Seaside inside a servlet container
https://github.com/marschall/seaside-servlet-squeak
graalvm seaside servlet squeak
Last synced: about 1 month ago
JSON representation
run Seaside inside a servlet container
- Host: GitHub
- URL: https://github.com/marschall/seaside-servlet-squeak
- Owner: marschall
- Created: 2019-08-27T16:26:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-16T13:18:52.000Z (over 2 years ago)
- Last Synced: 2024-09-30T09:16:29.051Z (3 months ago)
- Topics: graalvm, seaside, servlet, squeak
- Language: Java
- Size: 82 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Seaside Servlet Bridge for Squeak
=================================Run [Seaside](http://www.seaside.st) in a Servlet container using [TruffleSqueak](https://github.com/hpi-swa/trufflesqueak).
Usage
-----Add the dependency to your project
```xml
com.github.marschall
seaside-servlet-squeak
0.2.0```
Add the servlet to your `web.xml`
```xml
SeasideGraalSqueakBridgeServlet
com.github.marschall.seaside.servlet.squeak.SeasideGraalSqueakBridgeServlet
smalltalk.ImagePath
/WEB-INF/squeak/graalsqueak-1.0.0-rc2-seaside.image
falseSeasideGraalSqueakBridgeServlet
/*```
* load GraalSqueak-Core
* load Seaside```
Installer ensureRecentMetacello.
Metacello new
baseline:'Seaside3';
repository: 'github://SeasideSt/Seaside:develop/repository';
load
```* load `Servlet-Seaside` from this repository
* stop `WAWebServerAdaptor` as it fails during startup on TruffleSqueakAnd run with GraalVM.
Make sure you explode WARs for Tomcat, this means having `unpackWARs="true"` on the `` element of `server.xml`. See [Tomcat Web Application Deployment](https://tomcat.apache.org/tomcat-9.0-doc/deployer-howto.html).
Make sure you have TruffleSqueak installed in GraalVM.
Have a look at [marschall/seaside-servlet-squeak-demo](https://github.com/marschall/seaside-servlet-squeak-demo) for a complete demo project.
Requirements
------------* GraalVM 22.2
* TruffleSqueak
* `gu install -u https://github.com/hpi-swa/graalsqueak/releases/download/1.0.0-rc2/graalsqueak-component-1.0.0-rc2-for-GraalVM-19.2.0.1.jar`
* Jakarka Servlet 5Limitations
-----------* Limitations inherited from TruffleSqueak
* As TruffleSqueak is currently not thread safe we are limited to one concurrent request. This is especially damning in case of blocking IO like database access.
* Stack traces currently are not very useful.
* Continuations are not supported.
* Initial performance before warm up is not good compared to OpenSmalltalk VM.
* Startup is not good compared to OpenSmalltalk VM.
* Memory consumption and allocation rate are higher compared to OpenSmalltalk VM
* Asynchronous web request processing is not supported.JMX
---Included is a small framework to register Squeak objects as MBeans. To create a custom one:
* sublcass `WAMBean`
* override `#objectName`, check out the [ObjectName](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/javax/management/ObjectName.html) class comment for information about the syntax
* add methods with `` and `` pragmas
* have a look at `WAAdminMBean` for an exampleTips & Tricks
-------------Enable Graal compilation logging
export CATALINA_OPTS="-Dgraal.TraceTruffleCompilation=true"
To make WAUrlDecodingFunctionalTest pass use, this is not needed in general
export CATALINA_OPTS="-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"
If you have the Tomcat examples application installed (per default) this overrides the Seaside examples.
Warm up the compiler
for run in {1..100}; do curl -L 'http://127.0.0.1:8080/tests/functional/WALotsaLinksFunctionalTest?_s=_eYKKM3Gl3XzVM5T&_k=JIp_6FO_QQ26nQob' > /dev/null; done
Include the session key to avoid session creation and follow redirects.
Running the image directly with GraalVM
$JAVA_HOME/bin/graalsqueak --jvm --polyglot src/main/webapp/WEB-INF/squeak/graalsqueak-1.0.0-rc2-seaside.image
Building a native Tomcat image https://ci.apache.org/projects/tomcat/tomcat9/docs/graal.html