概述

在众多的sip服务器中,主要有俩大类,一类侧重于媒体/业务服务器,比如freeswitch/asterisk,另一类侧重于代理/负载服务器,比如opensips/kamailio。

今天我们对opensips做一个简单介绍。

OpenSIPS 是用于语音、视频、IM、在线状态和任何其他SIP扩展的开源 SIP 代理服务器。

OpenSIPS 是一种多功能、多用途的SIP信令服务器,运营商、电信或 ITSP 将其用于 Class4/5平台、中继、企业/虚拟 PBX 解决方案、会话边界控制器、应用服务器、前端负载等解决方案、IMS 平台、呼叫中心等等。

OpenSIPS 被推荐用于任何类型的 SIP 场景/服务:

  1. 高吞吐量 - 数万CPS,数百万个在线呼叫(参见官方测试)
  2. 路由和集成的灵活性 - 用于实现自定义路由逻辑的路由脚本,多个接口 API(参见手册)
  3. 有效的应用程序构建 - 超过 120 个模块提供功能,用于 SIP 处理、后端操作、集成、路由逻辑(请参阅模块列表)

本章节主要介绍opensips的编译安装、配置启动的通用流程。

开发环境

Centos:CentOS release 6 (Final)或以上版本

opensips:2.4.9

GCC/C++:4.4.7

编译安装

依赖库

yum install -y autoconf automake libtool gcc-c++ ncurses-devel make zlib-devel lynx flex bison mysql pcre python-devel openssl-devel mysql-devel

安装hiredis

git clone https://github.com/redis/hiredis.git hiredis

cd hiredis

make install

源码安装包:

https://opensips.org/pub/opensips/2.4.9/opensips-2.4.9.tar.gz

wget  https://opensips.org/pub/opensips/2.4.9/opensips-2.4.9.tar.gz

tar –zxvf opensips-2.4.9.tar.gz

编译安装:

方法1:

cd  opensips-2.4.9

make include_modules="cachedb_redis db_mysql dialplan python tls_mgm proto_tls proto_ws proto_wss " prefix="/usr/local/opensips" install

方法2:

cd  opensips-2.4.9

make menuconfig

增加 cachedb_redis db_mysql dialplan python tls_mgm proto_tls proto_ws proto_wss 模块编译

修改安装目录为 /usr/local/opensips

保存退出menuconfig

make install

目录结构

默认安装路径为 /usr/local/opensips

编译安装完成后,检查安装目录

opensips

├── etc

│   └── opensips

│       ├── opensips.cfg

│       ├── opensipsctlrc

│       ├── osipsconsolerc

│       ├── scenario_callcenter.xml

│       └── tls

│           ├── ca.conf

│           ├── README

│           ├── request.conf

│           ├── rootCA

│           │   ├── cacert.pem

│           │   ├── certs

│           │   │   └── 01.pem

│           │   ├── index.txt

│           │   ├── private

│           │   │   └── cakey.pem

│           │   └── serial

│           ├── user

│           │   ├── user-calist.pem

│           │   ├── user-cert.pem

│           │   ├── user-cert_req.pem

│           │   └── user-privkey.pem

│           └── user.conf

├── lib64

│   └── opensips

│       ├── modules

│       │   ├── acc.so

│       │   ├── alias_db.so

│       │   ├── auth_aaa.so

│       │   ├── auth_db.so

│       │   ├── auth.so

│       │   ├── avpops.so

│       │   ├── b2b_entities.so

│       │   ├── b2b_sca.so

│       │   ├── benchmark.so

│       │   ├── cachedb_local.so

│       │   ├── cachedb_redis.so

│       │   ├── cachedb_sql.so

│       │   ├── call_center.so

│       │   ├── call_control.so

│       │   ├── cfgutils.so

│       │   ├── clusterer.so

│       │   ├── db_cachedb.so

│       │   ├── db_flatstore.so

│       │   ├── db_mysql.so

│       │   ├── db_text.so

│       │   ├── db_virtual.so

│       │   ├── dialog.so

│       │   ├── dialplan.so

│       │   ├── dispatcher.so

│       │   ├── diversion.so

│       │   ├── dns_cache.so

│       │   ├── domainpolicy.so

│       │   ├── domain.so

│       │   ├── drouting.so

│       │   ├── enum.so

│       │   ├── event_datagram.so

│       │   ├── event_flatstore.so

│       │   ├── event_jsonrpc.so

│       │   ├── event_route.so

│       │   ├── event_routing.so

│       │   ├── event_virtual.so

│       │   ├── event_xmlrpc.so

│       │   ├── exec.so

│       │   ├── fraud_detection.so

│       │   ├── freeswitch_scripting.so

│       │   ├── freeswitch.so

│       │   ├── gflags.so

│       │   ├── group.so

│       │   ├── imc.so

│       │   ├── jsonrpc.so

│       │   ├── load_balancer.so

│       │   ├── mangler.so

│       │   ├── mathops.so

│       │   ├── maxfwd.so

│       │   ├── mediaproxy.so

│       │   ├── mi_datagram.so

│       │   ├── mid_registrar.so

│       │   ├── mi_fifo.so

│       │   ├── mi_http.so

│       │   ├── mi_json.so

│       │   ├── msilo.so

│       │   ├── nathelper.so

│       │   ├── nat_traversal.so

│       │   ├── options.so

│       │   ├── path.so

│       │   ├── peering.so

│       │   ├── permissions.so

│       │   ├── pike.so

│       │   ├── presence_callinfo.so

│       │   ├── presence_xcapdiff.so

│       │   ├── proto_bin.so

│       │   ├── proto_hep.so

│       │   ├── proto_ws.so

│       │   ├── python.so

│       │   ├── qos.so

│       │   ├── ratelimit.so

│       │   ├── registrar.so

│       │   ├── rr.so

│       │   ├── rtpengine.so

│       │   ├── rtpproxy.so

│       │   ├── script_helper.so

│       │   ├── seas.so

│       │   ├── signaling.so

│       │   ├── sipcapture.so

│       │   ├── sip_i.so

│       │   ├── sipmsgops.so

│       │   ├── siptrace.so

│       │   ├── sl.so

│       │   ├── sms.so

│       │   ├── speeddial.so

│       │   ├── sql_cacher.so

│       │   ├── sst.so

│       │   ├── statistics.so

│       │   ├── stun.so

│       │   ├── textops.so

│       │   ├── tls_mgm.so

│       │   ├── tm.so

│       │   ├── topology_hiding.so

│       │   ├── uac_auth.so

│       │   ├── uac_redirect.so

│       │   ├── uac_registrant.so

│       │   ├── uac.so

│       │   ├── uri.so

│       │   ├── userblacklist.so

│       │   └── usrloc.so

│       └── opensipsctl

│           ├── dbtextdb

│           │   └── dbtextdb.py

│           ├── opensipsctl.base

│           ├── opensipsctl.ctlbase

│           ├── opensipsctl.dbtext

│           ├── opensipsctl.fifo

│           ├── opensipsctl.mysql

│           ├── opensipsctl.sqlbase

│           ├── opensipsctl.unixsock

│           ├── opensipsdbctl.base

│           ├── opensipsdbctl.dbtext

│           └── opensipsdbctl.mysql

├── sbin

│   ├── opensips

│   ├── opensipsctl

│   ├── opensipsdbctl

│   ├── opensipsunix

│   ├── osipsconfig

│   └── osipsconsole

└── share

├── doc

│   └── opensips

│       ├── AUTHORS

│       ├── INSTALL

│       ├── NEWS

│       ├── README

│       ├── README.acc

│       ├── README.alias_db

│       ├── README.auth

│       ├── README.auth_aaa

│       ├── README.auth_db

│       ├── README.avpops

│       ├── README.b2b_entities

│       ├── README.b2b_sca

│       ├── README.benchmark

│       ├── README.cachedb_local

│       ├── README.cachedb_redis

│       ├── README.cachedb_sql

│       ├── README.call_center

│       ├── README.call_control

│       ├── README.cfgutils

│       ├── README.clusterer

│       ├── README.db_cachedb

│       ├── README.db_flatstore

│       ├── README.db_mysql

│       ├── README.db_text

│       ├── README.db_virtual

│       ├── README.dialog

│       ├── README.dialplan

│       ├── README.dispatcher

│       ├── README.diversion

│       ├── README.dns_cache

│       ├── README.domain

│       ├── README.domainpolicy

│       ├── README.drouting

│       ├── README.enum

│       ├── README.event_datagram

│       ├── README.event_flatstore

│       ├── README.event_jsonrpc

│       ├── README.event_route

│       ├── README.event_routing

│       ├── README.event_virtual

│       ├── README.event_xmlrpc

│       ├── README.exec

│       ├── README.fraud_detection

│       ├── README.freeswitch

│       ├── README.freeswitch_scripting

│       ├── README.gflags

│       ├── README.group

│       ├── README.imc

│       ├── README.jsonrpc

│       ├── README.load_balancer

│       ├── README.mangler

│       ├── README.mathops

│       ├── README.maxfwd

│       ├── README.mediaproxy

│       ├── README.mi_datagram

│       ├── README.mid_registrar

│       ├── README.mi_fifo

│       ├── README.mi_http

│       ├── README.mi_json

│       ├── README-MODULES

│       ├── README.msilo

│       ├── README.nathelper

│       ├── README.nat_traversal

│       ├── README.options

│       ├── README.path

│       ├── README.peering

│       ├── README.permissions

│       ├── README.pike

│       ├── README.presence_callinfo

│       ├── README.presence_xcapdiff

│       ├── README.proto_bin

│       ├── README.proto_hep

│       ├── README.proto_ws

│       ├── README.python

│       ├── README.qos

│       ├── README.ratelimit

│       ├── README.registrar

│       ├── README.rr

│       ├── README.rtpengine

│       ├── README.rtpproxy

│       ├── README.script_helper

│       ├── README.seas

│       ├── README.signaling

│       ├── README.sipcapture

│       ├── README.sip_i

│       ├── README.sipmsgops

│       ├── README.siptrace

│       ├── README.sl

│       ├── README.sms

│       ├── README.speeddial

│       ├── README.sql_cacher

│       ├── README.sst

│       ├── README.statistics

│       ├── README.stun

│       ├── README.textops

│       ├── README.tls_mgm

│       ├── README.tm

│       ├── README.topology_hiding

│       ├── README.uac

│       ├── README.uac_auth

│       ├── README.uac_redirect

│       ├── README.uac_registrant

│       ├── README.uri

│       ├── README.userblacklist

│       └── README.usrloc

├── man

│   ├── man5

│   │   └── opensips.cfg.5

│   └── man8

│       ├── opensips.8

│       ├── opensipsctl.8

│       └── opensipsunix.8

└── opensips

├── dbtext

│   └── opensips

│       ├── acc

│       ├── active_watchers

│       ├── address

│       ├── aliases

│       ├── b2b_entities

│       ├── b2b_logic

│       ├── b2b_sca

│       ├── cachedb

│       ├── carrierfailureroute

│       ├── carrierroute

│       ├── cc_agents

│       ├── cc_calls

│       ├── cc_cdrs

│       ├── cc_flows

│       ├── closeddial

│       ├── clusterer

│       ├── cpl

│       ├── dbaliases

│       ├── dialog

│       ├── dialplan

│       ├── dispatcher

│       ├── domain

│       ├── domainpolicy

│       ├── dr_carriers

│       ├── dr_gateways

│       ├── dr_groups

│       ├── dr_partitions

│       ├── dr_rules

│       ├── emergency_report

│       ├── emergency_routing

│       ├── emergency_service_provider

│       ├── fraud_detection

│       ├── freeswitch

│       ├── freeswitch_scripting

│       ├── globalblacklist

│       ├── grp

│       ├── imc_members

│       ├── imc_rooms

│       ├── load_balancer

│       ├── location

│       ├── missed_calls

│       ├── presentity

│       ├── pua

│       ├── registrant

│       ├── re_grp

│       ├── rls_presentity

│       ├── rls_watchers

│       ├── route_tree

│       ├── rtpengine

│       ├── rtpproxy_sockets

│       ├── silo

│       ├── sip_trace

│       ├── speed_dial

│       ├── subscriber

│       ├── tls_mgm

│       ├── uri

│       ├── userblacklist

│       ├── usr_preferences

│       ├── version

│       ├── watchers

│       └── xcap

├── menuconfig_templates

│   ├── opensips_loadbalancer_def.m4

│   ├── opensips_loadbalancer.m4

│   ├── opensips_residential_def.m4

│   ├── opensips_residential.m4

│   ├── opensips_trunking_def.m4

│   └── opensips_trunking.m4

└── mysql

├── acc-create.sql

├── alias_db-create.sql

├── auth_db-create.sql

├── avpops-create.sql

├── b2b-create.sql

├── b2b_sca-create.sql

├── cachedb_sql-create.sql

├── call_center-create.sql

├── carrierroute-create.sql

├── closeddial-create.sql

├── clusterer-create.sql

├── cpl-create.sql

├── dialog-create.sql

├── dialplan-create.sql

├── dispatcher-create.sql

├── domain-create.sql

├── domainpolicy-create.sql

├── drouting-create.sql

├── emergency-create.sql

├── fraud_detection-create.sql

├── freeswitch_scripting-create.sql

├── group-create.sql

├── imc-create.sql

├── load_balancer-create.sql

├── msilo-create.sql

├── permissions-create.sql

├── presence-create.sql

├── registrant-create.sql

├── rls-create.sql

├── rtpengine-create.sql

├── rtpproxy-create.sql

├── siptrace-create.sql

├── speeddial-create.sql

├── standard-create.sql

├── tls_mgm-create.sql

├── uri_db-create.sql

├── userblacklist-create.sql

└── usrloc-create.sql

创建数据库

注意事项:该操作需要保证对应数据库没有创建过

cd  /usr/local/opensips/etc/opensips/

vi  opensipsctlrc

DBENGINE=MYSQL

DBPORT=3306

DBHOST=192.168.0.110

DBNAME=opensips

DBRWUSER=root

DBRWPW="opensips"

DBROOTUSER="root"

执行命令

/usr/local/opensips/sbin/opensipsdbctl  create

防火墙

CENTOS6

iptables  -I  INPUT  1  –p  udp  –dport  5060  –j  ACCEPT

iptables  -I  INPUT  1  –p  tcp  –dport  7443  –j  ACCEPT

service  iptables  save

CENTOS7

firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" port port="5060" protocol="udp" accept'

firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" port port="7443" protocol="tcp" accept'

firewall-cmd --reload

配置日志

修改 /usr/local/opensips/etc/opensips/opensips.cfg

log_facility=LOG_LOCAL0

修改 /etc/rsyslog.conf

local0.*  -/var/log/opensips/opensips.log

新增 /etc/logrotate.d/opensips

/var/log/opensips/opensips.log {

copytruncate

noolddir

size 20M

rotate 64

dateext

dateformat .%Y%m%d.%s

sharedscripts

postrotate

/bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true

endscript

}

设置定时任务

sudo crontab -e

* * * * *  /usr/sbin/logrotate   /etc/logrotate.d/opensips

重启rsyslog服务

service rsyslog restart

TCP最大连接数限制

用户级别

查看linux系统用户最大打开文件限制

ulimit -n

修改limits.conf

vi /etc/security/limits.conf

* soft nofile 100000

* hard nofile 100000

linux系统级别

查看linux系统对同时打开文件数的硬限制

sysctl -a|grep file-max

修改sysctl.conf

vi /etc/sysctl.conf

fs.file-max = 100000

使sysctl配置立即生效:

sysctl -p

网络端口限制修改,服务器需要作为client时配置

查看linux系统最大追踪TCP连接数量

sysctl -a | grep ipv4.ip_conntrack_max

查看linux系统端口范围

sysctl -a | grep ipv4.ip_local_port_range

修改sysctl.conf

vi /etc/sysctl.conf

net.ipv4.ip_local_port_range = 10240    65535

net.netfilter.nf_conntrack_max = 100000

使sysctl配置立即生效:

sysctl -p

Linux下查看tcp连接数及状态命令:

netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'

统计7443端口连接数

netstat -nat|grep -i "7443"|wc -l

统计已连接上的,状态为established

netstat -na|grep ESTABLISHED|wc -l

查出哪个IP地址连接最多,异常情况需要封IP

netstat -na|grep ESTABLISHED|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -r

netstat -na|grep SYN|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -r

启动脚本

cd  opensips-2.4.9/packaging/redhat_fedora

cp opensips.init /etc/init.d/opensips

chmod 777 /etc/init.d/opensips

sed -i "s/\/usr\/sbin/\/usr\/local\/opensips\/sbin/g" /etc/init.d/opensips

sed -i "s/\/etc\/\$prog/\/usr\/local\/opensips\/etc\/\$prog/g" /etc/init.d/opensips

开机自动启动

useradd -d /usr/local/opensips -s /sbin/nologin opensips

chkconfig --add opensips

chkconfig opensips on

启停命令

启动:

service opensips start

或者

/usr/local/opensips/sbin/opensipsctl  start

后台启动方式,如果启动失败,需要查看log文件

停止:

service opensips stop

或者

/usr/local/opensips/sbin/opensipsctl  stop

常用命令

/usr/local/opensips/sbin/opensips  -C          //检查配置文件是否有错误

/usr/local/opensips/sbin/opensipsctl monitor          //opensips运行参数监控

/usr/local/opensips/sbin/opensipsctl ping <uri>      //使用OPTION 检测uri

/usr/local/opensips/sbin/opensipsctl dispatcher show    //dispatcher模块信息展示

配置文件

当前文档主要描述,opensips作为注册服务器的信令代理和负载节点的配置方法。

/usr/local/opensips/etc/opensips/opensips.cfg

#

# OpenSIPS residential configuration script

#     by OpenSIPS Solutions <team@opensips-solutions.com>

#

# This script was generated via "make menuconfig", from

#   the "Residential" scenario.

# You can enable / disable more features / functionalities by

#   re-generating the scenario with different options.#

#

# Please refer to the Core CookBook at:

#      https://opensips.org/Resources/DocsCookbooks

# for a explanation of possible statements, functions and parameters.

#

####### Global Parameters #########

log_level=3

log_stderror=no

log_facility=LOG_LOCAL0

children=4

/* uncomment the following lines to enable debugging */

#debug_mode=yes

/* uncomment the next line to enable the auto temporary blacklisting of

not available destinations (default disabled) */

#disable_dns_blacklist=no

/* uncomment the next line to enable IPv6 lookup after IPv4 dns

lookup failures (default disabled) */

#dns_try_ipv6=yes

/* comment the next line to enable the auto discovery of local aliases

based on reverse DNS on IPs */

auto_aliases=no

listen=udp:192.168.0.202:5080   # CUSTOMIZE ME

listen=udp:192.168.0.202:5060

#listen = wss:192.168.0.202:7443 use_children 5

tcp_max_connections=4096

user_agent_header="REG-PXY001"

####### Modules Section ########

#set module path

mpath="/usr/local/opensips/lib64/opensips/modules/"

loadmodule "db_mysql.so"

#### SIGNALING module

loadmodule "signaling.so"

#### StateLess module

loadmodule "sl.so"

#### Transaction Module

loadmodule "tm.so"

modparam("tm", "fr_timer", 2)

modparam("tm", "fr_timeout", 5)

modparam("tm", "fr_inv_timeout", 30)

modparam("tm", "restart_fr_on_each_reply", 0)

modparam("tm", "onreply_avp_mode", 1)

#### Record Route Module

loadmodule "rr.so"

/* do not append from tag to the RR (no need for this script) */

modparam("rr", "enable_double_rr", 1)

modparam("rr", "append_fromtag", 1)

loadmodule "dialog.so"

modparam("dialog", "db_url", "mysql://root:123456@localhost/opensips")

#### MAX ForWarD module

loadmodule "maxfwd.so"

loadmodule "textops.so"

#### SIP MSG OPerationS module

loadmodule "sipmsgops.so"

#### FIFO Management Interface

loadmodule "mi_fifo.so"

modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")

modparam("mi_fifo", "fifo_mode", 0666)

#### URI module

loadmodule "uri.so"

modparam("uri", "use_uri_table", 0)

#### USeR LOCation module

loadmodule "usrloc.so"

modparam("usrloc", "nat_bflag", "NAT")

modparam("usrloc", "working_mode_preset", "single-instance-no-db")

#### REGISTRAR module

loadmodule "registrar.so"

modparam("registrar", "tcp_persistent_flag", "TCP_PERSISTENT")

/* uncomment the next line not to allow more than 10 contacts per AOR */

#modparam("registrar", "max_contacts", 10)

#### ACCounting module

loadmodule "acc.so"

/* what special events should be accounted ? */

modparam("acc", "early_media", 0)

modparam("acc", "report_cancels", 0)

/* by default we do not adjust the direct of the sequential requests.

if you enable this parameter, be sure to enable "append_fromtag"

in "rr" module */

modparam("acc", "detect_direction", 0)

loadmodule "proto_udp.so"

loadmodule "dispatcher.so"

modparam("dispatcher", "db_url", "mysql://root:123456@localhost/opensips")

modparam("dispatcher", "ds_ping_method", "OPTIONS")

modparam("dispatcher", "ds_ping_interval", 60)

modparam("dispatcher", "ds_probing_threshhold", 2)

modparam("dispatcher", "ds_probing_mode", 1)

loadmodule "load_balancer.so"

modparam("load_balancer", "db_url", "mysql://root:123456@localhost/opensips")

modparam("load_balancer", "probing_method", "OPTIONS")

modparam("load_balancer", "probing_interval", 60)

####### Routing Logic ########

# main request routing logic

route{

script_trace( 1, "$rm from $si, ruri=$ru", "me");

if (!mf_process_maxfwd_header("10")) {

sl_send_reply("483","Too Many Hops");

exit;

}

if (!has_totag()) {

# initial request

record_route();

}

else {

# sequential request - obey the indicated route

loose_route();

t_relay();

exit;

}

# handle cancel and re-transmissions

# from now on we have only the initial requests

# select the node that'll handle the call (load balanced)

# the method used is different for invite/register requests

# unknown methods are rejected here

if ( is_method("CANCEL") ) {

if ( t_check_trans() )

t_relay();

exit;

}

else if(is_method("OPTIONS")) {

# send reply for each options request

sl_send_reply("200", "ok");

exit;

}

else if (is_method("INVITE")) {

xlog("L_INFO", "INFO: this sip message is an invite\n");

if (!ds_select_dst("1", "1")) {

send_reply("503","Service Unavailable");

exit;

}

}

else if (is_method("REGISTER")) {

xlog("L_INFO", "INFO: this sip message is a register\n");

if (!ds_select_dst("1", "1")) {

send_reply("503","Service Unavailable");

exit;

}

}

else {

send_reply("405","Method Not Allowed");

exit;

}

# route the request

if (!t_relay()) {

sl_reply_error();

}

}

增加网关数据

/usr/local/opensips/sbin/opensipsctl dispatcher addgw 1 sip:192.168.0.146:5060 '' 0 50 'fs1' 'reg001'

/usr/local/opensips/sbin/opensipsctl dispatcher addgw 1 sip:192.168.0.150:5060 '' 0 50 'fs2' 'reg002'

sip软终端配置

加载测试

通过sip软终端注册,发起呼叫,测试信令和媒体的连通性。

总结

opensips作为负载均衡的代理网关,性能非常好。

网关常见的功能,我们通过opensips.cfg配置文件的路由脚本基本很容易实现,具体请关注opensips的子模块介绍和接口。


空空如常

求真得真

opensips简介的更多相关文章

  1. ASP.NET Core 1.1 简介

    ASP.NET Core 1.1 于2016年11月16日发布.这个版本包括许多伟大的新功能以及许多错误修复和一般的增强.这个版本包含了多个新的中间件组件.针对Windows的WebListener服 ...

  2. MVVM模式和在WPF中的实现(一)MVVM模式简介

    MVVM模式解析和在WPF中的实现(一) MVVM模式简介 系列目录: MVVM模式解析和在WPF中的实现(一)MVVM模式简介 MVVM模式解析和在WPF中的实现(二)数据绑定 MVVM模式解析和在 ...

  3. Cassandra简介

    在前面的一篇文章<图形数据库Neo4J简介>中,我们介绍了一种非常流行的图形数据库Neo4J的使用方法.而在本文中,我们将对另外一种类型的NoSQL数据库——Cassandra进行简单地介 ...

  4. REST简介

    一说到REST,我想大家的第一反应就是“啊,就是那种前后台通信方式.”但是在要求详细讲述它所提出的各个约束,以及如何开始搭建REST服务时,却很少有人能够清晰地说出它到底是什么,需要遵守什么样的准则. ...

  5. Microservice架构模式简介

    在2014年,Sam Newman,Martin Fowler在ThoughtWorks的一位同事,出版了一本新书<Building Microservices>.该书描述了如何按照Mic ...

  6. const,static,extern 简介

    const,static,extern 简介 一.const与宏的区别: const简介:之前常用的字符串常量,一般是抽成宏,但是苹果不推荐我们抽成宏,推荐我们使用const常量. 执行时刻:宏是预编 ...

  7. HTTPS简介

    一.简单总结 1.HTTPS概念总结 HTTPS 就是对HTTP进行了TLS或SSL加密. 应用层的HTTP协议通过传输层的TCP协议来传输,HTTPS 在 HTTP和 TCP中间加了一层TLS/SS ...

  8. 【Machine Learning】机器学习及其基础概念简介

    机器学习及其基础概念简介 作者:白宁超 2016年12月23日21:24:51 摘要:随着机器学习和深度学习的热潮,各种图书层出不穷.然而多数是基础理论知识介绍,缺乏实现的深入理解.本系列文章是作者结 ...

  9. Cesium简介以及离线部署运行

    Cesium简介 cesium是国外一个基于JavaScript编写的使用WebGL的地图引擎,一款开源3DGIS的js库.cesium支持3D,2D,2.5D形式的地图展示,可以自行绘制图形,高亮区 ...

  10. 1.Hibernate简介

    1.框架简介: 定义:基于java语言开发的一套ORM框架: 优点:a.方便开发;           b.大大减少代码量;           c.性能稍高(不能与数据库高手相比,较一般数据库使用者 ...

随机推荐

  1. IDEA在new对象的时候不显示其parameter

    问题现象 最近安装了一个IDEA2023.1版本,出现了new对象不显示相关构造参数 解决办法 在IDEA的设置中开启相关提示 勾选上面的几个设置,保存 效果

  2. 10 个免费的 AI 图片生成工具分享

    原文: https://openaigptguide.com/ai-picture-generator/ 在人工智能(AI)图像生成技术的推动下,各类AI图片生成网站如雨后春笋般涌现,为我们的日常生活 ...

  3. Codeforces Round #426 (Div. 2) problem C

    C. The Meaningless Game time limit per test 1 second memory limit per test 256 megabytes input stand ...

  4. ElasticSearch快照备份、还原

    快照备份 备份和还原的前提:在配置文件elasticsearch.yml中设置path.repo path.repo: ["D:\\elasticsearch-6.8.23\\elastic ...

  5. 使用C#如何监控选定文件夹中文件的变动情况?

    目录 1.前言 2.效果 3.具体实现 ​ 页面设计 ​ 全部代码 ​ FileSystemWatcher的介绍 ​ FileSystemWatcher的构造函数 ​ FileSystemWatche ...

  6. postman——预处理和断言

    一.预处理 Pre-request Scrip 1.Pre-request Script是集合中请求发送之前需要执行的代码片段 2.请求参数中包含一个随机数或者请求header中包括一个时间戳,或者你 ...

  7. Web测试基本思路:UI测试、功能测试和兼容性测试

    关于网站测试的基本思路,希望对测试小白有所帮助. 一.UI测试 用户界面测试主要是拿待测网页和设计稿进行对比,主要主要以下4点: 1.注重细节: 这点最基本,就是对比是细心.细心再细心. 2.主要整体 ...

  8. Python——第五章:Zipfile模块

    Zipfile模块 zipfile 模块是 Python 中用于处理 ZIP 文件的标准库模块.它提供了创建.读取和写入 ZIP 文件的功能. zipfile 模块在写入文件时,如果要将文件写入子目录 ...

  9. SQL优化案例(2):OR条件优化

    接下来上一篇文章< SQL优化案例(1):隐式转换>的介绍,此处内容围绕OR的优化展开. 在MySQL中,同样的查询条件,如果变换OR在SQL语句中的位置,那么查询的结果也会有差异,在多个 ...

  10. 7、Flutter GridView网格布局组件(遍历)

    GridView创建网格列表主要有下面三种方式 1.可以通过GridView.count 实现网格布局    一行的 Widget 数量 class HomePage extends Stateles ...