All Projects → weibocom → Motan Openresty

weibocom / Motan Openresty

A cross-language RPC framework for rapid development of high performance distributed services based on OpenResty.

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Motan Openresty

Apioak
Full Lifecycle Management API Gateway.
Stars: ✭ 335 (+186.32%)
Mutual labels:  microservice, openresty, cloud-native, luajit, service-mesh, nginx
Kong
🦍 The Cloud-Native API Gateway
Stars: ✭ 30,838 (+26257.26%)
Mutual labels:  microservice, cloud-native, luajit, nginx
Luajit.io
luajit io framework
Stars: ✭ 277 (+136.75%)
Mutual labels:  openresty, luajit, nginx
Light 4j
A fast, lightweight and more productive microservices framework
Stars: ✭ 3,303 (+2723.08%)
Mutual labels:  microservice, cloud-native, service-mesh
Lua Resty Route
URL Routing Library for OpenResty Supporting Pluggable Matching Engines
Stars: ✭ 88 (-24.79%)
Mutual labels:  openresty, luajit, nginx
Krakend Ce
KrakenD Community Edition. Make your binary of KrakenD API Gateway
Stars: ✭ 245 (+109.4%)
Mutual labels:  microservice, cloud-native, service-mesh
apisix-website
Apache APISIX Website
Stars: ✭ 81 (-30.77%)
Mutual labels:  luajit, cloud-native, service-mesh
Kong Docs Cn
微服务 Api 网关 Kong 最新文档中文版
Stars: ✭ 371 (+217.09%)
Mutual labels:  microservice, openresty, nginx
Api Umbrella
Open source API management platform
Stars: ✭ 1,735 (+1382.91%)
Mutual labels:  openresty, luajit, nginx
Hemera
🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/
Stars: ✭ 773 (+560.68%)
Mutual labels:  microservice, rpc, cloud-native
Apisix
The Cloud-Native API Gateway
Stars: ✭ 7,920 (+6669.23%)
Mutual labels:  cloud-native, luajit, nginx
Go Zero
go-zero is a web and rpc framework written in Go. It's born to ensure the stability of the busy sites with resilient design. Builtin goctl greatly improves the development productivity.
Stars: ✭ 13,156 (+11144.44%)
Mutual labels:  microservice, rpc, cloud-native
Rpcx Gateway
http gateway for rpcx services. Clients in any programming languages can call them
Stars: ✭ 145 (+23.93%)
Mutual labels:  microservice, rpc, service-mesh
Lua Resty Redis Connector
Connection utilities for lua-resty-redis
Stars: ✭ 186 (+58.97%)
Mutual labels:  openresty, luajit, nginx
backk
Backk - Node.js framework for creating security-first cloud-native microservices for Kubernetes in Typescript
Stars: ✭ 14 (-88.03%)
Mutual labels:  microservice, rpc, cloud-native
Lua Resty Repl
Interactive console (REPL) for Openresty and luajit code
Stars: ✭ 165 (+41.03%)
Mutual labels:  openresty, luajit, nginx
Kubernetes Handbook
Kubernetes Handbook (Kubernetes指南) https://kubernetes.feisky.xyz
Stars: ✭ 4,511 (+3755.56%)
Mutual labels:  microservice, cloud-native, service-mesh
Lua Resty Post
HTTP post utility for openresty
Stars: ✭ 30 (-74.36%)
Mutual labels:  openresty, luajit, nginx
Lua Resty Http
Lua HTTP client cosocket driver for OpenResty / ngx_lua.
Stars: ✭ 1,647 (+1307.69%)
Mutual labels:  openresty, luajit, nginx
Jina Hub
An open-registry for hosting Jina executors via container images
Stars: ✭ 71 (-39.32%)
Mutual labels:  microservice, cloud-native

Motan-OpenResty

License https://travis-ci.org/weibocom/motan-openresty.svg?branch=master

Overview

Motan is a cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services.

This project is the OpenResty Motan implementation. Provides OpenResty motan server, motan client.

Features

  • Interactive with mulit language through motan2 protocol,such as Java, PHP.
  • Provides cluster support and integrate with popular service discovery services like Consul.
  • Supports advanced scheduling features like weighted load-balance, scheduling cross IDCs, etc.
  • Optimization for high load scenarios, provides high availability in production environment.

Quick Start

Installation

git clone https://github.com/weibocom/motan-openresty.git motan

The quick start gives very basic example of running client and server on the same machine. For the detailed information about using and developing Motan, please jump to Documents. the demo case is in the examples/ directory.

Motan server

  1. Create examples/motan-service/sys/MOTAN_SERVER_CONF to config service
;config of registries
[motan.registry.consul-test-motan2]
protocol=consul
host=10.211.55.3
port=8500
registryRetryPeriod=30000
registrySessionTimeout=10000
requestTimeout=5000

;conf of services
[motan.basicRefer.simple_rpc_ref]
group=yf-api-core
registry=consul-test-motan2
serialization=simple
protocol=motan2
version=0.1
requestTimeout=1000
haStrategy=failover
loadbalance=random
filter=accessLog,metrics
maxClientConnection=10
minClientConnection=1
retries=0
application=whos-agent

[motan.service.or_service]
group=idevz-test-static
path=com.weibo.motan.status
registry=consul-test-motan2
version=1
port=1234
protocol=motan2
serialization=simple
basicRefer=simple_rpc_service
  1. Write an implementation, create and start RPC Server: examples/motan-service/status.lua.
local setmetatable = setmetatable

local _M = {
    _VERSION = "0.1.0"
}

local mt = {__index = _M}

function _M.new(self, opts)
    return setmetatable({}, mt)
end

function _M.show_batch(self, opts)
    
    return "--> Motan" .. "->not name----->\n" .. sprint_r(opts) .. num

end

return _M

Motan client

  1. Create examples/motan-service/sys/MOTAN_CLIENT_CONF to config service for subscribe
;config of registries
[motan.registry.consul-test-motan2]
protocol=consul
host=10.211.55.3
port=8500
registryRetryPeriod=30000
registrySessionTimeout=10000
requestTimeout=5000

;conf of refers
[motan.basicRefer.simple_rpc_ref]
group=yf-api-core
registry=vintage-online
serialization=simple
protocol=motan2
version=0.1
requestTimeout=1000
haStrategy=failover
loadbalance=random
filter=accessLog,metrics
maxClientConnection=10
minClientConnection=1
retries=0
application=whos-agent

[motan.refer.rpc_test]
group=idevz-test-static
path=com.weibo.motan.status
registry=consul-test-motan2
protocol=motan2
serialization=simple
basicRefer=simple_rpc_ref
  1. Start call
local singletons = require "motan.singletons"
local serialize = require "motan.serialize.simple"
local client_map = singletons.client_map
local client = client_map["rpc_test"]
local res = client:show_batch({name = "idevz"})
print_r("<pre/>")
print_r(serialize.deserialize(res.body))

Documents

Contributors

License

Motan is released under the Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].