Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more link [ENG DOCS] #79

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ENG/ENG-01-Overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN//CHN/CHN-01-概述)
##### Other languages: [简体中文](/CHN/CHN-01-概述)

**Drogon** is a C++17/20-based HTTP application framework. Drogon can be used to easily build various types of web application server programs using C++.

Expand Down Expand Up @@ -31,4 +31,4 @@ Its main features are as follows:
* Support plugins which can be installed by the configuration file at load time;
* Support AOP with build-in joinpoints.

# Next: [Install drogon](/ENG//ENG//ENG/ENG-02-Installation)
# Next: [Install drogon](/ENG/ENG-02-Installation)
4 changes: 2 additions & 2 deletions ENG/ENG-02-Installation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN//CHN/CHN-02-安装)
##### Other languages: [简体中文](/CHN/CHN-02-安装)

This section takes Ubuntu 18.04, CentOS 7.5, MacOS 12.2 as an example to introduce the installation process. Other systems are similar;

Expand Down Expand Up @@ -481,4 +481,4 @@ Assuming that the above environment and library dependencies are all ready, the
target_link_libraries(${PROJECT_NAME} PRIVATE drogon)
```

# Next: [Quick Start](/ENG//ENG//ENG/ENG-03-Quick-Start)
# Next: [Quick Start](/ENG/ENG-03-Quick-Start)
4 changes: 2 additions & 2 deletions ENG/ENG-03-Quick-Start.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN//CHN/CHN-03-快速开始)
##### Other languages: [简体中文](/CHN/CHN-03-快速开始)

## Static Site

Expand Down Expand Up @@ -194,4 +194,4 @@ We see that adding a controller to an application is very simple. You only need

> **Note: Drogon has no restrictions on the location of the controller source files. You could also save them in "./" (the project root directory), or you could even define a new directory in `CMakeLists.txt`. It is recommended to use the controllers directory for the convenience of management.**

# Next: [drogon_ctl Command](/ENG//ENG/ENG-04-0-Controller-Introduction)
# Next: [drogon_ctl Command](/ENG/ENG-04-0-Controller-Introduction)
4 changes: 2 additions & 2 deletions ENG/ENG-04-0-Controller-Introduction.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-04-控制器-简介)
##### Other languages: [简体中文](/CHN/CHN-04-0-控制器-简介)

The controller is very important in web application development. This is where we will define our URLs, which HTTP methods are allowed, which [filters](/ENG//ENG/ENG-06-Middleware-and-Filter) will be applied and how requests will be processed and responded to. The drogon framework has helped us to handle the network transmission, Http protocol analysis and so on. We only need to pay attention to the logic of the controller; each controller object can have one or more processing functions (generally called handlers), and the interface of the function is generally defined as follows:

Expand Down Expand Up @@ -33,4 +33,4 @@ public:

A controller registered to a drogon framework will have at most only one instance and will not be destroyed during the entire application run, so users can declare and use member variables in the controller class. Note that when the handler of the controller is called, it is in a multi-threaded environment (when the number of IO threads of the framework is configured to be greater than 1), if you need to access non-temporary variables, please do the concurrent protection work.

# Next: [HttpSimpleController](/ENG//ENG/ENG-04-1-Controller-HttpSimpleController)
# Next: [HttpSimpleController](/ENG/ENG-04-1-Controller-HttpSimpleController)
4 changes: 2 additions & 2 deletions ENG/ENG-04-1-Controller-HttpSimpleController.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-04-1-控制器-HttpSimpleController)
##### Other languages: [简体中文](/CHN/CHN-04-1-控制器-HttpSimpleController)

You could use the `drogon_ctl` command line tool to quickly generate custom controller class source files based on `HttpSimpleController`. The command format is as bellow:

Expand Down Expand Up @@ -64,4 +64,4 @@ You could define an HttpResponse class variable, and then use the callback() to

> **The mapping from the above path to the handler is done at compile time. In fact, the drogon framework also provides an interface for runtime completion mapping. The runtime mapping allows the user to map or modify the mapping through configuration files or other user interfaces without recompiling this program (For performance reasons, it is forbidden to add any controller mapping after running the app().run() method).**

# Next: [HttpController](/ENG//ENG/ENG-04-2-Controller-HttpController)
# Next: [HttpController](/ENG/ENG-04-2-Controller-HttpController)
4 changes: 2 additions & 2 deletions ENG/ENG-04-2-Controller-HttpController.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-04-2-控制器-HttpController)
##### Other languages: [简体中文](/CHN/CHN-04-2-控制器-HttpController)

### Generation

Expand Down Expand Up @@ -279,4 +279,4 @@ Each `HttpController` class can define many Http request handlers. Since the num

> **It should be noted that when using regular expressions, you should pay attention to matching conflicts (multiple different handlers are matched). When conflicts happen in the same controller, drogon will only execute the first handler (the one registered in the framework first). When conflicts happen between different controllers, it is uncertain which handler will be executed. Therefore, users need to avoid these conflicts.**

# Next: [WebSocketController](/ENG//ENG/ENG-04-3-Controller-WebSocketController)
# Next: [WebSocketController](/ENG/ENG-04-3-Controller-WebSocketController)
4 changes: 2 additions & 2 deletions ENG/ENG-04-3-Controller-WebSocketController.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-04-3-控制器-WebSocketController)
##### Other languages: [简体中文](/CHN/CHN-04-3-控制器-WebSocketController)

As the name implies, `WebSocketController` is used to process websocket logic. Websocket is a persistent HTTP-based connection scheme. At the beginning of the websocket, there is an HTTP format request and response exchange. After the websocket connection is established, all messages are transmitted on the websocket. The message is wrapped in a fixed format. There is no limit to the message content and the order in which messages are transmitted.

Expand Down Expand Up @@ -150,4 +150,4 @@ void EchoWebsock::handleConnectionClosed(const WebSocketConnectionPtr &wsConnPtr
any *getMutableContext();
```

# Next: [Middleware and Filter](/ENG//ENG/ENG-05-Middleware-and-Filter)
# Next: [Middleware and Filter](/ENG/ENG-05-Middleware-and-Filter)
4 changes: 2 additions & 2 deletions ENG/ENG-05-Middleware-and-Filter.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-05-中间件和过滤器)
##### Other languages: [简体中文](/CHN/CHN-05-中间件和过滤器)

In HttpController's [example](/ENG//ENG/ENG-04-2-Controller-HttpController), the getInfo method should check whether the user is logged in before returning the user's information. We can write this logic in the getInfo method, but obviously, checking the user's login membership is general logic which will be used by many interfaces, it should be extracted separately and configured before calling handler, which is what filters do.

Expand Down Expand Up @@ -100,4 +100,4 @@ Drogon contains the following common filters:

> **Note: If the middleware/filter is defined in the namespace, you must write the namespace completely when you register it.**

# Next: [View](/ENG//ENG/ENG-06-View)
# Next: [View](/ENG/ENG-06-View)
4 changes: 2 additions & 2 deletions ENG/ENG-06-View.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-06-视图)
##### Other languages: [简体中文](/CHN/CHN-06-视图)

### Views Introduction

Expand Down Expand Up @@ -151,4 +151,4 @@ Obviously, this function depends on the development environment. If both drogon

> **Note: If a `symbol not found` error occurs while loading a dynamic view, please use the `cmake .. -DCMAKE_ENABLE_EXPORTS=on` to configure your project, or uncomment the last line (`set_property(TARGET ${PROJECT_NAME} PROPERTY ENABLE_EXPORTS ON)`) in your project's CMakeLists.txt, and then rebuild the project**

# Next: [Session](/ENG//ENG/ENG-07-Session)
# Next: [Session](/ENG/ENG-07-Session)
4 changes: 2 additions & 2 deletions ENG/ENG-07-Session.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-07-会话)
##### Other languages: [简体中文](/CHN/CHN-07-会话)

`Session` is an important concept of the web application. It is used to save the state of the client on the server. Generally, it cooperates with the browser's `cookie`, and drogon provides support for the session. Drogon **close** the session selection by default, you can also close or open it through the following interface:

Expand Down Expand Up @@ -96,4 +96,4 @@ drogon::HttpAppFramework::instance().enableSession(1200);

Recompile the entire project with CMake, run the target program webapp, and you can see the effect through the browser.

# Next: [Database](/ENG//ENG/ENG-08-0-Database-General)
# Next: [Database](/ENG/ENG-08-0-Database-General)
4 changes: 2 additions & 2 deletions ENG/ENG-08-0-Database-General.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-08-0-数据库-概述)
##### Other languages: [简体中文](/CHN/CHN-08-0-数据库-概述)

### General

Expand All @@ -24,4 +24,4 @@ The transaction object can be generated by `DbClient` to support transaction ope

Drogon also provides support for **ORM**. Users can use the drogon_ctl command to read the tables in the database and generate the corresponding model source code. Then, execute the database operations of these models through the `Mapper<MODEL>` class template. Mapper provides simple and convenient interfaces for standard database operations, allowing users to make the additions, deletions, and changes to the table without writing sql statements. For **ORM**, please refer to [ORM](/ENG//ENG/ENG-08-3-Database-ORM)

# Next: [DbClient](/ENG//ENG/ENG-08-1-Database-DbClient)
# Next: [DbClient](/ENG/ENG-08-1-Database-DbClient)
4 changes: 2 additions & 2 deletions ENG/ENG-08-1-Database-DbClient.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-08-1-数据库-DbClient)
##### Other languages: [简体中文](/CHN/CHN-08-1-数据库-DbClient)

### DbClient Object Construction

Expand Down Expand Up @@ -253,4 +253,4 @@ Each DbClient object has one or multiple its own EventLoop threads controlling t

Blocking interfaces of DbClient only block the caller thread, as long as the caller thread is not the EventLoop thread, it will not affect the normal operation of the EventLoop thread. When the callback function is called, the program inside the callback is run on the EventLoop thread. Therefore, do not perform any blocking operations within the callback, otherwise it will affect the concurrency performance of database read and write. Anyone familiar with non-blocking I/O programming should understand this constraint.

# Next: [Transaction](/ENG//ENG/ENG-08-2-Database-Transaction)
# Next: [Transaction](/ENG/ENG-08-2-Database-Transaction)
4 changes: 2 additions & 2 deletions ENG/ENG-08-2-Database-Transaction.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-08-2-数据库-事务)
##### Other languages: [简体中文](/CHN/CHN-08-2-数据库-事务)

> **Transactions** are an important feature of relational databases, and Drogon provides transaction support with the `Transaction` class.

Expand Down Expand Up @@ -83,4 +83,4 @@ For the simplest example, suppose there is a task table from which the user sele

In this case, select for update is used to avoid concurrent modifications. The update statement is completed in the result callback of the select statement. The outermost braces are used to limit the scope of the transPtr so that it can be destroyed in time after the execution of sql to end the transaction.

# Next: [ORM](/ENG//ENG/ENG-08-3-Database-ORM)
# Next: [ORM](/ENG/ENG-08-3-Database-ORM)
4 changes: 2 additions & 2 deletions ENG/ENG-08-3-Database-ORM.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-08-3-数据库-ORM)
##### Other languages: [简体中文](/CHN/CHN-08-3-数据库-ORM)

### Model

Expand Down Expand Up @@ -286,4 +286,4 @@ drogon_ctl can also generate restful-style controllers for each model (or table)

It should be noted that the controller of each table is designed to be composed of a base class and a subclass. Among them, the base class and the table are closely related, and the subclass is used to implement special business logic or modify the interface format. The advantage of this design is that when the table structure changes, users can update only the base class without overwriting the subclass(by setting the `generate_base_only` option to `true`).

# Next: [FastDbClient](/ENG//ENG/ENG-08-4-Database-FastDbClient)
# Next: [FastDbClient](/ENG/ENG-08-4-Database-FastDbClient)
4 changes: 2 additions & 2 deletions ENG/ENG-08-4-Database-FastDbClient.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-08-4-数据库-FastDbClient)
##### Other languages: [简体中文](/CHN/CHN-08-4-数据库-FastDbClient)

As the name implies, FastDbClient will provide higher performance than the normal DbClient. Unlike DbClient has own event loop, it shares the event loop with network IO threads and the main thread of the web application, which makes the internal implementation of FastDbClient available in a lock-free mode and more efficient.

Expand Down Expand Up @@ -30,4 +30,4 @@ The use of FastDbClient is almost identical to that of the normal DbClient, exce
- Synchronous transaction creation interfaces are likely to block (when all connections are busy), so FastDbClient's synchronous transaction creation interface returns null pointers directly. If you want to use transactions on FastDbClient, please use the asynchronous transaction creation interface.
- After using the FastDbClient to create an Orm Mapper object, you should also use only asynchronous non-blocking interfaces of the mapper object.

# Next: [Automatic batch mode](/ENG//ENG/ENG-08-5-Database-auto_batch)
# Next: [Automatic batch mode](/ENG/ENG-08-5-Database-auto_batch)
4 changes: 2 additions & 2 deletions ENG/ENG-08-5-Database-auto_batch.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-08-5-数据库-自动批处理)
##### Other languages: [简体中文](/CHN/CHN-08-5-数据库-自动批处理)

The automatic batch mode is only valid for the client library of postgresql 14+ version, and will be ignored in other cases. Before talking about automatic batch processing, let's understand the pipeline mode first.

Expand Down Expand Up @@ -33,4 +33,4 @@ Therefore, automatic batch mode is helpful to improve performance, but it is not
When using the newPgClient interface to create a client, set the third parameter to true to enable automatic batch mode;
When using a configuration file to create a client, set the auto_batch option to true to enable automatic batch mode for the client;

# Next: [Request References](/ENG//ENG/ENG-09-0-References-request)
# Next: [Request References](/ENG/ENG-09-0-References-request)
2 changes: 1 addition & 1 deletion ENG/ENG-09-0-References-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,4 @@ void mycontroller::postfile(const HttpRequestPtr &req, std::function<void (const
```
For more information about parsing file: [File Handler](/ENG//ENG/ENG-09-1-File-Handler)

# Next: [Plugins](/ENG//ENG/ENG-09-1-File-Handler)
# Next: [Plugins](/ENG/ENG-09-1-File-Handler)
2 changes: 1 addition & 1 deletion ENG/ENG-09-1-File-Handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,4 @@ File parsing is extracting the file (or files) from a multipart-data POST reques
}
```

# Next: [Plugins](/ENG//ENG/ENG-10-Plugins)
# Next: [Plugins](/ENG/ENG-10-Plugins)
4 changes: 2 additions & 2 deletions ENG/ENG-10-Plugins.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-09-插件)
##### Other languages: [简体中文](/CHN/CHN-09-插件)

Plugins are use to help users build complex applications. In Drogon, all plugins are built and installed into the application based on the configuration file. Plugins in Drogon are single-instance, and users can implement any functionality they want with plugins.

Expand Down Expand Up @@ -74,4 +74,4 @@ Note that it is best to get the plugin after calling the framework's run() inter

All plugins are initialized in the run() interface of the framework and are destroyed when the application exits. Therefore, the plugin's lifecycle is almost identical to the application, which is why the getPlugin() interface does not need to return a smart pointer.

# Next: [Configuration File](/ENG//ENG/ENG-11-Configuration-File)
# Next: [Configuration File](/ENG/ENG-11-Configuration-File)
4 changes: 2 additions & 2 deletions ENG/ENG-11-Configuration-File.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-10-配置文件)
##### Other languages: [简体中文](/CHN/CHN-10-配置文件)

You can control various behaviors of the Http server by configuring various parameters through multiple interfaces of the DrogonAppFramework instance. However, using a configuration file is a better way for the following reasons:

Expand Down Expand Up @@ -355,4 +355,4 @@ After commenting out a configuration option, the framework initializes it with d
"pipelining_requests": 0
```

# Next: [Aspect Oriented Programming (AOP)](/ENG//ENG/ENG-12-AOP-Aspect-Oriented-Programming)
# Next: [Aspect Oriented Programming (AOP)](/ENG/ENG-13-AOP-Aspect-Oriented-Programming)
4 changes: 2 additions & 2 deletions ENG/ENG-12-drogon_ctl-Command.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-11-drogon_ctl命令)
##### Other languages: [简体中文](/CHN/CHN-11-drogon_ctl命令)

After the **Drogon** framework is compiled and installed, it is recommended to create your first project using the command line program `drogon_ctl` which is installed alongside the framework, for convenience there is the shortened command `dg_ctl`. Users can choose according to their preferences.

Expand Down Expand Up @@ -169,4 +169,4 @@ dg_ctl press -n1000000 -t4 -c1000 -q http://localhost:8080/
dg_ctl press -n 1000000 -t 4 -c 1000 https://www.domain.com/path/to/be/tested
```

# Next: [Controller Introduction](/ENG//ENG/ENG-05-0-Controller-Introduction)
# Next: [Controller Introduction](/ENG/ENG-04-0-Controller-Introduction)
4 changes: 2 additions & 2 deletions ENG/ENG-13-AOP-Aspect-Oriented-Programming.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-12-AOP面向切面编程)
##### Other languages: [简体中文](/CHN/CHN-12-AOP面向切面编程)

AOP(Aspect Oriented Programming) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns(Quoted from Wikipedia).

Expand Down Expand Up @@ -30,4 +30,4 @@ The following figure shows the location of the above four joinpoints in the HTTP

![](images/AOP.png)

# 13 [Benchmarks](/ENG//ENG/ENG-13-Benchmarks)
# 13 [Benchmarks](/ENG/ENG-14-Benchmarks)
4 changes: 2 additions & 2 deletions ENG/ENG-14-Benchmarks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-13-性能测试)
##### Other languages: [简体中文](/CHN/CHN-13-性能测试)

As a C++ Http application framework, performance should be one of the focus of attention. This section introduces Drogon's simple tests and achievements;

Expand Down Expand Up @@ -47,4 +47,4 @@ The image below is a screenshot of a test:

![Test Result](images/benchmark.png)

# 14 [Causal profiling with coz](/ENG//ENG/ENG-14-Coz)
# 14 [Causal profiling with coz](/ENG/ENG-15-Coz)
4 changes: 2 additions & 2 deletions ENG/ENG-15-Coz.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-14-Coz分析)
##### Other languages: [简体中文](/CHN/CHN-14-Coz分析)

## Causal profiling with coz

Expand All @@ -23,4 +23,4 @@ For more information checkout:
* [Git repo](https://github.com/plasma-umass/coz)
* [Coz whitepaper](https://arxiv.org/pdf/1608.03676v1.pdf)

# 15 [Brotli compression](/ENG//ENG/ENG-15-Brotli)
# 15 [Brotli compression](/ENG/ENG-16-Brotli)
4 changes: 2 additions & 2 deletions ENG/ENG-16-Brotli.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-15-Brotli压缩)
##### Other languages: [简体中文](/CHN/CHN-15-Brotli压缩)

## Brotli Info

Expand All @@ -13,4 +13,4 @@ if you want to dynamically compress with brotli you'll have to set `use_brotli`
Users who don't intend to use brotli static, might want to get rid of brotli extra 'sibling check'
by setting `br_static` to `false` in `config.json`.

# 16 [Coroutines](/ENG//ENG/ENG-16-Coroutines)
# 16 [Coroutines](/ENG/ENG-17-Coroutines)
4 changes: 2 additions & 2 deletions ENG/ENG-17-Coroutines.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-16-协程)
##### Other languages: [简体中文](/CHN/CHN-16-协程)

Drogon supports [C++ coroutines][1] starting from version 1.4. They provide a way to flatten the control flow of asynchronous calls, i.e. escaping the callback hell. With it, asynchronous programming becomes as easy as synchronous programming.

Expand Down Expand Up @@ -166,4 +166,4 @@ There are some common pitfalls you may encounter when using coroutines.

[1]: https://en.cppreference.com/w/cpp/language/coroutines

# 17 [Redis](/ENG//ENG/ENG-17-Redis)
# 17 [Redis](/ENG/ENG-18-Redis)
4 changes: 2 additions & 2 deletions ENG/ENG-18-Redis.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##### Other languages: [简体中文](/CHN//CHN/CHN-17-Redis)
##### Other languages: [简体中文](/CHN/CHN-17-Redis)

Drogon supports Redis, a very fast, in-memory data store. Which could be used as a database cache or a message broker. Like everything in Drogon, Redis connections are asynchronous. Which ensures Drogon running with very high concurrency even under heavy load.

Expand Down Expand Up @@ -118,4 +118,4 @@ catch(const std::exception& e)
}
```

# 18 [Testing Framework](/ENG//ENG/ENG-18-Testing-Framework)
# 18 [Testing Framework](/ENG/ENG-19-Testing-Framework)
Loading