https://github.com/macielti/echo-graalvm
A simple Telegram echo bot to experiment with GraalVM native-image and Clojure
https://github.com/macielti/echo-graalvm
clojure graalvm telegram-bot
Last synced: 3 months ago
JSON representation
A simple Telegram echo bot to experiment with GraalVM native-image and Clojure
- Host: GitHub
- URL: https://github.com/macielti/echo-graalvm
- Owner: macielti
- License: other
- Created: 2025-01-18T18:28:00.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-02T15:25:01.000Z (4 months ago)
- Last Synced: 2025-02-02T16:26:39.004Z (4 months ago)
- Topics: clojure, graalvm, telegram-bot
- Language: Clojure
- Homepage: https://github.com/macielti/echo-graalvm
- Size: 182 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

# Echo GraalVM
A simple Telegram bot that echoes messages back to the user.
The objective is to experiment with GraalVM while generating native-images from a Clojure application.**Echoes only text messages**
## Usage
Local deployment:
1. Clone the repository
2. Rename the file `resources/config.edn.example` to `resources/config.edn`.
3. Fill the `resources/config.edn` file with your Telegram bot token.
4. Run the docker container: `docker compose up -d`## Experiment Results
A simple Clojure application (a Telegram echo bot) deployed to a Docker container consuming less than 10 MiB of RAM.
To ensure a fairer comparison, I implemented 3 versions of Docker images:
- **echo-graalvm-distroless**: The version that uses `gcr.io/distroless/base:latest` as the base image.
- **echo-jvm**: The JVM-based version using `amazoncorretto:23` as the base image.
- **echo-graalvm**: The GraalVM-based version, also using `amazoncorretto:23` as the base image.`docker stats` output:

## License
Copyright © 2025 Bruno do Nascimento Maciel
This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License, v. 2.0 are satisfied: GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or (at your
option) any later version, with the GNU Classpath Exception which is available
at https://www.gnu.org/software/classpath/license.html.