GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — codern-org/codern

BranchesTags
Open more actions menu

Latest commit

 

History

242 Commits
242 Commits

Folders and files

NameName
Last commit message
Last commit date
.devcontainer
.devcontainer
 
 
.github/workflows
.github/workflows
 
 
config
config
 
 
domain
domain
 
 
internal
internal
 
 
other
other
 
 
platform
platform
 
 
repository
repository
 
 
usecase
usecase
 
 
.dockerignore
.dockerignore
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
main.go
main.go
 
 

Repository files navigation

Codern

An open-source Coding Platform

Codern is an open-source coding platform that focuses on providing a seamless setup for coding event organizers and participants, enabling them to enhance their programming skills through interactive coding experiences.

Note

This repository contains the API server of Codern only. If you are interested in exploring how the Codern user interface was created, please visit the link here.

We utilize third-party software, developed by Porama6400, for grading the source code submitted by users on our platform.

📚 Proposal

Architecture

%%{init: {'theme': 'neutral' } }%%
graph LR
    nginxIngress --> k8s

    client["Client"]
    client -->|http/https/websocket| nginxIngress

    k8s -.-|monitor| observer
    datastore -.-|monitor| observer
    messageBroker -.-|monitor| observer
    vm2 -.-|monitor| observer

    backend <-->|pub/consume| rabbitmq
    backend -->|query| mysql
    backend -->|query| influxdb
    backend -->|proxy| seaweedfs

    gradingCore <-->|pub/consume| rabbitmq

    subgraph codern["Codern cluster (Cold state)"]
        nginxIngress["Nginx ingress"]

        subgraph vm1["Virtual machine"]
            subgraph k8s["Kubernetes environment"]
                backend["Backend Pod"]
                frontend["Frontend Pod"]
            end

            subgraph docker["Docker environment"]
                subgraph datastore["Datastore containers"]
                    direction TB
                    mysql["MySQL"]
                    influxdb["InfluxDB"]
                    seaweedfs["SeaweedFS"]
                end
                subgraph messageBroker["Message broker"]
                    rabbitmq["RabbitMQ"]
                end
                subgraph observer["Observability containers"]
                    direction TB
                    grafana["Grafana"]
                    prometheus["Prometheus"]
                end
            end
        end
        subgraph vm2["Virtual machine"]
            dockerd
            gradingCore -->|manage container| dockerd

            subgraph docker2["Docker environment"]
                gradingCore["Grading Core"]
            end
        end
    end

style vm1 fill:#ced4da
style vm2 fill:#ced4da
style datastore fill:#e9ecef
style messageBroker fill:#e9ecef
style observer fill:#e9ecef
Loading

We don't need Microservice

Behind the scenes, the Codern API server was built using lighting-fast web framework, Fiber. Our codebase was designed with a monolithic architecture. Previosuly, we adopted a Microservice architecture for building everything (see legacy version), but we eventually made the decision to switch back to a monolith. We found that the Microservice architecture didn't provide us any significant advantages, only introducing development difficulties. As the result, we opted for the more streamlined monolithic approach.

Clean architecture

This project follows the Clean Architecture principles, ensuring a modular and maintainable codebase. With clear separation of core business logic from external dependencies, it promotes flixibility and scalability. This approach also facilitates easier testing.

Thanks to Uncle Bob, for the article of Clean Architecture.

Logging & Measurement

This project utilizes InfluxDB, Prometheus, Grafana and to achieve a robust log and metric management system. With InfluxDB for time-series storage, Prometheus for monitoring, and Grafana for visualization, we ensure optimal performance and proactive issue detection.

Early access stage

We are currently in the beta version of the development phase, and we had the opportunity to run and exeperiment with our system design during the Bangmod Hacakthon 2024. This event, organized by King Mongkut University of Technology Thonburi, saw participation from approximately 200 schools across Thailand in this coding competition.

During the 3-hour event, we encountered a high traffic load on our system, with around 400,000 requests (40 req/s). It's important to note that we were using only one instance of the main server (4 CPU cores / 8 GB RAM) and two instances of worker servers (1 CPU core / 1 GB RAM). Users had a positive experience, receiving code results quickly from our system, with an average grading latency of about 7 seconds.

We are proud to share that our system demonstrated an impressive success rate of 99.99% on API requests during the Bangmod Hackathon 2024, showcasing the robustness and reliability of our platform even under high traffic conditions.

(The CPU spikes when we access Grafana and query metrics because we have only one VM, with all services running on the same server)

Contribution

There are many ways in which you can participate in this project, for example:

  • Submit bugs and feature requests.
  • Fixing issues and contributing directly to the code base by submitting pull requests.

Supporters

  

License

Copyright (c) Vectier. All rights reserved.

About

🚀 An open-source Coding Platform (Beta)

codern.app

Topics

autograderclean-architecturefibergolang

Resources

Readme

Code of conduct

Code of conduct

Security policy

Security policy
Activity
Custom properties

Stars

29 stars

Watchers

2 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.