[GitHub] [incubator-brpc] wasphin commented on pull request #1214: add option to allow access methods from default url

2020-09-01 Thread GitBox


wasphin commented on pull request #1214:
URL: https://github.com/apache/incubator-brpc/pull/1214#issuecomment-684545119


   @gydong  这样是可以通过 `/Echo` 访问 ``SERVICE`` 的 ``Echo`` 方法, 但是不能通过原路径 
``/SERVICE/Echo`` 进行访问, 映射后是全路径, 这样如果想要在有映射的情况下, 保留通过 ``/SERVICE/Echo`` 访问的方式, 
那么需要怎么配呢?
   
   我这边的场景是服务端希望可以支持 ``gRPC`` 及 ``HTTP`` 进行访问:
   1. ``gRPC`` 部分直接使用 ``proto`` 定义的方法进行访问, 即: ``/SERVICE_FULL_NAME/Echo``;
   2. ``HTTP`` 则通过映射后的路径进行访问, 即: ``/v1/xxx/Echo``.
   
   同时还希望保留 ``default_method`` 的行为.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[GitHub] [incubator-brpc] gydong commented on pull request #1214: add option to allow access methods from default url

2020-09-01 Thread GitBox


gydong commented on pull request #1214:
URL: https://github.com/apache/incubator-brpc/pull/1214#issuecomment-684574456


   嗯,你说的对,我去了解一下相关背景,看看如何满足你的需求更合适



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[GitHub] [incubator-brpc] jamesge commented on a change in pull request #1214: add option to allow access methods from default url

2020-09-01 Thread GitBox


jamesge commented on a change in pull request #1214:
URL: https://github.com/apache/incubator-brpc/pull/1214#discussion_r481085907



##
File path: src/brpc/server.h
##
@@ -334,6 +339,7 @@ class Server {
 struct MethodProperty {
 bool is_builtin_service;
 bool own_method_status;
+bool restful_mapped_only;

Review comment:
   这个要移到下面的params中。

##
File path: src/brpc/server.h
##
@@ -277,6 +277,11 @@ struct ServiceOptions {
 // Default: empty
 std::string restful_mappings;
 
+// Work with restful_mappings, if this flag is true, reject methods 
accessed
+// from default urls (SERVICE/METHOD).
+// Default: true
+bool restful_mapped_only;

Review comment:
   叫allow_default_url吧,更明确一点。注意改名后,值是相反的。





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[GitHub] [incubator-brpc] wasphin commented on a change in pull request #1214: add option to allow access methods from default url

2020-09-01 Thread GitBox


wasphin commented on a change in pull request #1214:
URL: https://github.com/apache/incubator-brpc/pull/1214#discussion_r481186746



##
File path: src/brpc/server.h
##
@@ -277,6 +277,11 @@ struct ServiceOptions {
 // Default: empty
 std::string restful_mappings;
 
+// Work with restful_mappings, if this flag is true, reject methods 
accessed
+// from default urls (SERVICE/METHOD).
+// Default: true
+bool restful_mapped_only;

Review comment:
   已改





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[GitHub] [incubator-brpc] wasphin commented on a change in pull request #1214: add option to allow access methods from default url

2020-09-01 Thread GitBox


wasphin commented on a change in pull request #1214:
URL: https://github.com/apache/incubator-brpc/pull/1214#discussion_r481186625



##
File path: src/brpc/server.h
##
@@ -334,6 +339,7 @@ class Server {
 struct MethodProperty {
 bool is_builtin_service;
 bool own_method_status;
+bool restful_mapped_only;

Review comment:
   已改





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[GitHub] [incubator-brpc] guodongxiaren opened a new issue #1225: rpc_dump的功能可以自定义频率吗?

2020-09-01 Thread GitBox


guodongxiaren opened a new issue #1225:
URL: https://github.com/apache/incubator-brpc/issues/1225


   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   不用生产环境来dump流量。用的非生产环境,但是非生产环境的流量很小。想dump流量貌似很慢。
   
   **Describe the solution you'd like (描述你期望的解决方法)**
   调节一下随机策略。加一个控制因子
   ```c
   inline size_t is_collectable(CollectorSpeedLimit* speed_limit) {
   if (speed_limit->ever_grabbed) { // most common case
   const size_t sampling_range = speed_limit->sampling_range;
   // fast_rand is faster than fast_rand_in
   if ((butil::fast_rand() & (COLLECTOR_SAMPLING_BASE - 1)) >= 
sampling_range) {
   return 0;
   }
   return sampling_range;
   }
   // Slower, only runs before -bvar_collector_expected_per_second samples 
are
   // collected to calculate a more reasonable sampling_range for the type.
   extern size_t 
is_collectable_before_first_time_grabbed(CollectorSpeedLimit*);
   return is_collectable_before_first_time_grabbed(speed_limit);
   }
   ```
   这个sampling_range 能不能是通过控制因子计算的。
   
   **Describe alternatives you've considered (描述你想到的折衷方案)**
   
   
   **Additional context/screenshots (更多上下文/截图)**
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[GitHub] [incubator-brpc] wasphin commented on pull request #1214: add option to allow access methods from default url

2020-09-01 Thread GitBox


wasphin commented on pull request #1214:
URL: https://github.com/apache/incubator-brpc/pull/1214#issuecomment-685232133


   [travis](https://travis-ci.org/github/apache/incubator-brpc/jobs/723097214) 
在编译 unittest 时失败, 但应该与此次改动无关.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[GitHub] [incubator-brpc] jamesge commented on pull request #1214: add option to allow access methods from default url

2020-09-01 Thread GitBox


jamesge commented on pull request #1214:
URL: https://github.com/apache/incubator-brpc/pull/1214#issuecomment-685273736


   @wasphin thanks for the commit and UT



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[incubator-brpc] branch master updated (8801a84 -> 7bda11b)

2020-09-01 Thread jamesge
This is an automated email from the ASF dual-hosted git repository.

jamesge pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git.


from 8801a84  Merge pull request #1224 from tanzhongyi003/master
 new ca66d1f  add option to allow access methods from default url
 new d50f3fa  rename restful_mapped_only to allow_default_url
 new 4eea737  Accessing via default url
 new 7bda11b  Merge pull request #1214 from 
wasphin/feature/restful-mapped-only

The 2116 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/brpc/policy/http_rpc_protocol.cpp |  2 +-
 src/brpc/server.cpp   |  9 -
 src/brpc/server.h |  9 -
 test/brpc_server_unittest.cpp | 35 +++
 4 files changed, 52 insertions(+), 3 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[GitHub] [incubator-brpc] jamesge merged pull request #1214: add option to allow access methods from default url

2020-09-01 Thread GitBox


jamesge merged pull request #1214:
URL: https://github.com/apache/incubator-brpc/pull/1214


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: Podling Brpc Report Reminder - September 2020

2020-09-01 Thread Kevin A. McGrail
Hi All, anyone working on the draft of your report?  It's due today for
mentors to review.

Regards,

KAM

On 8/26/2020 9:55 PM, jmcl...@apache.org wrote:
> Dear podling,
>
> This email was sent by an automated system on behalf of the Apache
> Incubator PMC. It is an initial reminder to give you plenty of time to
> prepare your quarterly board report.
>
> The board meeting is scheduled for Wed, 16 September 2020.
> The report for your podling will form a part of the Incubator PMC
> report. The Incubator PMC requires your report to be submitted 2 weeks
> before the board meeting, to allow sufficient time for review and
> submission (Wed, September 02).
>
> Please submit your report with sufficient time to allow the Incubator
> PMC, and subsequently board members to review and digest. Again, the
> very latest you should submit your report is 2 weeks prior to the board
> meeting.
>
> Candidate names should not be made public before people are actually
> elected, so please do not include the names of potential committers or
> PPMC members in your report.
>
> Thanks,
>
> The Apache Incubator PMC
>
> Submitting your Report
>
> --
>
> Your report should contain the following:
>
> *   Your project name
> *   A brief description of your project, which assumes no knowledge of
> the project or necessarily of its field
> *   A list of the three most important issues to address in the move
> towards graduation.
> *   Any issues that the Incubator PMC or ASF Board might wish/need to be
> aware of
> *   How has the community developed since the last report
> *   How has the project developed since the last report.
> *   How does the podling rate their own maturity.
>
> This should be appended to the Incubator Wiki page at:
>
> https://cwiki.apache.org/confluence/display/INCUBATOR/September2020
>
> Note: This is manually populated. You may need to wait a little before
> this page is created from a template.
>
> Note: The format of the report has changed to use markdown.
>
> Mentors
> ---
>
> Mentors should review reports for their project(s) and sign them off on
> the Incubator wiki page. Signing off reports shows that you are
> following the project - projects that are not signed may raise alarms
> for the Incubator PMC.
>
> Incubator PMC
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
> For additional commands, e-mail: dev-h...@brpc.apache.org
>
-- 
Kevin A. McGrail
kmcgr...@apache.org

Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: Podling Brpc Report Reminder - September 2020

2020-09-01 Thread Kevin A. McGrail
I have signed off on the report!

On 8/29/2020 10:28 PM, tan zhongyi wrote:
> Hi, justin,
> Thanks for reminder.
>
> I have finished the draft of brpc pod report,
> And is asking for review in our dev mail list.
>
> Best wishes.
>
> 在 2020/8/30 上午9:55,“jmcl...@apache.org” 写入:
>
> Dear podling,
>
> This email was sent by an automated system on behalf of the Apache
> Incubator PMC. It is an initial reminder to give you plenty of time to
> prepare your quarterly board report.
>
> The board meeting is scheduled for Wed, 16 September 2020.
> The report for your podling will form a part of the Incubator PMC
> report. The Incubator PMC requires your report to be submitted 2 weeks
> before the board meeting, to allow sufficient time for review and
> submission (Wed, September 02).
>
> Please submit your report with sufficient time to allow the Incubator
> PMC, and subsequently board members to review and digest. Again, the
> very latest you should submit your report is 2 weeks prior to the board
> meeting.
>
> Candidate names should not be made public before people are actually
> elected, so please do not include the names of potential committers or
> PPMC members in your report.
>
> Thanks,
>
> The Apache Incubator PMC
>
> Submitting your Report
>
> --
>
> Your report should contain the following:
>
> *   Your project name
> *   A brief description of your project, which assumes no knowledge of
> the project or necessarily of its field
> *   A list of the three most important issues to address in the move
> towards graduation.
> *   Any issues that the Incubator PMC or ASF Board might wish/need to be
> aware of
> *   How has the community developed since the last report
> *   How has the project developed since the last report.
> *   How does the podling rate their own maturity.
>
> This should be appended to the Incubator Wiki page at:
>
> https://cwiki.apache.org/confluence/display/INCUBATOR/September2020
>
> Note: This is manually populated. You may need to wait a little before
> this page is created from a template.
>
> Note: The format of the report has changed to use markdown.
>
> Mentors
> ---
>
> Mentors should review reports for their project(s) and sign them off on
> the Incubator wiki page. Signing off reports shows that you are
> following the project - projects that are not signed may raise alarms
> for the Incubator PMC.
>
> Incubator PMC
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
> For additional commands, e-mail: dev-h...@brpc.apache.org
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
> For additional commands, e-mail: dev-h...@brpc.apache.org

-- 
Kevin A. McGrail
kmcgr...@apache.org

Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



[GitHub] [incubator-brpc] weinberggithub closed issue #1218: brpc持续上传大文件

2020-09-01 Thread GitBox


weinberggithub closed issue #1218:
URL: https://github.com/apache/incubator-brpc/issues/1218


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org