All Projects → yu120 → lemon

yu120 / lemon

Licence: MIT license
The micro service gateway framework. Dubbo, HTTP etc.

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to lemon

Xc Spring Cloud Alibaba
spring cloud alibaba(2.2.1最新版)+nacos+dubbo+gateWay+sentinel+rocketmq+(pgsql/mysql8.0的json支持)+ignite集成可用于docker分布式框架+分布式自动化任务+mybatis多数据源+seate+ shardingSphere分布式分库事务解决方案
Stars: ✭ 131 (+670.59%)
Mutual labels:  gateway, dubbo
Dubbo Go Pixiu
Based on the proxy gateway service of dubbo-go, it solves the problem that the external protocol calls the internal Dubbo cluster. At present, it supports HTTP and gRPC[developing].
Stars: ✭ 124 (+629.41%)
Mutual labels:  gateway, dubbo
dubbo-go-pixiu
Based on the proxy gateway service of dubbo-go, it solves the problem that the external protocol calls the internal Dubbo cluster. At present, it supports HTTP and gRPC[developing].
Stars: ✭ 385 (+2164.71%)
Mutual labels:  gateway, dubbo
Tesla
Tesla is a gateway service that provides dynamic routing,waf,support spring cloud,gRPC,DUBBO and more.
Stars: ✭ 161 (+847.06%)
Mutual labels:  gateway, dubbo
gateway-st
Single-tenant, S3 compatible server to interact with the Storj network
Stars: ✭ 49 (+188.24%)
Mutual labels:  gateway
apisix-go-plugin-runner
Go Plugin Runner for APISIX
Stars: ✭ 113 (+564.71%)
Mutual labels:  gateway
chirpstack-concentratord
Concentrator HAL daemon for LoRa gateways.
Stars: ✭ 53 (+211.76%)
Mutual labels:  gateway
Telephone-Remote-Control
No description or website provided.
Stars: ✭ 19 (+11.76%)
Mutual labels:  gateway
javayh-platform
javayh-platform 使用Springboot2.2.6为开发脚手架,SpringCloud为云端服务框架,Nacos为注册中心、分布式配置管理中心,Oauth2协议实现统一授权,Mybatis作为持久层框架,提供了代码生成器,SQL防注入,SwaggerAPI文档,Redis 作为缓存服务等强大的功能
Stars: ✭ 32 (+88.24%)
Mutual labels:  gateway
sx1302 hal
SX1302/SX1303 Hardware Abstraction Layer and Tools (packet forwarder...)
Stars: ✭ 121 (+611.76%)
Mutual labels:  gateway
BLOG-Microservice
demo use Spring boot +dubbo +redis +shiro
Stars: ✭ 13 (-23.53%)
Mutual labels:  dubbo
GetnetSDK
GETNET - Todos os passos e processos referentes à integração com o sistema de captura e autorização de transações financeiras da Getnet via as funcionalidades da API.
Stars: ✭ 44 (+158.82%)
Mutual labels:  gateway
Xproxy
reverse proxy implement in java
Stars: ✭ 20 (+17.65%)
Mutual labels:  gateway
AppServer
AppServer is a Desktop Proxy + App Server for HTML, MD files for Developers and Enthusiasts.
Stars: ✭ 59 (+247.06%)
Mutual labels:  gateway
dis-seckill
⭐⭐⭐⭐SpringBoot+Zookeeper+Dubbo打造分布式高并发商品秒杀系统
Stars: ✭ 187 (+1000%)
Mutual labels:  dubbo
devicehive-python
DeviceHive Python library
Stars: ✭ 29 (+70.59%)
Mutual labels:  gateway
ChuyunBlog
SpringBoot+MyBatis+Thymeleaf 博客系统
Stars: ✭ 147 (+764.71%)
Mutual labels:  dubbo
Slack-IRC-Gateway
Bridge Slack rooms to IRC channels
Stars: ✭ 33 (+94.12%)
Mutual labels:  gateway
knx-go
KNX clients and protocol implementation in Go
Stars: ✭ 62 (+264.71%)
Mutual labels:  gateway
ngx-lua-zuul
基于Nginx&Lua 和Netflix Eureka的微服务网关。请看看:https://github.com/tietang/zebra
Stars: ✭ 94 (+452.94%)
Mutual labels:  gateway

lemon

The Micro Service Gateway Framework.

Lemon is a high-performance, Java based open source gateway framework.

基于Netty4的微服务网关(Micro Service Gateway)。同时支持Dubbo泛化调用和HTTP调用,并支持自定义实现微服务网关请求的代理转发功能。

GitHubhttps://github.com/yu120/lemon

QQ交流群:微服务基础架构(191958521)

微信交流:请加echo-lry

Architecture

lemon

Features

  • HTTP to Dubbo Gateway
  • HTTP to HTTP Gateway
  • High Performance
  • Dynamic Discovery
  • Generalized Agent
  • Extensible Chain of Responsibility
  • Two-way LOG Printing Filter

TODO

  • HTTP proxy Motan
  • HTTP proxy SpringCloud
  • TCP proxy other
  • CircuitBreaker Filter
  • Degrade Filter
  • Idempotent Filter
  • Limiter Filter
  • Retry Filter

Config Introduce

Config Path: src/main/resources/lemon.yml

port: 8080
application: lemon
# Netty IO/Work thread number
ioThread: 0
workThread: 0
# Body max content length, 64 * 1024 * 1024 = 64 MB
maxContentLength: 67108864
# Max client connection channel number
maxChannel: 100000
# 
bizCoreThread: 20
bizMaxThread: 200
bizQueueCapacity: 800
bizKeepAliveTime: 60000
# Custom Fixed Response Header Parameter Configuration
resHeaders:
  Connection: keep-alive
  Accept-Encoding: gzip,deflate
  Content-Type: application/json;charset=UTF-8
originalHeaders: [Connection, Content-Type, Set-Cookie, Call-Code, Call-Message]
# Dubbo lemon config
dubbo:
  registryAddress: zookeeper://127.0.0.1:2181
  metadataAddress: zookeeper://127.0.0.1:2181
# Direct forwarding HTTP rule
services:
  - category: jsoup
    service: /baidu/**
    url: https://www.baidu.com
  - category: jsoup
    service: /oschina/**
    url: https://www.oschina.net

Dubbo Lemon

The support apache dubbo 2.7.2 generic service proxy.

Format:

URL:
http://[host]:[port]/lemon/[application]/[service or serviceSimpleName]/[method]?group=[group]&version=[version]

Body:
List[Map{...}, Map{...}, ...]

Example:

http://localhost:8080/lemon/micro-dubbo-provider/cn.micro.biz.dubbo.provider.DemoService/test

or

http://localhost:8080/lemon/micro-dubbo-provider/demo/test

[{"name":"lemon", "age":23}, {"10001"}]

HTTP Lemon

Proxy forwarding using jsoup.

http://[host]:[port]/lemon/[service]/**?group=[group]&version=[version]

Motan Lemon

TODO

Spring Cloud Lemon

TODO

Packing and Installation

mvn clean install -Denforcer.skip=true -Dmaven.test.skip=true

The target directory: target/lemon-1.0.0-SNAPSHOT-dist.tar.gz

After successful execution, lemon-1.0.0-SNAPSHOT-dist.tar.gz will be generated in the directory of target.

Start lemon

> tar -zxvf lemon-1.0.0-SNAPSHOT-dist.tar.gz
> cd bin
> ./app start
# Usage: app { console | start | stop | restart | status | dump }

Use Arthas

Alibaba Arthas

arthas-boot:

> wget https://alibaba.github.io/arthas/arthas-boot.jar
> java -jar arthas-boot.jar

as.sh:

> curl -L https://alibaba.github.io/arthas/install.sh | sh
> ./as.sh

可以直接访问:http://127.0.0.1:8563

Start service provider

The metadata report config must be used.

import DemoService;
import DemoServiceImpl;
import org.apache.dubbo.config.*;

public class ProviderDemo {

    public static void main(String[] args) throws Exception {
        // Implementation
        DemoService demoService = new DemoServiceImpl();

        // Application Info
        ApplicationConfig application = new ApplicationConfig();
        application.setName("micro-dubbo-provider");

        // Registry Info
        RegistryConfig registry = new RegistryConfig();
        registry.setAddress("zookeeper://127.0.0.1:2181");

        // Metadata Report Info
        MetadataReportConfig metadataReportConfig = new MetadataReportConfig();
        metadataReportConfig.setAddress("zookeeper://127.0.0.1:2181");

        // Protocol
        ProtocolConfig protocol = new ProtocolConfig();
        protocol.setName("dubbo");
        protocol.setPort(12345);
        protocol.setThreads(200);

        // Exporting: In case of memory leak, please cache.
        ServiceConfig<DemoService> service = new ServiceConfig<>();
        service.setApplication(application);
        // Use setRegistries() for multi-registry case
        service.setRegistry(registry);
        // Use setProtocols() for multi-protocol case
        service.setProtocol(protocol);
        service.setMetadataReportConfig(metadataReportConfig);
        service.setInterface(DemoService.class);
        service.setRef(demoService);

        // Local export and register
        service.export();
        System.in.read();
    }

}

License

Lemon is under the MIT license. See the LICENSE file for details.

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].