Git Product home page Git Product logo

ginchat's Introduction

ginChat

  • Implemented a instant messaging platform using Go and WebSocket, facilitating various functionalities including user registration, login, adding contacts, message sending and reception, etc.
  • Enabled both private and group chatting, along with handling diverse message formats such as text, voice, images, and emoji.
  • Utilized the Gin and go-swagger for web API implementation and testing.
  • Employed channels and goroutines to enhance system concurrency and real-time responsiveness, ensuring a seamless user experience.
  • Leveraged MySQL for the storage of fundamental user and group information, with GORM utilized for efficient database manipulation.
  • Applied Redis for caching historical data, optimizing system performance and data retrieval efficiency.

Building Environment

go 1.20
MySQL
Redis
If you want to build and run this application in your local environment. Please make sure you have environments mentioned above. And then you should update app.yml according your environment
image
And then run build.bat (for windows, build.sh for Linux) to build the application. You can access to the system in localhost:8081

Functions

User Registration

image

User Login

image

Contacts List

image

Group Chat List

image

Chat Page

image

Test

Tools: JMeter
Test machine: personal laptop(AMD R7 4800H)
I first tested in normal case with 300 threads for 10 loops, achieving 5000+ TPS. The setting and results are as followed
set2
test1
Then I tested 300 user visited at the same time. The setting and results are as followed
set1
test2

Reference

ginchat's People

Contributors

yanyu0203 avatar

Stargazers

 avatar

Watchers

 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.