Skip to content

a toy webserver that only creates user accounts written to compare and contrast Java and Rust.

License

Notifications You must be signed in to change notification settings

JesusGuzmanJr/JavaRust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Jesus Guzman, Jr
Sep 15, 2021
4dac5fc · Sep 15, 2021

History

25 Commits
Sep 14, 2021
Sep 15, 2021
Sep 15, 2021
Sep 15, 2021
Sep 15, 2021
Jul 21, 2021
Jul 20, 2021
Sep 15, 2021

Repository files navigation

Java & Rust Comparison of a Restful Service

This repository showcases two implementations of a restful api service. Its intent is to enable Java practitioners to compare and contrast a web service implemented in both languages. Both are running live now.


About the tech stacks

☕️ Why Java?

Many companies use Java for its ease-of-use and mature libraries. Java's strongest feature is its object-oriented paradigm that enables developers to model their business logic as a hierarchy of objects.

🦀 Why Rust?

Rust earned the top spot as the “most-loved” programming language for the sixth consecutive year of Stack Overflow's developer survey. The Rust ecosystem has recently seen an explosion in adoption with backing from major companies. Rust's most unique feature is the borrow checker, a compilation procedure that validates references and reclaims inaccessible memory thereby eliminating the need for a runtime garbage collector. This enables Rust programs to be blazingly fast and memory-efficient.

Stack Comparison

Stack Java Rust
domain name java.marzipan.club rust.marzipan.club
health endpoint http://java.marzipan.club/info http://rust.marzipan.club/info
language Java SE 11 Rust 1.55.0
compiler javac 11.0.12 rustc 1.55.0 (c8dfcfe04 2021-09-06)
compilation target java bytecode 55.0 stable-x86_64-unknown-linux-gnu
compiles to bytecode machine code
runtime OpenJDK Tokio
web framework Apache Tomcat and Spring Boot Actix Web
package manager mvn cargo
manifest file pom.xml cargo.toml
configuration file application.properties config.ron
compile and run mvn spring-boot:run cargo run
prod compile and run same as above cargo run --release
clean command mvn clean cargo clean
dependency tree mvn dependency:tree cargo tree
Server Specs per Stack
operating system Fedora 34
cpu 2 vCPU cores (AMD EPYC 2nd Gen)
memory 2 GB RAM
disk space 40 GB NVMe
cost 50 USD per year

About

a toy webserver that only creates user accounts written to compare and contrast Java and Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published