Redian新闻
>
请问高手:thrift 要通过什么连database 比如 mysql ?
avatar
请问高手:thrift 要通过什么连database 比如 mysql ?# Java - 爪哇娇娃
z*r
1
是不是直接用c-api 或者 java appi 连mysql?
还是只能连hadoop?
不知道这里的高手有没有碰到过, 什么是比较好方案?
avatar
g*g
2
why do you want to use thrift to begin with? jdbc doesn't work for you?

【在 z******r 的大作中提到】
: 是不是直接用c-api 或者 java appi 连mysql?
: 还是只能连hadoop?
: 不知道这里的高手有没有碰到过, 什么是比较好方案?

avatar
z*r
3
因为,我们客户端在iphone 上,它要存取DB上的文件,以及执行linux 命令和返回值。
我们就想要 thrift 或者rest 来实现。
avatar
w*z
4
rest比thrift 强一百倍。client 用HTTP/json connect to server, server uses
jdbc to DB. you don't want client connect DB directly

值。

【在 z******r 的大作中提到】
: 因为,我们客户端在iphone 上,它要存取DB上的文件,以及执行linux 命令和返回值。
: 我们就想要 thrift 或者rest 来实现。

avatar
g*g
5
exactly what I would recommend, and no need to reinvent wheel when writing
an android or web client.

【在 w**z 的大作中提到】
: rest比thrift 强一百倍。client 用HTTP/json connect to server, server uses
: jdbc to DB. you don't want client connect DB directly
:
: 值。

avatar
z*r
6
那问下,哪个REST软件好,可扩展性好一点,上手快?
avatar
w*u
7
这叫人如何回答

【在 z******r 的大作中提到】
: 那问下,哪个REST软件好,可扩展性好一点,上手快?
avatar
w*z
8
we use Jersey, follow tutorial, can set up in a couple of hours. I normally
write one service within a week.

【在 z******r 的大作中提到】
: 那问下,哪个REST软件好,可扩展性好一点,上手快?
avatar
z*3
9
你们用hhvm了没?

normally

【在 w**z 的大作中提到】
: we use Jersey, follow tutorial, can set up in a couple of hours. I normally
: write one service within a week.

avatar
d*i
10
同意,Jersey很好,命名清楚而非常规范。

normally

【在 w**z 的大作中提到】
: we use Jersey, follow tutorial, can set up in a couple of hours. I normally
: write one service within a week.

avatar
w*z
11
we are moving services from PHP to Java. not going to mess up with PHP too
much.

【在 z*******3 的大作中提到】
: 你们用hhvm了没?
:
: normally

avatar
z*r
12
那能问下如果 在 php 实现基本的 REST接口,
针对一个小的set的 REST 接口是不是更简单?

【在 w**z 的大作中提到】
: we are moving services from PHP to Java. not going to mess up with PHP too
: much.

avatar
w*z
13
rest用HTTP, post用Json. php都有现成的HTTP client, 我们还用node 写了个
client lib, 我们所有的post JSON 都有固定的format, 统一了JSON format 剩下的就
是无脑加business logic, 所以我一个星期一个小service, 没问题。对了, 我们用
spring
di inject datasource, Jackson parse Json, very powerful and easy. I guess
that is what most people do.

【在 z******r 的大作中提到】
: 那能问下如果 在 php 实现基本的 REST接口,
: 针对一个小的set的 REST 接口是不是更简单?

avatar
z*r
14
是不是直接用c-api 或者 java appi 连mysql?
还是只能连hadoop?
不知道这里的高手有没有碰到过, 什么是比较好方案?
avatar
g*g
15
why do you want to use thrift to begin with? jdbc doesn't work for you?

【在 z******r 的大作中提到】
: 是不是直接用c-api 或者 java appi 连mysql?
: 还是只能连hadoop?
: 不知道这里的高手有没有碰到过, 什么是比较好方案?

avatar
z*r
16
因为,我们客户端在iphone 上,它要存取DB上的文件,以及执行linux 命令和返回值。
我们就想要 thrift 或者rest 来实现。
avatar
w*z
17
rest比thrift 强一百倍。client 用HTTP/json connect to server, server uses
jdbc to DB. you don't want client connect DB directly

值。

【在 z******r 的大作中提到】
: 因为,我们客户端在iphone 上,它要存取DB上的文件,以及执行linux 命令和返回值。
: 我们就想要 thrift 或者rest 来实现。

avatar
g*g
18
exactly what I would recommend, and no need to reinvent wheel when writing
an android or web client.

【在 w**z 的大作中提到】
: rest比thrift 强一百倍。client 用HTTP/json connect to server, server uses
: jdbc to DB. you don't want client connect DB directly
:
: 值。

avatar
z*r
19
那问下,哪个REST软件好,可扩展性好一点,上手快?
avatar
w*u
20
这叫人如何回答

【在 z******r 的大作中提到】
: 那问下,哪个REST软件好,可扩展性好一点,上手快?
avatar
w*z
21
we use Jersey, follow tutorial, can set up in a couple of hours. I normally
write one service within a week.

【在 z******r 的大作中提到】
: 那问下,哪个REST软件好,可扩展性好一点,上手快?
avatar
z*3
22
你们用hhvm了没?

normally

【在 w**z 的大作中提到】
: we use Jersey, follow tutorial, can set up in a couple of hours. I normally
: write one service within a week.

avatar
d*i
23
同意,Jersey很好,命名清楚而非常规范。

normally

【在 w**z 的大作中提到】
: we use Jersey, follow tutorial, can set up in a couple of hours. I normally
: write one service within a week.

avatar
w*z
24
we are moving services from PHP to Java. not going to mess up with PHP too
much.

【在 z*******3 的大作中提到】
: 你们用hhvm了没?
:
: normally

avatar
z*r
25
那能问下如果 在 php 实现基本的 REST接口,
针对一个小的set的 REST 接口是不是更简单?

【在 w**z 的大作中提到】
: we are moving services from PHP to Java. not going to mess up with PHP too
: much.

avatar
w*z
26
rest用HTTP, post用Json. php都有现成的HTTP client, 我们还用node 写了个
client lib, 我们所有的post JSON 都有固定的format, 统一了JSON format 剩下的就
是无脑加business logic, 所以我一个星期一个小service, 没问题。对了, 我们用
spring
di inject datasource, Jackson parse Json, very powerful and easy. I guess
that is what most people do.

【在 z******r 的大作中提到】
: 那能问下如果 在 php 实现基本的 REST接口,
: 针对一个小的set的 REST 接口是不是更简单?

avatar
z*r
27
反馈问题,
谢谢各位高手的意见,
最后还是确定用 thrift 和Restful 混合实现,thrift 实现backend api, 考虑到连
mysql 的效率问题,语言选择了 c/c++, 初步实现,效率还行;
上面再包一层 Restful API, 不知道怎么样。
avatar
g*g
28
如果真有瓶颈的话,也在mysql上,跟你用C++用java完全没关系。restful同样不是评
价。

【在 z******r 的大作中提到】
: 反馈问题,
: 谢谢各位高手的意见,
: 最后还是确定用 thrift 和Restful 混合实现,thrift 实现backend api, 考虑到连
: mysql 的效率问题,语言选择了 c/c++, 初步实现,效率还行;
: 上面再包一层 Restful API, 不知道怎么样。

avatar
b*y
29

Making things too complicated. I agree with good bug etc above...

【在 z******r 的大作中提到】
: 反馈问题,
: 谢谢各位高手的意见,
: 最后还是确定用 thrift 和Restful 混合实现,thrift 实现backend api, 考虑到连
: mysql 的效率问题,语言选择了 c/c++, 初步实现,效率还行;
: 上面再包一层 Restful API, 不知道怎么样。

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。