muyinchen / migo-rpc Goto Github PK
View Code? Open in Web Editor NEW一个Java实现的轻量级的rpc小框架
一个Java实现的轻量级的rpc小框架
Hello, 如标题, 这样做,是为什么呢? 参考了Spring这类的框架代码?
channel.writeAndFlush(request);
//建立一个ResponseMap,将RequestId作为键,服务端回应的内容作为值保存于BlockingQueue,
// 最后一起保存在这个ResponseMap中
BlockingQueue blockingQueue = new ArrayBlockingQueue<>(1);
ResponseMapHelper.responseMap.put(request.getRequestId(), blockingQueue);
//poll(time):取走BlockingQueue里排在首位的对象,若不能立即取出,则可以等time参数规定的时间,取不到时返回null
return blockingQueue.poll(requestTimeoutMillis, TimeUnit.MILLISECONDS);
是否应该先: 构建等待队列 再发送数据
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.