Online OJ platform project

1. Project source code

Online_Judge · yblhlk/Linux Course - Code Cloud - Open Source China (gitee.com)


2. Technology and development environment used

1. Technology used :

MVC Architecture Pattern (Model-View-Controller)

Load Balancing System Design

Multi-process, multi-thread programming

C++ Object Oriented Programming & C++ 11 & STL Standard Library

C++ Boost quasi-standard library

jsoncpp third-party open source serialization and deserialization library

cpp-httplib third-party open source network communication library

ctemplate third-party open source front-end web page rendering library

Ace front-end online editor

html/css/js/jQuery/ajax

Web service testing with Postman

2. Development environment

Centos 7.8 cloud server

VSCode

Google Chrome

Mysql Workbench


3. Project macro structure

I. Project module introduction

At the core of our project are two modules:

1. compile_server : Compile and run the module.

2. oj_server : file/database interaction, web page rendering, load balancing, and other functions.

II. Macro structure diagram of the project

III. Writing ideas

Adopt the idea of ​​​​realizing from the back end to the front end

1. Write compile_server first

2. oj_server

3. version1 file-based online OJ

4. Front-end page design

5. version2 MySQL-based online OJ

First write the overall structure (what functions are needed), and then implement the function details (including adjustment of return value and parameters)


Four, compiler_server directory

 1.compiler.hpp (compile module)

 2.runner.hpp (running module)

 3.compile_run.hpp (integrated module for compilation and operation)

 

 4.compile_server.cc (handle network requests for compiling and running code)

 

 5. Use Postman to test compile_server as a whole

Postman is a powerful tool for debugging web pages, sending HTTP requests and running interface test cases

Can simulate various HTTP Requests such as GET, POST, header, PUT, DELETE...etc

Files (pictures, text files, etc.), additional headers, etc. can also be sent in the request to implement specific interface tests

Can efficiently help back-end developers to independently test interfaces

PostMan - installation tutorial

You can also install the Postman plugin in chrome

How to make HTTPS request in Postman (baidu.com)


5. OJ_server directory

        To be continued...

Supongo que te gusta

Origin blog.csdn.net/look_outs/article/details/132482258
Recomendado
Clasificación