thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Chambers <mvchamb...@me.com>
Subject Re: Can separate generated serialization code from generated datatype definitions?
Date Fri, 05 Dec 2014 22:03:19 GMT

I only say it always gets in the way because as a project grows people tend to have to work
around it more and more (just my experience) and then it makes the DAOs seem inconsistent.
 Some use hibernate, some don't, some are 1/2 and 1/2. Just using the JdbcTemplate keeps it
consistent, and a bit faster as well.

Unless something has changed recently, Hibernate is not a serialization framework, its just
an ORM.

On Dec 5, 2014, at 4:55 PM, Stuart Reynolds <stu@stureynolds.com> wrote:

> Maybe Hibernate's as POS, maybe not. My point is Hibernate's not the
> other serialization framework people want to use in the same project
> as Thrift.
> 
> On Fri, Dec 5, 2014 at 10:27 AM, Matt Chambers <mvchambers@me.com> wrote:
>> 
>> Hibernate is always in the way.
>> 
>> Usually I just slap an HTTP Servlet up to serve my thrift services, then people can
use the thrift jquery client on top of my existing service instance that is already being
served out by another thrift server.
>> 
>> public class ThriftServlet extends TServlet implements HttpRequestHandler {
>> 
>>    @Autowired
>>    public ThriftServlet(PlowRpcService.Iface service) {
>>        super(new PlowRpcService.Processor<PlowRpcService.Iface>(service), new
TJSONProtocol.Factory());
>>    }
>> 
>>    @Override
>>    public void handleRequest(HttpServletRequest req, HttpServletResponse rsp)
>>            throws ServletException, IOException {
>>        doPost(req, rsp);
>>    }
>> }
>> 
>> -Matt
>> 
>> On Dec 5, 2014, at 12:35 PM, Stuart Reynolds <stu@stureynolds.com> wrote:
>> 
>>> Thanks -- I know about RowMapper (and many other workarounds).
>>> Hibernate is one of many serialization frameworks I work with (I'm
>>> happy with it, for the most part, and go around it when it gets in the
>>> way).
>>> 
>>> We also have a REST interface, and would like JSON or XML
>>> serialization of our business object. Here, again, I'd like to
>>> serialize these objects as plain JSON (not thrift JSON which adds
>>> considerable requirements on a REST client). Allowing Thrift exclusive
>>> ownership of the object definitions is a hindrance.
>>> 
>>> - Stuart
>>> 
>>> 
>>> On Fri, Dec 5, 2014 at 8:25 AM, Matt Chambers <mvchambers@me.com> wrote:
>>>> Correction
>>>> 
>>>> public List<ProjectT> getAll() {
>>>>       return jdbc.query("SELECT * FROM project", MAPPER);
>>>> }
>>>> 
>>>> On Dec 5, 2014, at 11:21 AM, Matt Chambers <mvchambers@me.com> wrote:
>>>> 
>>>>> public List<ProjectT> getAll() {
>>>>>     return jdbc.query("SELECT * FROM project");
>>>>> }
>>>> 
>> 


Mime
View raw message