baifendian / harpc Goto Github PK
View Code? Open in Web Editor NEW基于Thrift的跨语言、高可用、高性能、轻量级的RPC框架。
License: Apache License 2.0
基于Thrift的跨语言、高可用、高性能、轻量级的RPC框架。
License: Apache License 2.0
RT:
使用0.10.0编译Thrift文件的时候生成的java文件实现了org.apache.thrift.ProcessFunction的handleRuntimeExceptions函数,但是0.10.0的java包里面的org.apache.thrift.ProcessFunction是没有handleRuntimeExceptions这个函数的,请问怎么解决生成的时候不生成handleRuntimeExceptions这个函数?
php不是最好的编程语言么?为什么不支持
读者使用原生的thrift的java版本,内网10M的带宽平均每1k的请求数据也要1~2ms左右,请问您的0.32秒是怎么测出来的,有具体的测试代码示例吗
client side 随机出现, 每一次出错 在 server 那里 ,同样的方法会被调用 多次
怎么破?
有时会伴有以下“错误”
No handlers could be found for logger "bfd.harpc.loadbalancer"
Traceback (most recent call last):
File "/home/steven/gits/deploy_lda/server_test_hrpc.py", line 61, in <module>
rv=proxy_client.train(X[0:9000],y[0:9000],32,'justtest')
File "/usr/local/lib/python2.7/dist-packages/bfd/harpc/client.py", line 181, in _method_proxy
return self._method_call(method_name, *args)
File "/usr/local/lib/python2.7/dist-packages/bfd/harpc/client.py", line 217, in _method_call
raise RpcException("Connection request timeout!")
bfd.harpc.exceptions.RpcException
Exception in thread Thread-3 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
File "/usr/lib/python2.7/threading.py", line 763, in run
File "/usr/local/lib/python2.7/dist-packages/kazoo-2.2.1-py2.7.egg/kazoo/protocol/connection.py", line 477, in zk_loop
File "/usr/lib/python2.7/threading.py", line 586, in set
File "/usr/lib/python2.7/threading.py", line 407, in notifyAll
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
多线程执行时throw new ResourceExhaustedException("No backends available!");
会大量的发生。
参考
部分报错信息, 直连address的方式没有以下问题:
2017-06-20 00:35:35,969 INFO [main-EventThread] org.apache.curator.framework.state.ConnectionStateManager: State change: CONNECTED
2017-06-20 00:35:36,049 ERROR [main] com.bfd.harpc.registry.ZkClientRegistry: Create node error in the path : ${服务全名}/clients/${host}:0:i_
java.lang.IllegalArgumentException: Path must start with / character
at org.apache.curator.utils.PathUtils.validatePath(PathUtils.java:54)
at org.apache.curator.utils.PathUtils.validatePath(PathUtils.java:37)
at org.apache.curator.utils.ZKPaths.fixForNamespace(ZKPaths.java:63)
at org.apache.curator.framework.imps.NamespaceImpl.fixForNamespace(NamespaceImpl.java:82)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.fixForNamespace(CuratorFrameworkImpl.java:579)
at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:434)
at org.apache.curator.framework.imps.CreateBuilderImpl.forPath(CreateBuilderImpl.java:44)
at com.bfd.harpc.registry.ZkClientRegistry.buildPathClients(ZkClientRegistry.java:125)
at com.bfd.harpc.registry.ZkClientRegistry.register(ZkClientRegistry.java:98)
at com.bfd.harpc.config.ClientConfig.createProxy(ClientConfig.java:149)
.......
我看了一下源代码,好像没有实现请求中的context的,不知道在实际的微服务框架中如何进行请求调用链的追踪?
如果通过本地直接启动服务端,在页面上是可以有“查看/删除”两个选项的。
但是一旦通过web的“+server”按钮添加之后,这个服务就没办法删除掉了(删除按钮不见了)。同时,在zookeeper中的地址 /harpc/service$name/servers/ip:port 是无法被rmr命令删除的。
我不理解这是设计上的问题,还是我操作不正确?
一个场景,一个codis放着数据D,然后我在多台机器里起着进程,每个进程里存在这么一份D,
我期望当codis被修改的时候,他们来调一下我的函数,这个函数会重读这个D。
我期望所有harpc控制的进程都执行这样的操作,而不是选一个。
直接用thrift没问题;用HARPC就不行
这个问题对算法上服务影响很大
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.