You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Luciano Resende <lu...@gmail.com> on 2009/05/13 07:07:56 UTC

[1.x] Enhancements to binding-http

I have finished implementing wire format and operation selector into
our http binding. While all the original HTTP binding features are
preserved and you can continue to use them in your apps, you now have
the ability to change the wire format and operation selector that
would follow the JSON-RPC protocol rules.  See example below :

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
	targetNamespace="http://jsonrpc"
	xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
	xmlns:jsonrpc="http://jsonrpc"
	name="JSONRPCBinding">

    <service name="EchoService" promote="EchoComponent">
        <interface.java interface="echo.Echo"/>
        <tuscany:binding.http uri="http://localhost:8085/EchoService">
           <tuscany:wireFormat.jsonrpc/>
           <tuscany:operationSelector.jsonrpc/>
        </tuscany:binding.http>
    </service>

    <component name="EchoComponent">
        <implementation.java class="echo.EchoComponentImpl"/>
    </component>
</composite>

Note that these wire formats and operation selectors are plugable, and
we can plug new types such as (json, xml, etc... )

Once we feel comfortable with this approach, we could probably
simplify the JSON-RPC binding to produce a HTTP binding model
configured to use JSON-RPC wire format and operation selector.

Thoughts ?

-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: [1.x] Enhancements to binding-http

Posted by Simon Laws <si...@googlemail.com>.
> Also, I would like to study on some technical details about wire formats and
> operation selectors
> from SCA and Tuscany point of view. Can you pls guide me on this?
>

Hi Ram

For overview material see the "Request Response Binding" page [1] and
look at the bottom of the JMS Binding extension page [2] in the
implementation notes section.

Let us know if you want pointers to actual code.

Simon

[1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Request+Response+Binding
[2] http://tuscany.apache.org/sca-java-bindingjms.html

Re: [1.x] Enhancements to binding-http

Posted by Ramkumar R <ra...@gmail.com>.
Hi Luciano,

Cool stuff, I would like to experiment with this new wire format and
operation selector.

Do we have some samples in place to have a feel of this feature?

Also, I would like to study on some technical details about wire formats and
operation selectors
from SCA and Tuscany point of view. Can you pls guide me on this?

On Wed, May 13, 2009 at 10:37 AM, Luciano Resende <lu...@gmail.com>wrote:

> I have finished implementing wire format and operation selector into
> our http binding. While all the original HTTP binding features are
> preserved and you can continue to use them in your apps, you now have
> the ability to change the wire format and operation selector that
> would follow the JSON-RPC protocol rules.  See example below :
>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>        targetNamespace="http://jsonrpc"
>        xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0"
>        xmlns:jsonrpc="http://jsonrpc"
>        name="JSONRPCBinding">
>
>    <service name="EchoService" promote="EchoComponent">
>        <interface.java interface="echo.Echo"/>
>        <tuscany:binding.http uri="http://localhost:8085/EchoService">
>           <tuscany:wireFormat.jsonrpc/>
>           <tuscany:operationSelector.jsonrpc/>
>        </tuscany:binding.http>
>    </service>
>
>    <component name="EchoComponent">
>        <implementation.java class="echo.EchoComponentImpl"/>
>    </component>
> </composite>
>
> Note that these wire formats and operation selectors are plugable, and
> we can plug new types such as (json, xml, etc... )
>
> Once we feel comfortable with this approach, we could probably
> simplify the JSON-RPC binding to produce a HTTP binding model
> configured to use JSON-RPC wire format and operation selector.
>
> Thoughts ?
>
> --
> Luciano Resende
> Apache Tuscany, Apache PhotArk
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>



-- 
Thanks & Regards,
Ramkumar Ramalingam

Re: [1.x] Enhancements to binding-http

Posted by Simon Laws <si...@googlemail.com>.
On Wed, May 13, 2009 at 4:17 PM, Luciano Resende <lu...@gmail.com> wrote:
> On Wed, May 13, 2009 at 12:19 AM, Simon Laws <si...@googlemail.com> wrote:
>> Hi Luciano
>>
>> Nice work. About your last comment. "produce a HTTP binding model
>> configured to use JSON-RPC wire format and operation selector.". How
>> would that differ from what you have presented here? I.e.
>>
>>        <tuscany:binding.http uri="http://localhost:8085/EchoService">
>>           <tuscany:wireFormat.jsonrpc/>
>>           <tuscany:operationSelector.jsonrpc/>
>>        </tuscany:binding.http>
>>
>> Simon
>>
>
>
> This would allow users to continue to define binding.jsonrpc for
> compatibility reasons, and internally we would map to the wire format
> allowing us to maintain on codebase only.
>
>       <tuscany:binding.jsonrpc uri="http://localhost:8085/EchoService"/>
>
> --
> Luciano Resende
> Apache Tuscany, Apache PhotArk
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/
>

Aaaaaah I see. Thanks

Simon

Re: [1.x] Enhancements to binding-http

Posted by Luciano Resende <lu...@gmail.com>.
On Wed, May 13, 2009 at 12:19 AM, Simon Laws <si...@googlemail.com> wrote:
> Hi Luciano
>
> Nice work. About your last comment. "produce a HTTP binding model
> configured to use JSON-RPC wire format and operation selector.". How
> would that differ from what you have presented here? I.e.
>
>        <tuscany:binding.http uri="http://localhost:8085/EchoService">
>           <tuscany:wireFormat.jsonrpc/>
>           <tuscany:operationSelector.jsonrpc/>
>        </tuscany:binding.http>
>
> Simon
>


This would allow users to continue to define binding.jsonrpc for
compatibility reasons, and internally we would map to the wire format
allowing us to maintain on codebase only.

       <tuscany:binding.jsonrpc uri="http://localhost:8085/EchoService"/>

-- 
Luciano Resende
Apache Tuscany, Apache PhotArk
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: [1.x] Enhancements to binding-http

Posted by Simon Laws <si...@googlemail.com>.
snip...
>        <tuscany:binding.http uri="http://localhost:8085/EchoService">
>           <tuscany:wireFormat.jsonrpc/>
>           <tuscany:operationSelector.jsonrpc/>
>        </tuscany:binding.http>
>    </service>
>
>    <component name="EchoComponent">
>        <implementation.java class="echo.EchoComponentImpl"/>
>    </component>
> </composite>
>
> Note that these wire formats and operation selectors are plugable, and
> we can plug new types such as (json, xml, etc... )
>
> Once we feel comfortable with this approach, we could probably
> simplify the JSON-RPC binding to produce a HTTP binding model
> configured to use JSON-RPC wire format and operation selector.

Hi Luciano

Nice work. About your last comment. "produce a HTTP binding model
configured to use JSON-RPC wire format and operation selector.". How
would that differ from what you have presented here? I.e.

        <tuscany:binding.http uri="http://localhost:8085/EchoService">
           <tuscany:wireFormat.jsonrpc/>
           <tuscany:operationSelector.jsonrpc/>
        </tuscany:binding.http>

Simon