Using swoole+websocket and redis to realize web one-to-one chat
Redis implements that each service connected to websocket is bound to a unique user. Save to redis through user account = websocket fd.
mysql implements the offline message pool. If a user is not online, messages sent to him by other users are temporarily stored in mysql. When the user is online, it is taken out from the offline message pool an ...
Posted by Eal on Tue, 05 Nov 2019 06:13:55 -0800
Performance testing framework
Before, I wrote a performance testing framework, which is only for testing a single HTTP interface. The business interface and non HTTP interface can't be adapted yet. Just when the front-end time is used, I updated my testing framework. This time, it is no longer based on the request, but on the method, so that the singularity can be avoided. ...
Posted by adt2007 on Tue, 05 Nov 2019 02:05:48 -0800
springboot-006-SpringBoot and data access
1. JDBC
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</depend ...
Posted by ziv on Mon, 04 Nov 2019 08:11:34 -0800
With MySQL, what are the pits in SQL mode, do you know?
SQL MODE is a system variable in MySQL, which can be composed of multiple modes. Each MODE controls a behavior, such as whether to allow the divisor to be 0, and whether to allow the value of '0000-00-00' in the date.
Why should we pay attention to SQL mode?
First, look at three simple demos (MySQL 5.6).
1.
mysql> create table t1(c1 da ...
Posted by austrainer on Sun, 03 Nov 2019 17:44:30 -0800
Vue+Django 2.0.6 learning notes 5.10 drf filtering
Well, I've missed 10-11 before. No wonder I started to look confused when I saw 6.5 in the video
Continue
class GoodsListViewset(mixins.ListModelMixin, viewsets.GenericViewSet):
"""
//Product list page
"""
serializer_class = GoodsSerializer
pagination_class = GoodsPagination
# Because GenericViewSet also ...
Posted by Frozen Kiwi on Sun, 03 Nov 2019 16:17:26 -0800
Basic operation of SQL database: write excel data to or read from the database by using python
First, introduce some basic operations of SQL database:
1 create 2 delete 3 write 4 update (modify) 5 condition selection
With the above basic operations, you can establish and store a simple database.
Release the code called by python: here is calling dos to operate the database, which is not as simple as the following
# -*- coding: u ...
Posted by mwgi2005 on Sun, 03 Nov 2019 09:47:29 -0800
Flask -- database connection pool
Catalog
Database connection pool
pymsql linked database
Database connection pool version
Database connection pool
pymsql linked database
import pymysql
conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123456', db='s8day127db')
cursor = conn.cursor(cursor=pymysql.cursors.D ...
Posted by johnSTK on Sun, 03 Nov 2019 02:52:08 -0800
Database system -- MySQL statement and stored procedure
I. common statements of DDL, DML and DCL
1. DDL (Data Definition Language) database definition language
(1) database schema definition
#Create database
create database if exsites db_name;
#Selected database
use db_name;
#Delete database
drop database if exists db_name;
#modify the database
alter database db_name set ...;
#S ...
Posted by ChrisFlynn on Sat, 02 Nov 2019 23:01:58 -0700
[Hive] install Hive on Mac
I. installation
Hive installation: brew install hive
mysql installation: brew install mysql
Start MySQL: bash mysql.server start
2. Metabase configuration
Hive uses derby as the metabase by default. Here we use mysql to store metadata, and do some initialization configuration below
Log in to mysql: mysql -u root ...
Posted by jd307 on Sat, 02 Nov 2019 21:50:35 -0700
Recovery of Mysql primary synchronization failure
Basic information
Main storehouse:
Database 2 10.126.4.2
Database 3 10.126.4.3
1. Stop database 3 external service
Prevent services from writing data through database 3 during synchronization
$ firewall-cmd --remove-port=3306/tcp
$ firewall-cmd --add-rich-rule="rule f amily="ipv4" source address="10.126.4.2" port protocol="tcp" port="3306" a ...
Posted by Dathremar on Sat, 02 Nov 2019 16:55:46 -0700