GithubHelp home page GithubHelp logo

chatie / io Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 196 KB

Chatie Cloud Input/Output Service

Home Page: https://npmjs.com/package/@chatie/io

License: Apache License 2.0

TypeScript 94.09% Shell 5.59% JavaScript 0.32%
wechaty chatie chatbot cloud

io's Introduction

Chatie IO

NPM Version TypeScript NPM

chatie cloud io

Image Credit: https://switchon.io/

Cloud IO for Chatie.

This module is a component of the Chatie service.

Links

Json RPC

Service Discovery

Related Projects

Event Driven Architecture

History

master v0.9

  1. Discovery puppet service schema rename: ip to host. (ip will be kept for compatible before Dec 31, 2022)

v0.8

Fix chatie/server#49: Refactoring the sockets management system

  1. Remove Listag module due to memory leaks

v0.7 (2019)

Useable version

v0.1 (May 2017)

Init version

Author

Huan LI (李卓桓) [email protected]

Profile of Huan LI (李卓桓) on StackOverflow

Copyright & License

  • Code & Docs © 2017-now Huan LI (李卓桓) <[email protected]>
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

io's People

Contributors

dependabot-preview[bot] avatar greenkeeper[bot] avatar huan avatar windmemory avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

windmemory

io's Issues

Keep service discovery information after the websocket disconnect for a while

If a Puppet Service Server is restarting, the WebSocket connection to the io will be lost for a while.

We should keep the old information available for a period of time, so that:

  1. It will be able to be discovered between the restarting of the service server,
  2. It will timeout after a period of time.

The exact timeout number needs to be investigated. (we can refer to the configuration of etcd or zookeeper)

CC @windmemory

Puppet WXWork Service unreachable

Interesting find out:

https://api.chatie.io/v0/hosties/puppet_wxwork_xxx

{"host":"127.0.0.1","ip":"x.y.217.105","port":8788}

It seems that the service discovery thinks that the Puppet Service Service IP is not public accessible.

Related source code:

io/src/server/io-manager.ts

Lines 362 to 375 in 17c715f

/**
* Huan(202201): test whether the puppet service server host/port
* can be visited by the internet
*/
const isReachable = await isPortReachable(port, {
host,
timeout: 5 * 1000,
})
const data = {
host: isReachable ? host : '127.0.0.1',
ip: host, // <- `ip` is deprecated, use `host` instead. Will be removed after Dec 31, 2022 Huan(202108)
port,
}

Originally posted by @huan in Chatie/server#96 (comment)

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.