Coder Social home page Coder Social logo

ajunlonglive / limaoim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from changyoutianxia/limaoim

0.0 0.0 0.0 23.04 MB

纯Go编写的IM,完全自定义协议的高性能即时通讯服务(High-performance instant messaging service with fully customizable protocol)

License: MIT License

Shell 0.19% Go 98.61% Makefile 0.08% HTML 0.96% Dockerfile 0.16%

limaoim's Introduction

LiMaoIM (Everything so easy)

This project is a simple and easy to use, powerful performance, simple design concept instant messaging service, fully custom protocol chat (Chat) system

中文文档

Docs

Feature

  • Go language development, high performance and easy maintenance have both
  • The bottom layer is 100% open source
  • Binary protocol (supports customization), the packet size is extremely small, the minimum heartbeat packet is only 1 byte, the power consumption is small, the flow is small, and the transmission speed is fast
  • The message channel and message content are fully encrypted to prevent man-in-the-middle attacks and modify of message content.
  • Simple and easy to use, strong performance, MAC notebook stand-alone test more than 6w/sec message throughput, in order to achieve this performance and easy to use, completely independent message storage, no need to rely on third-party components, a single command can start the service
  • The tcp + ack mechanism is used to ensure that the message is stable and reliable without loss
  • Strong scalability Adopting the channel design concept, currently supports group channels, point-to-point channels, and you can customize channels according to your own business in the future. It can realize functions such as robot channels, customer service channels, etc
  • Multi-terminal synchronization, real-time synchronization of web, pc, app messages
  • TCP and Websocket are supported indiscriminately
  • Ten thousand people support
  • The message partition is permanently stored, and the message will not be lost when the device is uninstalled
  • Support offline pull in read mode

Quick start

Quick start

Run the server (Note: Because it rewrites the Go network library, this library is temporarily not supported by Windows. Windows recommends using Docker to run.)

$ go run cmd/app/main.go -e mode=test 

After the server is running, visit http://127.0.0.1:1516/api to view the api document

Client SDK

Android SDK: Android SDK (built-in simple demo)

iOS SDK: Open source from Star to 500 (please help us some Star, thanks 😄)

JS SDK: Star to 1000 open source (please help us some Star, thanks 😄)

note: Please check document for the use of SDK

Quick play

Log in to test1, test2 and test2 to send a message "hello" to test1

// Log in to test1
$ go run cmd/play/main.go -user=test1 
// Log in to test2
$ go run cmd/play/main.go -user=test2 

test2 sends the message hello to test1

$ >send hello to test1

Performance Testing

One-click pressure test

./bench.sh

My test results are as follows:

Achieve a throughput of 63420 messages per second, which is close to the pressure test data of redis!

goos: darwin
goarch: amd64
cpu: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz

SEND: 2021/06/29 15:05:49 duration: 10.605478656s - 12.096mb/s - 63420.051ops/s - 15.768us/op

Run via Docker Compose

$ docker-compose up 

Case (Note: The case is not open source)

Case experience

Screenshot of self-developed IM product case using this communication terminal

收发消息演示 正在输入 消息回执 消息回应 红包消息 转账消息 群管理 朋友圈 单人音视频 多人音视频

limaoim's People

Contributors

limaoio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.