Code Monkey home page Code Monkey logo

chat's Introduction

本系统实现了一个简单的聊天室。

说明如下:
1. 用户需 要可以使用在线的WebSocket测试连接本系统。地址为ws://127.0.0.1:8080/enter
2. 用户链接之后就可以直接发送相应的数据了
3. 用户第一次连接上之后会获取当前聊天室中最新的10条数据(如果当前聊天室中有10条数据的话)
4. 同一个用户多次登录时会把原先的登录状态挤掉
5. 用户输入的信息先存放在redis中,并在一定的时刻时持久化到mysql
6. 用户获取信息时,会先访问redis。如果redis中有数据的话,返回redis中的数据。如果没有,则会去mysql中查找
7. 用户发送一条信息之后,会广播到当前聊天室的所有用户中
8. 每条信息都带有信息发送的时间和发送者的名称

chat's People

Contributors

eric-edward 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.