Giter VIP home page Giter VIP logo

esper's Introduction

๐Ÿ‘‹ Hey there!

I'm Michael!!

I am a computing scientist and engineering leader currently residing in New York City. I enjoy writing software, crafting thoughtful user experiences, and helping start-ups and companies leverage technology in innovative ways.

Feel free to reach out about software engineering consulting opportunities!

GitHub Stats

GitHub stats

esper's People

Contributors

davidbarre avatar durch avatar mjc-gh 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

Watchers

 avatar  avatar  avatar  avatar

esper's Issues

Allow multi-topic subscriptions in a single Event Source connection

The routing would have to change to support this. The authentication with JWTs would have to be altered as well. We would have to sign the token for multiple topic IDs.

Truthfully, I am on the fence about this one and am not going to implement it unless there is a real need.

Handle failures in main function

For example, if the server fails to start because the address in use. Basically, anywhere we're doing an unwrap we should gracefully handle failures.

Write some TESTS!

Introduce some tests

  • Unit tests where appropriate
    • Auth mod tests
    • Topic tests
    • AuthConfig tests
  • Integration tests for end-to-end behavior
    • with JWT
    • without JWT
    • requests with invalid topics
    • /stats route

Add rich CLI options

  • Number of threads
  • Bind host string
  • Port number string
  • Using Capacities:
    • Max clients
    • Max clients per Topic?

unwrap on null (connect/disconnect multiple time)

This issue happens on trying to connect/disconnect multiple time

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /(...)/nightly-dist-rustc-linux/build/src/libcore/option.rs:323

stack backtrace:
ANOM_ABEND auid=4294967295 uid=1000 gid=1000 ses=4294967295 subj=kernel pid=397 comm="esper" exe="/(...)/target/release/esper" sig=11

To reproduce just in a terminal , I repeat this 3 ... 5 ... 10 times

curl -v -X GET http://domain.tld/subscribe/abcdef123
CTRL+C
curl -v -X GET http://domain.tld/subscribe/abcdef123
CTRL+C
(...)

Add stats route

Add the following routes which will return JSON

  • /stats returns:
    • count of Clients (Manager#messages.len())
    • count of open Topics (Manager#streams.len())

Can't compile with nightly channel

Hi,

First of all, thank for sharing this project and your work.

Correct me if i'm wrong but Esper is not avaible in stable or beta channel ?

Today, I try to compile Esper with the nightly channel of Rust

I got some errors message after cargo build --release

I use :

  • cargo 0.17.0-nightly (6c79cf9 2017-01-13)
  • rustc 1.16.0-nightly (bf6d7b665 2017-01-15)
(...)
   Compiling docopt_macros v0.6.86
error[E0433]: failed to resolve. Could not find `keywords` in `token`
   --> /Users/david/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt_macros-0.6.86/src/macro.rs:258:41
    |
258 |         let public = self.p.eat_keyword(token::keywords::Pub);
    |                                         ^^^^^^^^^^^^^^^^^^^^ Could not find `keywords` in `token`

error[E0425]: cannot find function `intern` in module `token`
   --> /Users/david/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt_macros-0.6.86/src/macro.rs:289:33
    |
289 |     ast::Ident::with_empty_ctxt(token::intern(s))
    |                                 ^^^^^^^^^^^^^ not found in `token`
    |
    = help: possible candidate is found in another module, you can import it into scope:
    = help:   `use intern;`

error[E0412]: cannot find type `InternedString` in module `token`
   --> /Users/david/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt_macros-0.6.86/src/macro.rs:307:23
    |
307 | fn intern(s: &str) -> token::InternedString {
    |                       ^^^^^^^^^^^^^^^^^^^^^ not found in `token`
    |
    = help: possible candidate is found in another module, you can import it into scope:
    = help:   `use syntax::symbol::InternedString;`

error[E0425]: cannot find function `intern_and_get_ident` in module `token`
   --> /Users/david/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt_macros-0.6.86/src/macro.rs:308:5
    |
308 |     token::intern_and_get_ident(s)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `token`

error[E0308]: mismatched types
   --> /Users/david/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt_macros-0.6.86/src/macro.rs:266:38
    |
266 |         if deriving.name.as_str() != "derive" {
    |                                      ^^^^^^^^ expected struct `syntax::symbol::InternedString`, found reference
    |
    = note: expected type `syntax::symbol::InternedString`
    = note:    found type `&'static str`

error[E0560]: struct `syntax::ast::Path` has no field named `global`
   --> /Users/david/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt_macros-0.6.86/src/macro.rs:320:9
    |
320 |         global: false,
    |         ^^^^^^^ `syntax::ast::Path` does not have this field

error[E0308]: mismatched types
   --> /Users/david/.cargo/registry/src/github.com-1ecc6299db9ec823/docopt_macros-0.6.86/src/macro.rs:323:25
    |
323 |             parameters: ast::PathParameters::AngleBracketed(tystr),
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::option::Option`, found enum `syntax::ast::PathParameters`
    |
    = note: expected type `std::option::Option<syntax::ptr::P<syntax::ast::PathParameters>>`
    = note:    found type `syntax::ast::PathParameters`

error: aborting due to 3 previous errors

error: Could not compile `docopt_macros`.`

But after cargo update: I can compile esper and run it

Is it the good way ? or i'm doing something wrong ?
Which version of Rust do you use ?

after cargo updateand some tests I got this error, when I try many disconnect/reconnect from a suscribechannel

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /(...)/nightly-dist-rustc-linux/build/src/libcore/option.rs:323

stack backtrace:
ANOM_ABEND auid=4294967295 uid=1000 gid=1000 ses=4294967295 subj=kernel pid=397 comm="esper" exe="/(...)/target/release/esper" sig=11

Thanks

Manager refactoring

Move Vec#clear() call for the client's message queue to Manager directly. Perhaps messages_for can handle this responsibility?

Introduce capacities

  • Set and handle capacities on stream's vectors
  • Set and handle capacities on client message vectors
  • Have CLI options feed into capacity settings (See #1)

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.