You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by Peter Neumark <ne...@gmail.com> on 2011/07/13 16:56:33 UTC

Javascript: gen:nodejs generated code works in the browser

Hi,

I've always through its sort of strange to have separate code generators for
node.js and browser environments.
Since I'm trying to get the browser to work as a thrift server (responding
to requests coming from the webserver),
I need to use the node.js code generator.

I got a proof of concept working:
https://github.com/postlock/thrift-over-socketio

Is anybody else interested in converging the browser/node.js javascript libs
and code generator as much as possible?

Peter

Re: Javascript: gen:nodejs generated code works in the browser

Posted by ro...@bufferoverflow.ch.
yes, we do that within the JavaScript test suite. It uses the Java  
Test Suite for the server side.

just execute the following commands:
cd lib/js/test/
ant (=> lint)
ant testserver (=> http://localhost:8088/test/test.html )


-Roger

Quoting Peter Neumark <ne...@gmail.com>:

> I confess I haven't been able to keep up with the current state of the
> unified test suite initiative.
> Is it possible to match a node.js test client with a test server written in
> another language?
>
> Peter
>
> On Thu, Jul 14, 2011 at 7:05 AM, <ro...@bufferoverflow.ch> wrote:
>
>> That's a cool feature Peter!
>>
>> I would really like to have a aligned JavaScript and Node.js Thrift
>> implementation.
>> Today, lot of code is duplicated and I think it should be possible to use
>> the same lib for JavaScript and node.js
>>
>> The following essentials are still missing for node.js:
>> Node.js Testsuite =>  
>> https://issues.apache.org/**jira/browse/THRIFT-1134<https://issues.apache.org/jira/browse/THRIFT-1134>
>> Node.js Tutorial =>  
>> https://issues.apache.org/**jira/browse/THRIFT-1135<https://issues.apache.org/jira/browse/THRIFT-1135>
>>
>> It would be great to see some patches in that area!
>>
>> Regards
>> Roger
>>
>>
>>
>> Quoting Peter Neumark <ne...@gmail.com>:
>>
>>  Hi,
>>>
>>> I've always through its sort of strange to have separate code generators
>>> for
>>> node.js and browser environments.
>>> Since I'm trying to get the browser to work as a thrift server (responding
>>> to requests coming from the webserver),
>>> I need to use the node.js code generator.
>>>
>>> I got a proof of concept working:
>>> https://github.com/postlock/**thrift-over-socketio<https://github.com/postlock/thrift-over-socketio>
>>>
>>> Is anybody else interested in converging the browser/node.js javascript
>>> libs
>>> and code generator as much as possible?
>>>
>>> Peter
>>>
>>>
>>
>>
>> ------------------------------**------------------------------**----
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Re: Javascript: gen:nodejs generated code works in the browser

Posted by Peter Neumark <ne...@gmail.com>.
I confess I haven't been able to keep up with the current state of the
unified test suite initiative.
Is it possible to match a node.js test client with a test server written in
another language?

Peter

On Thu, Jul 14, 2011 at 7:05 AM, <ro...@bufferoverflow.ch> wrote:

> That's a cool feature Peter!
>
> I would really like to have a aligned JavaScript and Node.js Thrift
> implementation.
> Today, lot of code is duplicated and I think it should be possible to use
> the same lib for JavaScript and node.js
>
> The following essentials are still missing for node.js:
> Node.js Testsuite => https://issues.apache.org/**jira/browse/THRIFT-1134<https://issues.apache.org/jira/browse/THRIFT-1134>
> Node.js Tutorial => https://issues.apache.org/**jira/browse/THRIFT-1135<https://issues.apache.org/jira/browse/THRIFT-1135>
>
> It would be great to see some patches in that area!
>
> Regards
> Roger
>
>
>
> Quoting Peter Neumark <ne...@gmail.com>:
>
>  Hi,
>>
>> I've always through its sort of strange to have separate code generators
>> for
>> node.js and browser environments.
>> Since I'm trying to get the browser to work as a thrift server (responding
>> to requests coming from the webserver),
>> I need to use the node.js code generator.
>>
>> I got a proof of concept working:
>> https://github.com/postlock/**thrift-over-socketio<https://github.com/postlock/thrift-over-socketio>
>>
>> Is anybody else interested in converging the browser/node.js javascript
>> libs
>> and code generator as much as possible?
>>
>> Peter
>>
>>
>
>
> ------------------------------**------------------------------**----
> This message was sent using IMP, the Internet Messaging Program.
>
>

Re: Javascript: gen:nodejs generated code works in the browser

Posted by ro...@bufferoverflow.ch.
That's a cool feature Peter!

I would really like to have a aligned JavaScript and Node.js Thrift  
implementation.
Today, lot of code is duplicated and I think it should be possible to  
use the same lib for JavaScript and node.js

The following essentials are still missing for node.js:
Node.js Testsuite => https://issues.apache.org/jira/browse/THRIFT-1134
Node.js Tutorial => https://issues.apache.org/jira/browse/THRIFT-1135

It would be great to see some patches in that area!

Regards
Roger


Quoting Peter Neumark <ne...@gmail.com>:

> Hi,
>
> I've always through its sort of strange to have separate code generators for
> node.js and browser environments.
> Since I'm trying to get the browser to work as a thrift server (responding
> to requests coming from the webserver),
> I need to use the node.js code generator.
>
> I got a proof of concept working:
> https://github.com/postlock/thrift-over-socketio
>
> Is anybody else interested in converging the browser/node.js javascript libs
> and code generator as much as possible?
>
> Peter
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.