V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  lihongjie0209  ›  全部回复第 14 页 / 共 78 页
回复总数  1543
1 ... 10  11  12  13  14  15  16  17  18  19 ... 78  
2019-10-16 18:02:54 +08:00
回复了 taogen 创建的主题 程序员 做一个小调查,你们用 MySQL 5.7 还是 8.0,或者 MariaDB ?
5.7
@summer7 #9 一次查 3000 条试试?
@misaka19000 #14 你用 c 语言管理 10G 内存试试, 没啥区别的。
那也就是说你的这个服务的并发数量 = 10 ??
2019-10-16 13:42:01 +08:00
回复了 178620086 创建的主题 NGINX nginx 如何多站点配置屏蔽 geo?
include 不行吗???
@429463267 #1 怕是没看题吧
2019-10-15 18:02:16 +08:00
回复了 shenfu1991 创建的主题 程序员 有没有可能从云厂商中购买一个 ip
我就一个问题, 你怎么把你买到的 IP 通告到路由网络???

BGP 了解一下

```
BGP ( Border Gateway Protocol,边界网关协议)是负责处理 Internet 上各个自治系统之间连接的大型路由选择协议。中国电信、中国移动、中国联通等运营商都具有多个自主 AS 号。唯一网络在多个地域均通过 BGP 协议,并使用自有的 AS 号与各大运营商实现网络互联。使用 BGP 互联后,Internet 上的骨干路由设备均会收到并判断目的 IP 地址的最佳路径,从而保证了最佳的网络质量。唯一网络自建的高速 BGP 网络,解决了跨运营商网络质量极不稳定的问题。

```


AS 了解一下


```
用于 BGP 路由中的每个自治系统都被分配一个唯一的自治系统编号( ASN )。对 BGP 来说,因为 ASN 是区别整个相互连接的网络中的各个网络的唯一标识,所以这个自治系统编号非常重要。互联网地址分派机构将 64512 到 65535 的 ASN 编号保留给(私有)专用网络使用。
```

计算好价格之后麻烦回复一下,我一直很好奇自建一个 BGP 多少钱
高级一点的 break, 可以跳出多个循环
2019-10-14 19:28:45 +08:00
回复了 Miller5991 创建的主题 Linux 由一条帖子引发的对文件系统思考
dir 就是一个一个特殊的文件, 里面保存了文件名->inode 的映射。

1. 对于人机交互的过程来说, 比如说 ls, 或者是 windows 下的 explorer, 最大的感受的就是卡。
因为文件夹只保存了 inode 映射, 所以为了显示文件的大小和修改日期等,ls/explorer 都要去把相应的文件 inode 读取出来, 也就是一个随机 IO, 文件数越多, 随机 IO 越多, 也就越卡。

2. 对于非人机交互的过程, 比如说一个 open 指令, 需要把多个 dir block 加载到内存中, 比如说文件夹中的映射数据量有 3M, 那么就需要把 3M 都加载到内存中才能确认文件的 inode, 相比于 ls 的随机 IO, 这个 IO 操作是一次性的,而且很有可能是一个顺序 IO, 我感觉应该影响不大。
取决于你的团队规模和项目规模。一个小组能做完的项目搞微服务就是闲得蛋疼
2019-10-14 15:06:58 +08:00
回复了 UserNameisNull 创建的主题 程序员 请教一个问题,多实例同时删除 key 怎么解决
最简单的就是中控服务器, 其他的方案都有问题, 要不实现困难, 要不无法保证正确性
@harde #27 那么你还需要定义一套 formdata 字段解析的规则 ?

类似于 reqObject[listField][index_1][objectfield] = 1 ?? 这样的?
@harde #14 这个问题基本和开发无关, 取决你的用的 mvc 框架是否支持。
2019-10-14 11:26:04 +08:00
回复了 liunaijie 创建的主题 MySQL 这两种查询的实现,有什么区别?什么场景下使用 join?
select b.score from a,b 这是笛卡尔积, 要爆炸的。
2019-10-14 11:24:32 +08:00
回复了 Shoestrong 创建的主题 程序员 Linux 用 ls 么
很明显在源代码中没有地方维护这种信息

```
struct fileinfo
{
/* The file name. */
char *name;

/* For symbolic link, name of the file linked to, otherwise zero. */
char *linkname;

/* For terminal hyperlinks. */
char *absolute_name;

struct stat stat;

enum filetype filetype;

/* For symbolic link and long listing, st_mode of file linked to, otherwise
zero. */
mode_t linkmode;

/* security context. */
char *scontext;

bool stat_ok;

/* For symbolic link and color printing, true if linked-to file
exists, otherwise false. */
bool linkok;

/* For long listings, true if the file has an access control list,
or a security context. */
enum acl_type acl_type;

/* For color listings, true if a regular file has capability info. */
bool has_capability;

/* Whether file name needs quoting. tri-state with -1 == unknown. */
int quoted;
};

```
2019-10-13 21:42:02 +08:00
回复了 michaelym 创建的主题 Python Python 是否有监听网页,发现变化然后通知的包
@forgottencoast #19

1. 按照楼主的提问, 那么肯定是从 http 协议层面考虑, 至于 api 是不是 rest 风格的,没法确定, 没法保证, 没法修改。
2. 其次, 我是没看懂为什么一个动态资源( api )需要实现 head 方法。

按照 mdn 和 rfc2616 的说法,head 方法就是一个 get 方法不返回 body, 主要到作用也是解决带宽和缓存处理。

`实现良好的 RESTful 风格 Api ` 可有任何实际的项目在使用?麻烦发一下 github 地址。

https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Methods/HEAD
```
HTTP HEAD 方法 请求资源的头部信息, 并且这些头部与 HTTP GET 方法请求时返回的一致. 该请求方法的一个使用场景是在下载一个大文件前先获取其大小再决定是否要下载, 以此可以节约带宽资源.
```

rfc2616

```
9.4 HEAD
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. This method can be used for obtaining metainformation about the entity implied by the request without transferring the entity-body itself. This method is often used for testing hypertext links for validity, accessibility, and recent modification.

The response to a HEAD request MAY be cacheable in the sense that the information contained in the response MAY be used to update a previously cached entity from that resource. If the new field values indicate that the cached entity differs from the current entity (as would be indicated by a change in Content-Length, Content-MD5, ETag or Last-Modified), then the cache MUST treat the cache entry as stale.

```
2019-10-13 15:44:29 +08:00
回复了 michaelym 创建的主题 Python Python 是否有监听网页,发现变化然后通知的包
可以啊, 你可以写一套复杂到调度策略, 根据统计信息经过一系列逻辑判断来决定你到请求频率和请求时间。

当然, 在 99%的情况下, 你的时间估计比流量值钱
2019-10-13 15:42:38 +08:00
回复了 michaelym 创建的主题 Python Python 是否有监听网页,发现变化然后通知的包
@vus520 #2 api 又不是静态文件, 使用 head 方法没有任何意义
2019-10-11 15:06:22 +08:00
回复了 zgqq 创建的主题 Java 后面不太敢用阿里的开源库了
必须 jackson
1 ... 10  11  12  13  14  15  16  17  18  19 ... 78  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2277 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 45ms · UTC 10:00 · PVG 18:00 · LAX 03:00 · JFK 06:00
Developed with CodeLauncher
♥ Do have faith in what you're doing.