狭义的 Servlet 是指 Java 语言中的一个接口,广义的 Servlet 是指任何实现了这个 Servlet 接口的类,一般情况下,人们将 Servlet 理解为后者。
more >>🐒 Software engineer | 📷Photographer | 👹Urban explorer
狭义的 Servlet 是指 Java 语言中的一个接口,广义的 Servlet 是指任何实现了这个 Servlet 接口的类,一般情况下,人们将 Servlet 理解为后者。
more >>DB 索引数据的存储方式 - 聚集索引(Clustered Index)与非聚集索引(Non-clustered Index)
聚集索引(clustered index),也称为聚簇索引。
聚簇索引并不是一种单独的索引类型,而是一种索引数据的存储方式。
当表有聚簇索引时,它的行数据实际上存储在索引的叶子页(leaf page)中。因为无法同时把数据行存放在两个不同的地方,所以一张表只能有一个聚簇索引。
more >>1 | >>> paras = {u'name': u'\U0001f600'} |
通过 ORM 插入一条数据,在其中的一个类型为 varchar 的字段中插入一个 Emoji 表情,我插的是😀(对应的字符串为 u'\U0001f600'
),插入后:提示以下错误:
1 | {InternalError}(1366, u"Incorrect string value: '\\xF0\\x9F\\x98\\x80' for column 'name' at row 1") |
MySQL 有两种存储引擎(Storage Engines):
MyISAM 不支持聚簇索引,因此,MyISAM 中的主键索引(Primary Index) 和辅助索引(Secondary Index),都是非聚集索引(Non-clustered Index)。
在 MyISAM 的 B+Tree 的叶子节点上的 data 域中,并不是保存数据本身,而是保存数据存放在磁盘中的地址。
more >>当客户端发出一个 HTTP 请求后,是如何转到我们的应用程序处理并返回的呢?
我根据其架构组成的不同将这个过程的实现分为两种情况:
在两级结构中:
当有客户端发来请求,uWSGI 接受请求,调用 WSGI Application (或者说 Flask 应用)。当 WSGI Application 处理完成后,将结果返回给 uWSGI,uWSGI 构造相应的 HTTP Response,最终将结果返回给客户端。
通常来说,Flask 等 Web 框架会自己附带一个 WSGI 服务器 (这就是 Flask 应用可以直接启动的原因),但是这只是在开发阶段被用到而言。在生产环境中,仍然需要将 Flask 部署到一个高性能的 WSGI Server 中,比如 uWSGI。
在三级结构中:
当有客户端发来请求,Nginx 先做处理静态资源(静态资源是 Nginx 的强项),无法处理的动态请求以 WSGI 协议的格式转发给 WSGI Application(比如一个 Flask Application)。
这里,我们多了一层反向代理有什么好处?
在网络刚刚盛行的年代(Web 1.0),绝大部分的 Web 资源都是静态的。这意味着,你访问 www.example.com/a.html,你就可以访问 a 页面,而如果访问
狭义的 Web Server(Web 服务器)概念中,Web Server 只能处理静态页面。
典型的 Web Server 的例子,就是 Apache HTTP Server,Nginx 还有 LightHttpd。
随着互联网的发展,我们更希望访问一个动态网站(Web 1.5),即可以根据用户传入的信息,动态地生成网页的内容。
这时候,我们就需要一个程序来帮忙处理动态请求(如返回特定用户的信息、获取当前时间等),而静态资源的请求,依然由 Web Server 来负责。
Web 服务器程序会将动态请求转发给帮助程序(helper application),帮助程序处理后,返回处理后的静态结果给 Web 服务器程序。这样,就避免了 Web 服务器程序需要处理动态页面的问题,如下图:
关于 Web Server(Web 服务器)、Web Application Server(Web 应用服务器)和 CGI(Common Gateway Interface)的区别,可以访问【HTTP】Web Server(Web 服务器)、Web Application Server(Web 应用服务器)和 CGI(Common Gateway Interface)的故事 。
WSGI 是 Web Server Gateway Interface 的缩写。
它不是服务器、Python 模块、框架、API 或者任何软件,而是一种描述 Web 服务器(如 nginx,uWSGI 等服务器)如何与 Web application(Web 应用程序,如用 Django、Flask 框架编写的程序)通信的规范。
因此,WSGI 是一种规范,或者说一种接口,或者说一种协议。
WSGI 是在 PEP 333 提出的,并在 PEP 3333 进行补充(主要是为了支持 Python3.x)。
这个协议旨在解决众多 Python Web 框架和 Web server 软件的兼容问题。有了 WSGI,你不用再因为你使用特定的 Web 应用框架而不得不选择特定的 Web server 软件。
只要遵照了 WSGI 协议的的 Web 应用(Web application,我们称之为 WSGI 应用),都可以在任何遵照了 WSGI 协议的 Web server 软件(我们称之为 WSGI server,比如 uWSGI)上运行。
常用的 WSGI server(WSGI 服务器)软件:wsgiref,uWSGI,Gunicorn 等
而对于 WSGI 应用(WSGI Application),我们理论上可以完全自己从头编写一个 WSGI 应用,但是,我们通常会使用 WSGI 应用框架(WSGI Application Framework),或者称为 WSGI MiddleWare,比如 Django,Flask 等,因为框架已经帮我们封装了大量的底层逻辑,而让我们可以更好的专注于业务逻辑上。
为了更好的理解 WSGI 应用(WSGI Application),我们接下来会写一个非常原始的 WSGI 应用。
more >>If service can not handle request for internal error or upstream error, it should response proper error information to client.
Service should write log for every error return.
The error response structure should be consistent for all APIs in one service.
tag:
缺失模块。
1、在博客根目录(注意不是 yilia 根目录)执行以下命令:
npm i hexo-generator-json-content --save
2、在根目录_config.yml 里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: true raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true
2020-08-22
#Microservices
2020-08-22
#Golang
2020-08-15
#Golang
2020-08-09
#Linux
2020-08-09
#Python
2020-08-09
#Python
2020-08-09
#hugo
2020-08-09
#Python
2020-08-06
#Python
2020-08-06
#Python
2020-08-02
#Golang
2020-08-02
#Golang
2020-08-02
#Golang
2020-08-02
#Golang
2020-08-02
#Golang
2020-08-02
#Golang
2020-07-31
#Protobuf
2020-07-31
#Protobuf
2020-07-31
#Golang
2020-07-29
#Protobuf
2020-07-28
#Protobuf
2020-07-28
#Linux
2020-07-26
#Microservices
2020-07-26
#Microservices
2020-07-26
#VPN
2020-07-26
#Microservices
2020-07-25
#ZooKeeper
2020-07-25
#ZooKeeper
2020-07-25
#Java
2020-07-25
#Cache System#Redis#Codis
2020-07-23
#Golang
2020-07-23
#Performancede
2020-07-23
#Performance
2020-07-23
#Linux
2020-07-22
#Performance
2020-07-22
#Performance
2020-07-22
#Performance
2020-07-22
#Performance
2020-07-15
#Software Testing
2020-07-15
#Software Testing
2020-07-12
#Protobuf
2020-07-10
#Cache System#Redis
2020-07-10
#Cache System#Redis
2020-07-10
#Cache System#Redis#Codis
2020-07-09
#Mattermost
2020-07-07
#ELK
2020-07-06
#Lucene
2020-07-06
#MySQL
2020-07-06
#Golang
2020-07-06
#Golang
2020-07-06
#Git
2020-07-06
#Golang
2020-07-06
#Golang
2020-07-06
#Golang
2020-07-03
#OpenWrt
2020-06-27
#Network
2020-06-27
#macOS
2020-06-27
#Network
2020-06-27
#Vmware
2020-06-21
#OpenWrt
2020-06-20
#Network
2020-06-20
#Linux
2020-06-20
#Linux
2020-06-20
#Linux
2020-06-20
#OpenWrt
2020-06-14
#Golang
2020-06-13
#hexo
2020-06-13
#Linux
2020-06-13
#Linux
2020-06-13
#Linux
2020-06-13
#Linux
2020-06-13
#Linux
2020-05-24
#Golang
2020-05-24
#Redis
2020-05-24
#Docker
2020-05-24
#macOS
2020-05-23
#Docker
2020-05-12
#Cache System#Redis#Codis
2020-05-09
#Redis
2020-05-09
#Redis
2020-05-09
#Redis
2020-05-07
#Redis
2020-05-07
#Redis
2020-05-07
#Redis
2020-05-07
#Redis
2020-05-05
#Linux
2020-05-05
#WordPress
2020-05-05
#AWS
2020-05-05
#Compile
2020-05-01
#Linux
2020-04-26
#Linux
2020-04-25
#Linux
2020-04-25
#MySQL
2020-04-21
#Architecture
2020-04-21
#MySQL
2020-04-21
#Redis
2020-04-21
#Redis
2020-04-21
#Linux
2020-04-12
#MySQL
2020-04-11
#Architecture
2020-04-11
#Distributed System
2020-04-11
#Network
2020-03-30
#Golang
2020-03-29
#MySQL
2020-03-29
#MySQL
2020-03-29
#MySQL
2020-03-29
#MySQL
2020-03-22
#Golang
2020-03-22
#Golang
2020-03-22
#Netwok
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-03-15
#Golang
2020-02-09
#Hardware
2020-01-31
#MySQL
2020-01-31
#MySQL
2020-01-31
#MySQL
2020-01-30
#Golang
2020-01-30
#Golang
2020-01-30
#Golang
2020-01-30
#Linux
2020-01-29
#Protobuf
2020-01-29
#Golang
2020-01-29
#RaspbeeryPi
2020-01-29
#Network
2020-01-12
#Golang
2020-01-12
#Golang
2020-01-12
#Golang
2020-01-12
#Golang
2020-01-12
#Golang
2020-01-12
#Golang
2020-01-12
#Golang
2020-01-12
#Golang
2020-01-12
#Golang
2020-01-12
#Format
2019-12-09
#Software Testing
2019-12-09
#Linux
2019-12-06
#Python
2019-12-01
#Python
2019-12-01
#Python
2019-12-01
#WordPress
2019-11-28
#Python
2019-11-26
#SQL
2019-11-26
#Python
2019-11-24
#Python
2019-11-23
#Python
2019-11-18
#Python
2019-11-18
#Python
2019-11-17
#Django
2019-11-17
#Django
2019-11-17
#Django
2019-11-17
#Django
2019-11-17
#MySQL
2019-11-17
#Python
2019-11-16
#Python
2019-11-13
#Django
2019-11-10
#Architectural Pattern
2019-11-10
#Distributed System
2019-11-10
#hexo
2019-11-10
#JQuery
2019-11-10
#Python
2019-11-10
#Python
2019-11-10
#Django
2019-11-10
#Django
2019-11-10
#Django
2019-11-10
#Django
2019-11-10
#Django
2019-11-10
#Django
2019-11-10
#Django
2019-11-06
#macOS
2019-11-05
#Django
2019-11-04
#Python
2019-11-04
#MySQL
2019-11-01
#Python
2019-11-01
#Python
2019-11-01
#Python
2019-11-01
#Python
2019-11-01
#Python
2019-11-01
#Python
2019-11-01
#Python
2019-11-01
#Python
2019-11-01
#Java EE
2019-10-31
#Database
2019-10-31
#Django
2019-10-31
#MySQL
2019-10-28
#Nginx#Django
2019-10-28
#HTTP#Network
2019-10-28
#Python
2019-10-28
#Python
2019-10-28
#Architecture#ArchitectureDesign
2019-10-28
#Architecture#ArchitectureDesign
2019-10-28
#Architecture#ArchitectureDesign
2019-10-28
#Django#Redis
2019-10-28
#Redis
2019-10-27
#Python
2019-10-27
#Redis
2019-10-27
#Redis
2019-10-27
#Python
2019-10-27
#Python
2019-10-20
#Python
2019-10-20
#Django
2019-10-20
#Python
2019-10-20
#Django
2019-10-20
#HTTP
2019-10-20
#Python
2019-10-20
#Python
2019-10-20
#Django
2019-10-20
#MySQL#SQL
2019-10-20
#MySQL
2019-10-19
#Django
2019-10-19
#Django
2019-10-19
#Software Testing
2019-10-19
#Nginx#macOS
2019-10-19
#Node.js#nvm
2019-10-08
#Django
2019-10-08
#Python
2019-10-08
#Django
2019-10-06
#Python
2019-10-06
#Python
2019-10-06
#Python
2019-10-06
#MySQL
2019-09-24
#Python
2019-09-24
#Python
2019-09-23
#Python
2019-09-23
#Python
2019-09-23
#Python
2019-09-23
#Python
2019-09-17
#Linux
2019-09-17
#Linux
2019-09-16
#Linux
2019-08-26
#HTTP
2019-08-26
#HTTP
2019-08-22
#SQL
2019-08-22
#SQL
2019-08-21
#Network
2019-08-16
#Algorithm
2019-08-15
#Markdown
2019-08-14
#Java
2019-08-14
#Java
2019-08-13
#Algorithm
2019-08-08
#Linxu
2019-08-08
#Python
2019-08-06
#Python
2019-08-06
#Python
2019-08-06
#Architecture
2019-08-06
#Architecture
2019-08-05
#Algorithm
2019-08-05
#Algorithm
2019-08-05
#Algorithm
2019-08-05
#Architecture
2019-08-04
#Microservices
2019-08-04
#Distributed System#Microservices
2019-08-04
#Docker
2019-08-04
#Performance
2019-08-02
#Java
2019-08-02
#Linux
2019-08-01
#Linux
2019-08-01
#Distributed System
2019-08-01
#Data Structure
2019-08-01
#Distributed System
2019-07-31
#Microservices
2019-07-31
#Spring
2019-07-31
#Database
2019-07-31
#Data Structure
2019-07-30
#Algorithm
2019-07-30
#Algorithm
2019-07-30
#Java
2019-07-30
#Algorithm
2019-07-29
#Data Structure
2019-07-29
#Algorithm
2019-07-29
#Algorithm
2019-07-29
#Algorithm
2019-07-27
#Algorithm
2019-07-26
#Distributed System
2019-07-25
#Algorithm
2019-07-24
#Netwrok
2019-07-24
#LaTeX
2019-07-18
#Linux#Operating Systems
2019-07-16
#Java
2019-07-15
#Algorithm#Operating System
2019-07-15
#HTTP#Network
2019-07-12
#Database
2019-07-12
#Distributed System
2019-07-12
#Distributed System
2019-07-12
#Distributed System
2019-07-12
#Java
2019-07-12
#Java
2019-07-12
#Java#Lock
2019-07-11
#Distributed System
2019-07-11
#Distributed System
2019-07-11
#Operating System
2019-07-11
#Java
2019-07-10
#Java#Network Programming
2019-07-10
#Regular Expression
2019-07-10
#Java EE
2019-07-10
#Operating System
2019-07-10
#Distributed System
2019-07-10
#Microservices
2019-07-10
#Java
2019-07-10
#Linux
2019-07-09
#Database
2019-07-09
#Operating System
2019-07-08
#Cache System
2019-07-05
#Algorithm
2019-07-05
#Algorithm
2019-07-05
#Algorithm
2019-07-05
#Algorithm
2019-07-05
#Algorithm
2019-07-05
#Algorithm Problem
2019-07-04
#Security
2019-07-03
#OOP
2019-06-28
#Java
2019-06-28
#Java
2019-06-27
#Algorithm
2019-06-26
#Algorithm
2019-06-25
#Algorithm
2019-06-25
#Algorithm
2019-06-25
#Algorithm
2019-06-25
#Algorithm
2019-06-19
#Interview
2019-06-19
#Network
2019-06-14
#Data Structure
2019-06-14
#Data Structure
2019-06-13
#Data Structure
2019-06-10
#Database
2019-06-10
#Database
2019-06-05
#Data Structure
2019-06-04
#Data Structure
2019-06-04
#Data Structure
2019-06-03
#Algorithm
2019-05-31
#Network
2019-05-30
#Data Structure
2019-05-30
#Data Structure
2019-05-30
#Data Structure
2019-05-30
#Data Structure
2019-05-30
#Data Structure
2019-05-29
#Data Structure
2019-05-29
#Data Structure
2019-05-28
#Data Structure
2019-05-27
#Data Structure
2019-05-27
#Data Structure
2019-05-27
#Network
2019-05-24
#Data Structure
2019-05-24
#Data Structure
2019-05-24
#Data Structure
2019-05-23
#Algorithm
2019-05-22
#Algorithm
2019-05-21
#Data Structure
2019-05-21
#Data Structure
2019-05-17
#Data Structure
2019-05-16
#Java
2019-05-16
#Data Structure
2019-05-16
#Java
2019-05-16
#Data Structure
2019-05-16
#Data Structure
2019-05-16
#Java
2019-05-16
#Data Structure
2019-05-15
#Java
2019-05-15
#Data Structure
2019-05-15
#Algorithm
2019-05-14
#Data Structure
2019-05-14
#Data Structure
2019-05-14
#Data Structure
2019-05-14
#Algorithm Problem
2019-05-14
#Algorithm
2019-05-13
#Algorithm
2019-05-13
#Security
2019-05-13
#Security
2019-05-13
#Security
2019-05-13
#Security
2019-05-08
#HTTP#Network
2019-05-08
#Network
2019-05-08
#Network
2019-05-08
#Network
2019-05-08
#Network
2019-05-07
#Network
2019-05-06
#Network
2019-05-06
#Network
2019-05-03
#Network
2019-05-03
#Network
2019-05-03
#Network
2019-04-09
#Design Pattern
2019-04-08
#Spring
2019-04-08
#Spring
2019-04-05
#Design Pattern
2019-04-02
#Java
2019-04-02
#Java
2019-04-02
#Java
2019-04-02
#Java
2019-04-01
#Java
2019-04-01
#Java
2019-04-01
#Java
2019-04-01
#Java
2019-04-01
#Java
2019-04-01
#Java
2019-04-01
#OOP
2019-03-29
#Java
2019-03-29
#Java
2019-03-28
#Java
2019-03-28
#Java
2019-03-27
#Java
2019-03-26
#Java
2019-03-26
#Java
2019-03-26
#Java
2019-03-26
#Java
2019-03-26
#Java
2019-03-26
#Java
2019-03-19
#Java
2019-03-18
#Java
2019-03-18
#Java
2019-03-18
#Java
2019-03-18
#Java
2019-03-18
#Java
2019-03-18
#Java
2019-03-15
#Java
2019-03-15
#Java
2019-03-15
#Java
2019-03-15
#Java
2019-03-15
#Java
2019-03-15
#Java
2019-03-15
#Java
2019-03-14
#Java
2019-03-14
#Java
2019-03-14
#Java
2019-03-13
#Java
2019-03-12
#Java
2019-03-11
#Java
2019-03-11
#Java
2019-03-11
#Java
2019-03-08
#Java
2019-03-07
#Java
2019-03-07
#Java
2019-03-06
#Java
2019-03-06
#Java
2019-03-06
#Java
2019-03-06
#Java
2019-03-06
#Java
2019-03-05
#Java
2019-03-04
#Java
2019-03-04
#Java
2019-03-04
#Java#Network Programming
2019-03-04
#Java
2019-03-03
#Java
2019-03-03
#Java
2019-03-02
#Java
2019-03-01
#Java
2019-03-01
#Java#Lock
2019-02-28
#Java
2019-02-28
#Java
2019-02-28
#Java
2019-02-28
#Java
2019-02-27
#Java
2019-02-27
#Java
2019-02-27
#Java
2019-02-27
#Java
2019-02-27
#Java
2019-02-26
#Java
2019-02-26
#Network#Network Programming
2019-02-25
#Java
2019-02-25
#Java
2019-02-25
#Operating System
2019-02-25
#Java
2019-02-25
#Lock
2019-02-25
#Java
2019-02-22
#Operating System
2019-02-21
#Database
2019-02-19
#Programming
2019-02-17
#Operating System
2019-02-14
#Operating System
2019-02-14
#Operating System
2019-02-13
#Operating System
2019-02-10
#Operating Systems
2019-02-02
#Linux
2019-02-01
#Java
2019-01-31
#Java
2019-01-31
#Java
2019-01-31
#Java
2019-01-31
#Linux
2019-01-30
#Linux
2019-01-30
#Linux
2019-01-30
#Network
2019-01-30
#Linux
2019-01-30
#Network
2019-01-30
#OpenWrt
2019-01-20
#Network#Network Programming
2019-01-19
#Linux#Operating System
2019-01-18
#Java
2019-01-18
#Architecture#Nginx
2019-01-17
#Node.js
2019-01-10
#Linux
2019-01-09
#Distributed System
2019-01-09
#Distributed System
2019-01-09
#Distributed System
2019-01-08
#Distributed System
2019-01-08
#Distributed System
2019-01-07
#OOP
2019-01-07
#Distributed System
2019-01-06
#Network
2019-01-06
#Cache System#Redis
2018-11-12
#WordPress
2018-11-12
#Docker
2018-11-12
#Java
2018-11-12
#Node.js
2018-11-12
#Node.js
2018-11-12
#Linux
2018-11-12
#Architectural Pattern
2018-11-12
#Design Pattern
2018-11-12
#Design Pattern
2018-11-12
#Design Pattern
2018-11-11
#Design Pattern
2018-11-11
#Design Pattern
2018-11-11
#Design Pattern
2018-11-11
#Architectural Pattern
2018-11-11
#Java
2018-11-11
#Java
2018-11-11
#JavaScript
2018-11-11
#Python
2018-11-11
#iOS
2018-11-11
#Design Pattern
2018-11-11
#Design Pattern
2018-11-11
#Design Pattern
2018-11-11
#Design Pattern
2018-11-11
#Design Pattern
2018-11-11
#Design Pattern
2018-11-10
#Markdown
2018-11-06
#Linux
2018-11-06
#Operating System
2018-11-06
#Node.js
2018-11-05
#Linux
2018-02-24
#SQL
2018-02-24
#SQL
2018-02-24
#WordPress
2018-02-24
#WordPress
2018-02-24
#OOP
2018-02-23
#MySQL
2018-02-23
#MySQL
2018-02-23
#Java
2018-02-23
#macOS
2018-02-23
#Java
2018-02-23
#Security
2018-02-23
#OOP
2018-02-23
#Operating System
2018-02-23
#C#
2018-02-23
#C#
2018-02-23
#Programming
2018-02-23
#Software Testing
2017-09-27
#iOS
2017-09-27
#Linux
2017-09-26
#Linux
2017-09-08
#Linux
2017-09-08
#Nginx
2017-06-08
#Java
2017-06-08
#Windows
2017-06-04
#Java
2017-06-04
#Network
2017-06-04
#Network
2017-06-04
#Network
2017-06-04
#Java
2017-05-15
#iOS
2017-04-30
#Hardware
2017-04-30
#iOS
2017-04-25
#Linux
2017-04-25
#Linux
2017-04-24
#Linux
2017-04-13
#VMware
2017-04-13
#Linux
2017-04-13
#VMware
2017-04-09
#JavaScript#Software Testing
2017-04-09
#Linux
2017-04-09
#Node.js#npm
2017-04-04
#Network
2017-04-03
#C##Debug#Visual Studio
2017-04-03
#Git#Version Control
2017-04-02
#Software Testing
2017-04-01
#JavaScript#Data Format
2017-03-31
#JavaScript
2017-03-31
#HTTP
2017-03-13
#macOS#VMware
2017-03-12
#SQL
2017-03-11
#Node.js#NPM
2017-03-02
#Frontend#Cache#Browser
2017-03-02
#Debug#TypeScript