Giter Site home page Giter Site logo

dimiro1 / ipe Goto Github PK

View Code? Open in Web Editor NEW
366.0 18.0 83.0 373 KB

An open source Pusher server implementation compatible with Pusher client libraries written in GO

Home Page: http://dimiro1.github.io/ipe

License: MIT License

Go 92.63% HTML 0.70% JavaScript 5.95% Dockerfile 0.57% Shell 0.15%

ipe's People

Contributors

asalei avatar craigjmidwinter avatar dimiro1 avatar izimobil avatar jweslley avatar orthographic-pedant avatar sj26 avatar tssajo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipe's Issues

cross compilation / build

Hi, i saw on the readme that you can't provide windows relase since you didn't own a windows machine, but as referenced in this blog post that it is possible to do a cross build for other os and architecture.

i've tried it myself, and ipe seems to run okay on windows (didn't have a chance to test the functionality, since it's on a friend's computer). Is there any possibilty to add the windows release for future release? or is there any problem with compiling it that way? (I'm sorry if this sounds stupid, i'm just starting to learn go lang)

Why do we need to run functional/client.go manually?

There is a webhooks config option in config.yml file, but I don't see it starts automatically in main.go.
I compile and run ipe from go command line, didn't execute any docker command or bash script.
I need to manually run functional/client.go to handle client auth connections.
Did I do it wrong? Is there other options?

Presence channels subscribe fails with int userID

Hi, is there a way we could process integer as userId on channel subscribe here?
If u'll point me in right direction i can submit PR
My current problem is that my vendor (laravel) provides this key as int, and i can only affect userInfo field inside my project source files, so i'm hitting this err
8 channel.go:174] json: cannot unmarshal number into Go struct field .user_id of type string

Future of this package

I am looking for a pusher replacement package at the moment when i came across this one.
It looks like the development was very active a year ago but seems it stopped there.

Just asking if it is abandoned and i must look further, or can i safely use this in production?

How do you suppose to write an SQL implementation of db.go ?

I did write one and all interface functions worked perfectly, these:

    GetAppByAppID(appID string) (*app, error)
    GetAppByKey(key string) (*app, error)
    AddApp(*app) error

However, the following from the app struct should be kept in memory for all apps at all times IMO:

    Channels    map[string]*channel
    Connections map[string]*connection

    Stats *expvar.Map

You don't really think these should be serialized and saved to the database as well? (and when to save these? when anything inside these changes???)

IMO, only these should be stored in the database from the app struct::

    Name                string
    AppID               string
    Key                 string
    Secret              string
    OnlySSL             bool
    ApplicationDisabled bool
    UserEvents          bool
    WebHooks            bool
    URLWebHook          string

and when these get updated in the database then we should re-read these (maybe check for db changes periodically from a go routine) and update the in-memory database with the new values. When we do this updating, we should never touch the app's Channels, Connections and Stats in memory, I think.

What is your opinion on this? How do you suppose to store the AppIDs and the other app data in an SQL database with the current Ipe code base? IMO, some restructuring might be needed for this.

Use secure connection for Ipe server

Hi, not sure if it's an issue but.. is it possible to use a secure connection for the Ipe server? If so, how can I configure it? I couldn't find it anywhere.

curl

Does it support curl?

Update Readme

  • Update config example from json to yaml
  • Windows machine reference

Update build instructions

Hi,

First thanks for implementing ipe !

I'm trying to build it on a i386 arch, I'm totally new to the go ecosystem, so I just followed the README and this is what I get:

$ go get github.com/dimiro1/ipe
package ipe/api: unrecognized import path "ipe/api" (import path does not begin with hostname)
package ipe/app: unrecognized import path "ipe/app" (import path does not begin with hostname)
package ipe/config: unrecognized import path "ipe/config" (import path does not begin with hostname)
package ipe/storage: unrecognized import path "ipe/storage" (import path does not begin with hostname)
package ipe/websockets: unrecognized import path "ipe/websockets" (import path does not begin with hostname)

Naively I spent some time fixing import pathes, but the best I could get is a ipe.a file in ~/.go/pkg.

Could you please give me the instructions on how to build an ipe binary similar to the one you distribute as binary ?

(Note: I had no luck either on a amd64 machine).

Regards.

Android and iOS clients support

As far as I know , Pusher Android and iOS clients do not support protocol version 7.
Does IPE fully support Pusher Android and iOS clients?

Server statistics?

Can I (as server admin) see some overall server statistics: total count of open connections, messages and so on?

xhr

Hello,

Any plans implementing other transport methods like xhr_polling?

triggerHook issue

Hello,
I have an issue with the webhooks functionnality. Ipê works like a charm when it is set to false.
However, when set to true, event is well sent, I even have a response from the server, but I have the following error message in the logs :

goroutine 34 [running]:
runtime/debug.Stack(0x774a00, 0x0, 0x0)
/usr/local/go/src/runtime/debug/stack.go:24 +0x79
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x22
github.com/pressly/chi/middleware.Recoverer.func1.1(0xc4200d00f0, 0x9770c0, 0xc420120410)
/home/ronan/go_work/src/github.com/pressly/chi/middleware/recoverer.go:25 +0x12d
panic(0x76e1e0, 0xc42017a150)
/usr/local/go/src/runtime/panic.go:458 +0x243
github.com/rtatibouet/ipe/ipe.triggerHook(0x9779c0, 0xc420016780, 0xc42012c080, 0x7d69b4, 0xc, 0xc4200ccf00, 0x13, 0x0, 0x0, 0x0, ...)
/home/ronan/go_work/src/github.com/rtatibouet/ipe/ipe/webhooks.go:206 +0x25b
github.com/rtatibouet/ipe/ipe.(*app).TriggerMemberAddedHook(0xc42012c080, 0xc42001cb00, 0xc42000de90)
/home/ronan/go_work/src/github.com/rtatibouet/ipe/ipe/webhooks.go:123 +0x1b9
github.com/rtatibouet/ipe/ipe.(*channel).Subscribe(0xc42001cb00, 0xc42012c080, 0xc420016420, 0xc42001c980, 0x36, 0x0, 0x0)
/home/ronan/go_work/src/github.com/rtatibouet/ipe/ipe/channel.go:108 +0x4cc
github.com/rtatibouet/ipe/ipe.(*app).Subscribe(0xc42012c080, 0xc42001cb00, 0xc420016420, 0xc42001c980, 0x36, 0xc42012c080, 0x1)
/home/ronan/go_work/src/github.com/rtatibouet/ipe/ipe/app.go:274 +0x53
github.com/rtatibouet/ipe/ipe.onSubscribe(0xc420096780, 0xc4200ccca0, 0x12, 0xc42012c080, 0xc420014600, 0xf1, 0x600)
/home/ronan/go_work/src/github.com/rtatibouet/ipe/ipe/websocket.go:228 +0x472
github.com/rtatibouet/ipe/ipe.handleMessages(0xc420096780, 0xc4200ccca0, 0x12, 0xc42012c080)
/home/ronan/go_work/src/github.com/rtatibouet/ipe/ipe/websocket.go:56 +0x4ad
github.com/rtatibouet/ipe/ipe.(*websocketHandler).ServeHTTP(0xc4201284d0, 0x9770c0, 0xc420120410, 0xc4200d00f0)
/home/ronan/go_work/src/github.com/rtatibouet/ipe/ipe/websocket.go:289 +0x339
github.com/rtatibouet/ipe/ipe.(*websocketHandler).ServeHTTP-fm(0x9770c0, 0xc420120410, 0xc4200d00f0)
/home/ronan/go_work/src/github.com/rtatibouet/ipe/ipe/ipe.go:51 +0x48
net/http.HandlerFunc.ServeHTTP(0xc4201284c0, 0x9770c0, 0xc420120410, 0xc4200d00f0)
/usr/local/go/src/net/http/server.go:1726 +0x44
github.com/pressly/chi.(*Mux).routeHTTP(0xc420136180, 0x9770c0, 0xc420120410, 0xc4200d00f0)
/home/ronan/go_work/src/github.com/pressly/chi/mux.go:386 +0x216
github.com/pressly/chi.(*Mux).(github.com/pressly/chi.routeHTTP)-fm(0x9770c0, 0xc420120410, 0xc4200d00f0)
/home/ronan/go_work/src/github.com/pressly/chi/mux.go:325 +0x48
net/http.HandlerFunc.ServeHTTP(0xc4201284e0, 0x9770c0, 0xc420120410, 0xc4200d00f0)
/usr/local/go/src/net/http/server.go:1726 +0x44
github.com/pressly/chi/middleware.Recoverer.func1(0x9770c0, 0xc420120410, 0xc4200d00f0)
/home/ronan/go_work/src/github.com/pressly/chi/middleware/recoverer.go:32 +0x9f
net/http.HandlerFunc.ServeHTTP(0xc4201322a0, 0x9770c0, 0xc420120410, 0xc4200d00f0)
/usr/local/go/src/net/http/server.go:1726 +0x44
github.com/pressly/chi.(*Mux).ServeHTTP(0xc420136180, 0x9770c0, 0xc420120410, 0xc4200d00f0)
/home/ronan/go_work/src/github.com/pressly/chi/mux.go:79 +0x1f2
net/http.serverHandler.ServeHTTP(0xc42012c100, 0x9770c0, 0xc420120410, 0xc42016c000)
/usr/local/go/src/net/http/server.go:2202 +0x7d
net/http.(*conn).serve(0xc42012c180, 0x977940, 0xc4201343c0)
/usr/local/go/src/net/http/server.go:1579 +0x4b7
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2293 +0x44d
2017/01/23 12:25:45 http: response.WriteHeader on hijacked connection
2017/01/23 12:25:45 http: response.Write on hijacked connection

I've tracked down a bit the time where the error is appearing. Everything is going fine until "done <- true", line 198. Then, the program "hangs" a bit, ctx.Done() is fired, and then the error occurs.

supportedProtocolVersion

hi dear
than you for publish this project
this only supprt protocl version 7?
i want use pusher android sdk for connect to websocket server
but when i debug my app i see pusher android client use protocl version 5 as default
i can only use protocol version 7 for run this websocket server?

Connection count drift

I think the active connection count statistic drifts over time. I think we miss disconnections somehow. Anybody else experiencing this?

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.