You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Linbin Chen (JIRA)" <ji...@apache.org> on 2015/06/26 04:58:05 UTC

[jira] [Updated] (SOLR-3192) NettySolrClient (supported by netty/protobuf)

     [ https://issues.apache.org/jira/browse/SOLR-3192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Linbin Chen updated SOLR-3192:
------------------------------
    Affects Version/s: 5.2.1
               Labels: netty  (was: )
        Fix Version/s:     (was: 4.9)
                       5x
          Description: 
solr support netty tcp, netty/tcp can handle asynchronous,efficient,keepalive ...

it's used on solr cloud or solrj


solr.proto maybe

{code:java}
package org.apache.solr.client.solrj.impl.netty.protocol;
option java_package = "org.apache.solr.client.solrj.impl.netty.protocol";
option java_outer_classname = "SolrProtocol";
option optimize_for = SPEED;

message Param {
	required string key = 1;
	// string[]
	repeated string value = 2;
}

message ContentStream {
	optional string name = 1;
	optional string sourceInfo = 2;
	optional string contentType = 3;
	required int64 size = 4;
	required bytes stream = 5;
}

message SolrRequest {
	required int64 rid = 1;
	optional string collection =2;
	required string path = 3;
	// multi param
	repeated Param param = 4;
	// multi content stream
	repeated ContentStream contentStream = 5;
	optional string method = 6;
}

message ResponseBody {
	required string contentType = 1;
	required bytes body = 2;
}

message KeyValue {
	required string key = 1;
	required string value = 2;
}

message ExceptionBody {
	required int32 code = 1;
	optional string message = 2;
	repeated KeyValue metadata = 3;
	optional string trace = 4;
}

message SolrResponse {
	required int64 rid = 1;
	optional ResponseBody responseBody = 2;
	//maybe multi Exception
	repeated ExceptionBody exceptionBody = 3;
}
{code}

  was:
solr support netty tcp, netty/tcp can handle asynchronous,efficient,keepalive ...

it's used on solr cloud or solrj


solr.proto maybe

{code:java}
package org.apache.solr.common.netty;
option java_package = "org.apache.solr.common.netty";
option java_outer_classname = "SolrProtocol";
option optimize_for = SPEED;

message SolrRequest {
	//request id
	required int64 rid = 1;
	//for string, json format, like http params
	required string params = 2;
	//(xml, json, solr_javabin) fix by params rt (request type)
	optional int32 streamsFormat = 3;
	repeated bytes streams = 4;
}

message SolrResponse {
	//response request id,
	required int64 rid = 1;
	//response format (xml, json, solr_javabin, csv ...)
	optional int32 responseFormat = 2;
	optional bytes response = 3;
	optional int32 errorCode = 4;
	optional string errorStr = 5;
}
{code}

              Summary: NettySolrClient (supported by netty/protobuf)  (was: NettySolrServer (supported by netty/protobuf) such as CommonsHttpSolrServer)

> NettySolrClient (supported by netty/protobuf)
> ---------------------------------------------
>
>                 Key: SOLR-3192
>                 URL: https://issues.apache.org/jira/browse/SOLR-3192
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 5.2.1
>            Reporter: Linbin Chen
>              Labels: netty
>             Fix For: Trunk, 5x
>
>         Attachments: solr.proto
>
>
> solr support netty tcp, netty/tcp can handle asynchronous,efficient,keepalive ...
> it's used on solr cloud or solrj
> solr.proto maybe
> {code:java}
> package org.apache.solr.client.solrj.impl.netty.protocol;
> option java_package = "org.apache.solr.client.solrj.impl.netty.protocol";
> option java_outer_classname = "SolrProtocol";
> option optimize_for = SPEED;
> message Param {
> 	required string key = 1;
> 	// string[]
> 	repeated string value = 2;
> }
> message ContentStream {
> 	optional string name = 1;
> 	optional string sourceInfo = 2;
> 	optional string contentType = 3;
> 	required int64 size = 4;
> 	required bytes stream = 5;
> }
> message SolrRequest {
> 	required int64 rid = 1;
> 	optional string collection =2;
> 	required string path = 3;
> 	// multi param
> 	repeated Param param = 4;
> 	// multi content stream
> 	repeated ContentStream contentStream = 5;
> 	optional string method = 6;
> }
> message ResponseBody {
> 	required string contentType = 1;
> 	required bytes body = 2;
> }
> message KeyValue {
> 	required string key = 1;
> 	required string value = 2;
> }
> message ExceptionBody {
> 	required int32 code = 1;
> 	optional string message = 2;
> 	repeated KeyValue metadata = 3;
> 	optional string trace = 4;
> }
> message SolrResponse {
> 	required int64 rid = 1;
> 	optional ResponseBody responseBody = 2;
> 	//maybe multi Exception
> 	repeated ExceptionBody exceptionBody = 3;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org