Giter Club home page Giter Club logo

incus's Issues

Update docker

Is there a recommended way of updating the docker image (on my end) I have not used it very much so no idea how I can follow the latest release from Incus

Allow AlertDictionary for ios

I would like to add support for AlertDictionary and more keys from the Payload that is used now. Any thoughts on how to handle this? Use one of them based on keys used or a key we add to the command (probably the best way) or ...
I can do a PR right away

Allow for unicode chars in ios notifications

Currently I am getting these errors:

2015/11/26 16:41:26 Alert (iOS): {"aps":{"alert":"Test: 馃挰test","badge":-1,"sound":"bingbong.aiff"},"payload":{"event":"notification","data":{"message_text":"Test: 馃挰 test","notification":{"body":"馃挰 test","id":121,"image":"urlToImage","tag":121,"title":"Test"}},"time":1448556086}}
2015/11/26 16:41:26 Error (iOS): encoding/hex: invalid byte: U+0074 't'

I add them in javascript like this: '\uD83D\uDCAC'
EDIT: adding like 馃挰 in js does not help

Incus crashes on websocket disconnect

I am trying to get this working with websockets but sometimes during testing when reloading my webpage this happens

2015/08/31 10:17:18 Error: websocket: close 1001 
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x68 pc=0x45e034]

goroutine 21 [running]:
github.com/Imgur/incus.(*RedisStore).MarkInactive(0x0, 0xc20800ada0, 0x5, 0xc20800b0a8, 0x1, 0x0, 0x0)
    /go/src/github.com/Imgur/incus/redis_store.go:211 +0x144
github.com/Imgur/incus.(*Socket).Close(0xc208010310, 0x0, 0x0)
    /go/src/github.com/Imgur/incus/sockets.go:85 +0x111
created by github.com/Imgur/incus.(*Socket).listenForMessages
    /go/src/github.com/Imgur/incus/sockets.go:147 +0x1df

goroutine 1 [IO wait, 2 minutes]:
net.(*pollDesc).Wait(0xc208010610, 0x72, 0x0, 0x0)
    /usr/src/go/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208010610, 0x0, 0x0)
    /usr/src/go/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc2080105b0, 0x0, 0x7f18e9c1abb0, 0xc20800ab30)
    /usr/src/go/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc208038040, 0x482bce, 0x0, 0x0)
    /usr/src/go/src/net/tcpsock_posix.go:234 +0x4e
net/http.tcpKeepAliveListener.Accept(0xc208038040, 0x0, 0x0, 0x0, 0x0)
    /usr/src/go/src/net/http/server.go:1976 +0x4c
net/http.(*Server).Serve(0xc20805c360, 0x7f18e9c1c160, 0xc208038040, 0x0, 0x0)
    /usr/src/go/src/net/http/server.go:1728 +0x92
net/http.(*Server).ListenAndServe(0xc20805c360, 0x0, 0x0)
    /usr/src/go/src/net/http/server.go:1718 +0x154
net/http.ListenAndServe(0xc20800ae60, 0x5, 0x0, 0x0, 0x0, 0x0)
    /usr/src/go/src/net/http/server.go:1808 +0xba
main.listenAndServe(0xc20803ac60)
    /go/src/github.com/Imgur/incus/incus/main.go:71 +0x166
main.main()
    /go/src/github.com/Imgur/incus/incus/main.go:66 +0x51e

goroutine 5 [syscall, 8 minutes]:
os/signal.loop()
    /usr/src/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init路1
    /usr/src/go/src/os/signal/signal_unix.go:27 +0x35

goroutine 6 [chan send, 2 minutes]:
github.com/Imgur/incus.func路015()
    /go/src/github.com/Imgur/incus/sockets.go:25 +0x13a
created by github.com/Imgur/incus.init路1
    /go/src/github.com/Imgur/incus/sockets.go:27 +0x5c

goroutine 7 [chan receive, 8 minutes]:
main.func路002()
    /go/src/github.com/Imgur/incus/incus/main.go:92 +0x198
created by main.InstallSignalHandlers
    /go/src/github.com/Imgur/incus/incus/main.go:103 +0x25

goroutine 8 [sleep]:
github.com/Imgur/incus.(*Server).RecordStats(0xc208040460, 0x3b9aca00)
    /go/src/github.com/Imgur/incus/server.go:301 +0x5f
created by main.main
    /go/src/github.com/Imgur/incus/incus/main.go:57 +0x430

goroutine 9 [sleep]:
github.com/Imgur/incus.(*Server).LogConnectedClientsPeriodically(0xc208040460, 0x4a817c800)
    /go/src/github.com/Imgur/incus/server.go:308 +0xff
created by main.main
    /go/src/github.com/Imgur/incus/incus/main.go:58 +0x459

goroutine 20 [select, 2 minutes]:
github.com/Imgur/incus.(*Socket).listenForWrites(0xc208010310)
    /go/src/github.com/Imgur/incus/sockets.go:163 +0x736
created by github.com/Imgur/incus.func路011
    /go/src/github.com/Imgur/incus/server.go:131 +0x9a4

goroutine 14 [sleep]:
github.com/Imgur/incus.(*Server).SendHeartbeatsPeriodically(0xc208040460, 0x4a817c800)
    /go/src/github.com/Imgur/incus/server.go:280 +0x36
created by main.main
    /go/src/github.com/Imgur/incus/incus/main.go:63 +0x4ea

goroutine 18 [select, 2 minutes]:
github.com/Imgur/incus.func路011(0x7f18e9c1c340, 0xc208044320, 0xc208032680)
    /go/src/github.com/Imgur/incus/server.go:133 +0xb4e
net/http.HandlerFunc.ServeHTTP(0xc20800af00, 0x7f18e9c1c340, 0xc208044320, 0xc208032680)
    /usr/src/go/src/net/http/server.go:1265 +0x41
net/http.(*ServeMux).ServeHTTP(0xc20803a6c0, 0x7f18e9c1c340, 0xc208044320, 0xc208032680)
    /usr/src/go/src/net/http/server.go:1541 +0x17d
net/http.serverHandler.ServeHTTP(0xc20805c360, 0x7f18e9c1c340, 0xc208044320, 0xc208032680)
    /usr/src/go/src/net/http/server.go:1703 +0x19a
net/http.(*conn).serve(0xc208044000)
    /usr/src/go/src/net/http/server.go:1204 +0xb57
created by net/http.(*Server).Serve
    /usr/src/go/src/net/http/server.go:1751 +0x35e

When long polling we need to buffer commands

When commands are received for a client that is longpolling, then we need to buffer commands that arrive between when the message is sent to the longpoller, and when they reconnect. For example,

t=0, A connects via longpoll
t=100, message is received by A's long poller, and A's long poller disconnects
t=101, message is received by Incus for A, but is dropped because there is no client for A
t=102, A connects via longpoll

Instead, we need a threshold (preferably in time-units rather than absolute number of messages) buffer:

t=0, A connects via longpoll. 
t=100, message is received by A's long poller, and A's long poller disconnects
t=101, message is received by Incus for A, and is placed into a buffer
t=102, A connects via longpoll, and a pending message is dispatched, and A's long poller disconnects.
t=104, A connects via longpoll.

Websockets not working

I am using incusjs to connect to incus on the client side (where you should really do either poll or websocket and not abort the poll when websocket comes through, this leaves Incus thinking there are 2 connections while this is not true if you are open I will do a PR for this)

I am using this command

{
    "command": {
        "command": "pushormessage",
        "user": "user1"
    },
    "message": {
        "time": 0,
        "websocket": {
            "event": "test",
            "data": {...},
            "time": 0
        }
    }
}

And I am doing both (normally only lpush needed right?)

redis.publish('Incus', JSON.stringify(command));
redis.lpush('Incus_Queue', JSON.stringify(command));

but none seem to trigger Incus to use the websocket

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.