首页 文章 精选 留言 我的

精选列表

搜索[IM通道],共7049篇文章
优秀的个人博客,低调大师

刚性通道时代——架构

机房设施 机柜:1U=44.5mm,机柜外侧高度常用高度2m、2.2m和2.6m,2.2m的比较多。机柜的宽度一般是600mm。机柜的深度一般常用300mm、600mm。 传输设备和光缆之间不会直接对接,中间经过一个ODF。 ODF作为传输设备和线路专业的分工界面。 ODF一侧熔接光缆,另外一侧通过尾纤与传输设备的光口连接,在建设基站时进站光缆熔接到ODF上,该基站需要使用第几芯,就用尾纤连接到ODF对应的端子上,这样规范的安装方式便于后期维护工作。 DDF:数字配线架,接E1 网络架构 ▎面临环路容量不足的问题如何解决? 1、环路升级 将原本155M光口全部换成622M 2、拆环 分为跳点拆环和中间拆环 3、新建系统 水平分区,垂直分层,是传送网的一个基本的思路。 ▎传送网分层建设的优点: 1、缓解中心局压力 2、减少光缆资源消耗,提高网络安全性 3、经济地提高网络容量,成本较低 架构优化的两个方向:容量(设备能力不足、槽位不足等)、安全性(超大环、同缆环、超长链等) 我们对于网路容量给带宽利用率设定一个门限值,一般是70%左右。 超长链,一般指链上节点5个以上的。怎么改造?新建一条光缆把链改成环。 很多建不了光缆的地方只能使用微波,微波的稳定性比较差,所以有条件了就要建光缆改造成光纤通信。还有一些在网运行多年的厂家已经停产的设备,设备性能较差而且厂家也无法提供正常的技术服务,有条件就要换成新的。 机房的稳定性:主要是产权、面积,至于其他的电源、承重等问题,相对都是次要的,都可以想办法。 网络架构的一致性:整网考虑,而不是独立的个体。 光缆也要分层去建设。杜绝接入层使用汇聚光缆的可能性,把接入层彻底屏蔽掉。 管道的建设应该是有倾向性的,核心、汇聚节点之间的路由、主干道路上的资源应该相对丰富,因为业务量大、业务等级较高。 基础架构的重点就是:稳定!稳定!再稳定! 本文转自Grodd51CTO博客,原文链接:http://blog.51cto.com/juispan/1970053,如需转载请自行联系原作者

优秀的个人博客,低调大师

Java NIO(三)Channel 通道

java nio channel 和 流有一些小小的区别: 你能在channel进行读写二者,但是流只能进行读者其一。 channel能异步进行读写。 channel一般从(借助)buffer进行读写。 如下图所示: image.png Channel Implementations 以下是Java NIO中最重要的Channel实现: FileChannel DatagramChannel SocketChannel ServerSocketChannel The FileChannel 从文件读取数据。 The DatagramChannel 可以通过UDP在网络上读写数据。 The SocketChannel 可以通过TCP在网络上读写数据。 The ServerSocketChannel允许您监听传入的TCP连接,就像Web服务器一样。 为每个传入的连接创建一个SocketChannel。 实战 Here is a basic example that uses a FileChannel to read some data into a Buffer: 一个简单的例子:用FileChannel去读数据从Buffer里 RandomAccessFile aFile = new RandomAccessFile("data/nio-data.txt", "rw"); FileChannel inChannel = aFile.getChannel(); ByteBuffer buf = ByteBuffer.allocate(48); int bytesRead = inChannel.read(buf); while (bytesRead != -1) { System.out.println("Read " + bytesRead); buf.flip(); while(buf.hasRemaining()){ System.out.print((char) buf.get()); } buf.clear(); bytesRead = inChannel.read(buf); } aFile.close(); 注意buf.flip()的调用,首先读入一个缓冲区,然后将内容弹出,然后读出数据。

优秀的个人博客,低调大师

java nio 通道之pipe实现

这个pipe和linux系统上用来连接两个进程的pipe不是同一概念, 主要是在JVM内部,用来实现不同线程之间的数据同步。 这倒让我想起了go语言的channel技术。 package com.ronsoft.books.nio.channels; import java.nio.ByteBuffer; import java.nio.channels.Channels; import java.nio.channels.Pipe; import java.nio.channels.ReadableByteChannel; import java.nio.channels.WritableByteChannel; import java.util.Random; public class PipeTest { public static void main(String[] args) throws Exception { // TODO Auto-generated method stub WritableByteChannel out = Channels.newChannel(System.out); ReadableByteChannel workerChannel = startWorker(10); ByteBuffer buffer = ByteBuffer.allocate(100); while (workerChannel.read(buffer) >= 0) { buffer.flip(); out.write(buffer); buffer.clear(); } } private static ReadableByteChannel startWorker(int reps) throws Exception { Pipe pipe = Pipe.open(); Worker worker = new Worker(pipe.sink(), reps); worker.start(); return (pipe.source()); } private static class Worker extends Thread { WritableByteChannel channel; private int reps; Worker(WritableByteChannel channel, int reps) { this.channel = channel; this.reps = reps; } public void run() { ByteBuffer buffer = ByteBuffer.allocate(100); try { for (int i = 0; i < this.reps; i++) { doSomeWork(buffer); while (channel.write(buffer) > 0) { } } this.channel.close(); } catch (Exception e) { e.printStackTrace(); } } } private static String [] products = { "No good deed ges unpunished", "To be, or what?", "No matter where you go, there you are", "Just say \"Yo\"", "My karma ran over my dogma" }; private static Random rand = new Random(); private static void doSomeWork(ByteBuffer buffer) { int product = rand.nextInt(products.length); buffer.clear(); buffer.put(products[product].getBytes()); buffer.put("\r\n".getBytes()); buffer.flip(); } } Just say "Yo" No good deed ges unpunished To be, or what? No good deed ges unpunished To be, or what? Just say "Yo" Just say "Yo" No matter where you go, there you are No good deed ges unpunished Just say "Yo"

优秀的个人博客,低调大师

使用高速通道加速iOS版本审核

1 市场现状 据Newzoo数据显示,2017年全球游戏市场规模预计达1089亿美元,较上年增长7.8%,移动游戏(包括平板和智能手机)方面,市场规模占整体游戏市场42%,占比最大,约457.38亿美元。预计2018年,全球手游市场规模将达到521亿美元,也将会是所有平台中,游戏规模增速最快、市场规模最大的游戏平台。 而在整个智能手机的普及率上,IOS的手机也占了将近半壁江山,同时它的CPI和相对更高,人群的付费意愿和能力相比Android也会略高。 但是一款手游要想发布在苹果商店的应用市场,最头痛的莫过于审核。最近,苹果在官网给出了截至2016年6月份应用被拒绝的十大条款(其中63%以上的应用被拒绝都是因为这10个条款),另外一个主要的原因就是跨境网络传输的不稳定、延迟高也是造成审核失败的重要原因,此方案目的是为了加速苹果商店审核的网

优秀的个人博客,低调大师

java nio之通道和Gather技术

学到这一步,就可以和操作系统的一些IO调用结合起来了。 感觉到设计系统和语言的人是多么的牛X。 能考虑到的细节是多么的复杂! 下一步, file io和socket~~~~ 看书的深度和系统性,还是一篇网上的文章无法比的! 致敬! package com.ronsoft.books.nio.channels; import java.nio.ByteBuffer; import java.nio.channels.ReadableByteChannel; import java.nio.channels.WritableByteChannel; import java.nio.channels.Channels; import java.io.IOException; import java.nio.channels.GatheringByteChannel; import java.io.FileOutputStream; import java.util.Random; import java.util.List; import java.util.LinkedList; public class ChannelCopy { private static final String DEMOGRAPHIC = "blahblah.txt"; public static void main(String[] args) throws Exception { // TODO Auto-generated method stub /* ReadableByteChannel source = Channels.newChannel(System.in); WritableByteChannel dest = Channels.newChannel(System.out); channelCopy1(source, dest); // channelCopy2(source, dest); source.close(); dest.close(); */ int reps = 10; if (args.length > 0) { reps = Integer.parseInt(args[0]); } FileOutputStream fos = new FileOutputStream(DEMOGRAPHIC); GatheringByteChannel gatherChannel = fos.getChannel(); ByteBuffer []bs = utterBS(reps); while (gatherChannel.write(bs) > 0) { } System.out.println("Mindshare paradigms synergized to " + DEMOGRAPHIC); fos.close(); } private static void channelCopy1(ReadableByteChannel src, WritableByteChannel dest) throws IOException{ ByteBuffer buffer = ByteBuffer.allocate(16 * 1024); while (src.read(buffer) != -1) { buffer.flip(); dest.write(buffer); buffer.compact(); } buffer.flip(); while (buffer.hasRemaining()) { dest.write(buffer); } } private static void channelCopy2(ReadableByteChannel src, WritableByteChannel dest) throws IOException { ByteBuffer buffer = ByteBuffer.allocate(10 * 1024); while (src.read(buffer) != -1) { buffer.flip(); while (buffer.hasRemaining()) { dest.write(buffer); } buffer.clear(); } } private static String []col1 = { "Aggregate", "Enable", "Leverage", "Facilitate", "Synergize", "Repurpose", "Strategize", "Reinvent", "Harness" }; private static String []col2 = { "cross-platform", "best-of-breed", "frictionless", "ubiquitous", "extensible", "compelling", "mission-critical", "collaborative", "integrated" }; private static String [] col3 = { "methodologies", "infomediaries", "platforms", "schemas", "mindshare", "paradigms", "functionalities", "web services", "infrastructures" }; private static String newLine = System.getProperty("line.separator"); @SuppressWarnings({ "unchecked", "rawtypes" }) private static ByteBuffer []utterBS(int howMany) throws Exception { List list = new LinkedList(); for (int i = 0; i < howMany; i++) { list.add(pickRandom(col1, " ")); list.add(pickRandom(col2, " ")); list.add(pickRandom(col3, newLine)); } ByteBuffer []bufs = new ByteBuffer[list.size()]; list.toArray(bufs); return (bufs); } private static Random rand = new Random(); private static ByteBuffer pickRandom(String []strings, String suffix) throws Exception { String string = strings[rand.nextInt(strings.length)]; int total = string.length() + suffix.length(); ByteBuffer buf = ByteBuffer.allocate(total); buf.put(string.getBytes("US-ASCII")); buf.put(suffix.getBytes("US-ASCII")); buf.flip(); return (buf); } }

资源下载

更多资源
Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册