All Projects → lugnitdgp → Online-Judge

lugnitdgp / Online-Judge

Licence: other
Online Judge for hosting coding competitions inside NIT Durgapur made by GNU/Linux Users' Group!

Programming Languages

typescript
32286 projects
python
139335 projects - #7 most used programming language
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Online-Judge

Django Celery Tutorial
Django Celery Tutorial
Stars: ✭ 48 (+152.63%)
Mutual labels:  rabbitmq, celery
Enteletaor
Message Queue & Broker Injection tool
Stars: ✭ 139 (+631.58%)
Mutual labels:  rabbitmq, broker
Python Devops
gathers Python stack for DevOps, these are usually my basic templates use for my implementations, so, feel free to use it and evolve it! Everything is Docker!
Stars: ✭ 61 (+221.05%)
Mutual labels:  rabbitmq, celery
Letsmapyournetwork
Lets Map Your Network enables you to visualise your physical network in form of graph with zero manual error
Stars: ✭ 305 (+1505.26%)
Mutual labels:  rabbitmq, celery
Rusty Celery
🦀 Rust implementation of Celery for producing and consuming background tasks
Stars: ✭ 243 (+1178.95%)
Mutual labels:  rabbitmq, celery
Flower
Real-time monitor and web admin for Celery distributed task queue
Stars: ✭ 5,036 (+26405.26%)
Mutual labels:  rabbitmq, celery
Scaleable Crawler With Docker Cluster
a scaleable and efficient crawelr with docker cluster , crawl million pages in 2 hours with a single machine
Stars: ✭ 96 (+405.26%)
Mutual labels:  rabbitmq, celery
rabbit
Build Elixir applications with RabbitMQ
Stars: ✭ 36 (+89.47%)
Mutual labels:  rabbitmq, broker
Kombu
Kombu is a messaging library for Python.
Stars: ✭ 2,263 (+11810.53%)
Mutual labels:  rabbitmq, celery
Fastapi Celery
Minimal example utilizing fastapi and celery with RabbitMQ for task queue, Redis for celery backend and flower for monitoring the celery tasks.
Stars: ✭ 154 (+710.53%)
Mutual labels:  rabbitmq, celery
celery-priority-tasking
This is a prototype to schedule jobs in the backend based on some priority using Rabbitmq and Celery.
Stars: ✭ 28 (+47.37%)
Mutual labels:  rabbitmq, celery
python-asynchronous-tasks
😎Asynchronous tasks in Python with Celery + RabbitMQ + Redis
Stars: ✭ 37 (+94.74%)
Mutual labels:  rabbitmq, celery
pandora
Small box of pandora to prototype your app with ready for use backend. This is just my compilation of different solutions occasionally applied in hackathons and challenges
Stars: ✭ 26 (+36.84%)
Mutual labels:  rabbitmq, celery
Node Celery
Celery client for Node.js
Stars: ✭ 648 (+3310.53%)
Mutual labels:  rabbitmq, celery
celery-connectors
Want to handle 100,000 messages in 90 seconds? Celery and Kombu are that awesome - Multiple publisher-subscriber demos for processing json or pickled messages from Redis, RabbitMQ or AWS SQS. Includes Kombu message processors using native Producer and Consumer classes as well as ConsumerProducerMixin workers for relay publish-hook or caching
Stars: ✭ 37 (+94.74%)
Mutual labels:  rabbitmq, celery
Docker Cluster With Celery And Rabbitmq
Build Docker clusters with Celery and RabbitMQ in 10 minutes
Stars: ✭ 72 (+278.95%)
Mutual labels:  rabbitmq, celery
dbmq
Docker-based Message Queuing
Stars: ✭ 39 (+105.26%)
Mutual labels:  broker, celery
Django Celery Docker Example
Example Docker setup for a Django app behind an Nginx proxy with Celery workers
Stars: ✭ 149 (+684.21%)
Mutual labels:  rabbitmq, celery
celery-kubernetes-example
Small Flask app with scalable, asynchronous backend workers deployed on Kubernetes.
Stars: ✭ 79 (+315.79%)
Mutual labels:  rabbitmq, celery
leek
Celery Tasks Monitoring Tool
Stars: ✭ 77 (+305.26%)
Mutual labels:  rabbitmq, celery

logo

Django CI

Online-Judge

Port of the Online Judge in Python

Architecture

logo

Working

Initially the user chooses a language in the code editor and starts to write the answer based on the coding question. When the user submits the answer, the answer passes to the server. In the server a task id is being created in the PostgreSQL and the job is being sent to the RabbitMQ/Redis message queue. Then celery picks up the job and executes it in a sandbox environment which is developed using C. This helps to increase security and prevents malicious code injection attacks on the platform. When the job finishes execution the result is sent to the frontend using long poling. In this way the system verifies the users code, evaluate it and generates it ranking based on scores from other peers.

You can check out the code executor part of the project here.

Documentation to help with Celery

https://docs.celeryproject.org/en/stable/getting-started/next-steps.html#next-steps

Documentation to help setting up public PostgreSQL

https://blog.logrocket.com/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04/

Development Environment Config

This project uses PEP8 code style, please make sure to follow. Yapf is our preffered formatting tool. If you are using VSCode add the following in your settings.json

"python.formatting.provider": "yapf",
"python.formatting.yapfArgs": ["--style={based_on_style: pep8, indent_width: 4, column_limit: 120}"],
"python.linting.enabled": true

Message Broker setup

This project uses RabbitMQ as the primary option for implementing the message broker service. To set it up you need to have Docker on your system:

Instructions to set up Docker are here

To pull Rabbit mq, run sudo docker pull rabbitmq in the terminal.

We use the Management plugin version of RabbitMQ, so to do that run: sudo docker run -d -p 15672:15672 -p 5672:5672 -e RABBITMQ_DEFAULT_USER={{ your_custom_user }} -e RABBITMQ_DEFAULT_PASS={{ your_custom_password }} rabbitmq:3-management

Check the management console at http://host-ip:15672/ to see if the broker server is running fine.

This will generate a broker-url of the format amqp://{user}:{password}@{your_ip}:5672/. Add this as the CELERY_BROKER_URL in the .env file for the project as well as the executors.

Second alternative to RabbitMQ - REDIS - (long connections cause problem)

For the code execution part to function properly, you need to install a broker. Steps to install redis are as follows:

  1. sudo apt install redis-server
  2. sudo nano /etc/redis/redis.conf
  3. Inside the file find the supervised directive and change it to systemd. It should be set to no by default.
  ...
  supervised systemd
  ...
  1. sudo systemctl restart redis.service
  2. Add redis://localhost:6379 in the CELERY_BROKER_URL part of the .env file you have in your locally cloned repository.

To check if redis is working or not:

  1. Type in redis-cli
  2. Type ping
  3. If it returns PONG, then your redis-broker server is running fine.

Documentation to help setting up public Redis

https://linuxize.com/post/how-to-install-and-configure-redis-on-ubuntu-18-04/
https://www.w3resource.com/redis/redis-auth-password.php

To add Language models after running SQL migrations run

python manage.py loaddata --app interface language_model.json
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].