Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- RPC



  HTTP is not a transport protocol, HTTP is not RPC

Recently there was a question on the forums asking why we encourage usage of HttpRequestMessage<T> / HttpResponseMessage<T> in the signature of a web api implementation. The point made in the post is that if you have an ICalculator contract which your API implements, then it’s violating SOC / inappropriate to have those messages as params and in the contract. The argument is valid when looking at HTTP from the standpoint of an RPC mechanism, which is actually a quite co...

   HTTP,Transport protocol,RPC     2012-01-19 10:14:26

  Networking Terminologies

Portmaps sudo apt-get install -y portmap Portmap is a part of ONC RPC (Open Network Computing Remote Procedure) collection of software for implementing remote procedure calls between Computer Programs. It is widely used by NFS (Network File System) and NIS. Portmap is a server that converts RPC program number to DARPA protocol port number. It must be used in order to make RPC calls. Network Infomation Service (NIS) sudo apt-get install -y nis NIS is a client server directory service provi...

   Linux,Network programming,Network file system     2012-02-16 06:22:30

  Fix --go_out: protoc-gen-go: plugins are not supported

When generating RPC code using proto file template in GoLang, one may face the issue like below when running the command protoc. Error: exit status 1 Output: --go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC See https://grpc.io/docs/languages/go/quickstart/#regenerate-grpc-code for more information. Normally this issue is caused because the version of protoc-gen-go being used is not correct. One way to fix the issue is to follow the instructions ...

   GOLANG,PROTO BUFFER,PLUGIN     2021-07-09 03:41:11

  Why hasn't Facebook migrated away from PHP?

The reason Facebook hasn't migrated away from PHP is because it has incumbent inertia (it's what's there) and Facebook's engineers have managed to work around many of its flaws through a combination of patches at all levels of the stack and excellent internal discipline via code convention and style - the worst attributes of the language are avoided and coding style is rigidly enforced through a fairly tight culture of code review (failing to adhere to the style and "going cowboy" by writ...

   Facebook,PHP,Migration,Bad feature,Codebase     2012-02-24 05:14:23

  How to do pprof for gRPC service

gRPC is a RPC framework based on HTTP and is frequently used for communications among micro service inside the same organization network. However,  the service functions cannot be accessed via normal HTTP URL as it's not a WEB framework. In this case, how to do pprof on a gRPC service? The trick is starting a HTTP server asynchronously while starting the gRPC service. This HTTP server can be accessed to run prrof debug. go func(){ http.ListenAndServe(":10001", nil) }() Since it uses the de...

   GOLANG,PPROF,GRPC     2021-01-29 23:11:33

  REST和gRPC对比全知道

长期以来,REST是构建API的唯一“标准”。它取代了混乱的“太多XML”的SOAP。但是近年来,出现了新的替代品。2015 年,Facebook 向公众发布了GraphQL,而 2016 年,Google 推出了gRPC。本文将重点介绍 gRPC,并与仍广泛使用的 REST 进行比较。 概述 以下表格将为您提供讨论点的概述,并显示 REST 和 gRPC 的优劣之处。 主题 REST gRPC 标准化 没有标准 定义明确 范式 基于资源...

   COMPARISON,GRPC,REST     2023-04-29 06:44:09

  php://input in PHP

When using xml-rpc, server side will get the data from client with php://input method instead of $_POST. Hence today we will discuss php://input. PHP official manual has below explanation to php://input: “php://input allows you to read raw POST data. It is a less memory intensive alternative to $HTTP_RAW_POST_DATA and does not need any special php.ini directives. php://input is not available with enctype=”multipart/form-data”. Here we und...

   php://input, IO, input     2013-02-25 20:43:00

  Some thoughts about microservice adoption

Nowadays microservice is very popular among companies with the increasing complexity of systems. The goal is to make each microservice to handle one specific job and handle it well. This normally would provide the benefit of maintaining the service easily and isolating errors and making the service more reliable and scalable. The benefits of adopting microservice are obvious. Maintainability. Decouple functions so that each function can be maintained separately which reduces the risk of issue ...

   ADVANTAGE,DISADVANTAGE,MICRO SERVICE     2020-09-05 01:25:05

  Apps and web apps and the future

Dave Winer: Why apps are not the future: The great thing about the web is linking. I don’t care how ugly it looks and how pretty your app is, if I can’t link in and out of your world, it’s not even close to a replacement for the web. Let’s set aside one thing right away. The browser is an app. Text editors, outliners, and web servers are apps. And, without them, there’s no web at all. Somebody has to write these things. That implies APIs and more tools ...

   App,Web app,Future,Difference     2011-12-14 07:10:43

  A mini post on GoLang context

In a GoLang web server, every request coming in will be handled by a goroutine. In the request handler, the logic may also need to create new goroutine to handle other tasks like RPC call. When the request is processed and response is returned, these goroutines created need to be exited so that no goroutine leak should happen. package main import ( "fmt" "log" "net/http" ) func main() { http.HandleFunc("/echo", func(w http.ResponseWriter, r *http.Request) { fmt.Println(&r) w.Write(...

   CONTEXT,GOLANG     2019-12-14 06:21:02