Giter Club home page Giter Club logo

pneumatic-tubes's People

Contributors

drapanjanas avatar tuddman 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pneumatic-tubes's Issues

Add support for immutant

I was experimenting with Sente in a re-frame app. However, Sente's api felt a bit clunky and I found I still needed to write some boilerplate/middleware for "re-framing" the messages to events. Then looked for alternatives and found your tubes, which seems to have a nice and clean real-world api. I'm using Immutant though, would you consider adding an adapter for it? Seems like it'd be relatively simple to write another websocket-handler, similar to Sente's Immutant adapter (https://github.com/ptaoussanis/sente/blob/master/src/taoensso/sente/server_adapters/immutant.clj).

average_number has no readme or docs

I pulled down the average_number demo and would like to work with it using an interactive cider nrepl session but I couldn't really figure out exactly how to get the project going. I eventually got it running by doing lein figwheel but I still didn't have the interactivity I was expecting.

A few more things:

  1. It throws a divide by zero error when disconnecting.
  2. It has a hard dependency on http-kit and core.async but doesn't pull them down. I understand that for the pneumatic-tubes library you would want the consumer to provide their own, however for the example applications it was a confusing experience ( I thought it was a clojure 1.9 upgrade issue until I realized you were calling http-kit without supplying it)

Help with server-side event handle

Hello, I'm building a web app, got confused by a situation below, would appreciate any helpful suggestions

App runs at:
http://dev.brawl.haus
on login event dispatches successfully (logged in console)
Locally it proceeds fine, however on a cloud machine it fails on server side event handle with error below

Exception in thread "async-dispatch-60" java.lang.IllegalArgumentException: No implementation of method: :close! of protocol: #'clojure.core.async.impl.protocols/Channel found for class: clojure.lang.PersistentVector
        at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:568)
        at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:560)
        at clojure.core.async.impl.protocols$fn__400$G__393__405.invoke(protocols.clj:21)
        at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:1018)
        at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:1014)
        at pneumatic_tubes.core$receive$fn__6237.invoke(core.clj:118)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

And such happens on server start:

Exception in thread "async-dispatch-149" java.lang.ClassCastException: clojure.core.async.impl.buffers.FixedBuffer cannot
 be cast to java.util.Iterator
        at clojure.core.async.impl.channels.ManyToManyChannel$fn__639.invoke(channels.clj:87)
        at clojure.core.async.impl.channels.ManyToManyChannel.put_BANG_(channels.clj:86)
        at clojure.core.async.impl.ioc_macros$put_BANG_.invokeStatic(ioc_macros.clj:1031)
        at clojure.core.async.impl.ioc_macros$put_BANG_.invoke(ioc_macros.clj:1030)
        at pneumatic_tubes.core$dispatch$fn__6317$state_machine__4322__auto____6318$fn__6320.invoke(core.clj:140)
        at pneumatic_tubes.core$dispatch$fn__6317$state_machine__4322__auto____6318.invoke(core.clj:139)
        at clojure.core.async.impl.ioc_macros$run_state_machine.invokeStatic(ioc_macros.clj:1012)
        at clojure.core.async.impl.ioc_macros$run_state_machine.invoke(ioc_macros.clj:1011)
        at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:1016)
        at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:1014)
        at pneumatic_tubes.core$dispatch$fn__6317.invoke(core.clj:139)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Repo: https://github.com/andrewzhurov/brawl-haus
Event dispatch: https://github.com/andrewzhurov/brawl-haus/blob/master/src/cljs/brawl_haus/panels/login.cljs#L14
Tube registration: https://github.com/andrewzhurov/brawl-haus/blob/master/src/clj/brawl_haus/server.clj#L209
Modified webhook-handler: https://github.com/andrewzhurov/brawl-haus/blob/master/src/clj/brawl_haus/my_tubes.clj#L30
(only differs in arguments) (needed that on-tube-close)

The lib is a ton of fun to play with! Event execution in context of server seems much useful
Looks like the right step we put our state into - server! No need to poke and sync, we can propagate state from truly top of our apps πŸ”₯ ☺️

Issues with sierra component integration

Hello,

First, thanks for this library. It's an awesome accomplishment.

I'm having some issues with wrapping tubes into a Sierra component (https://github.com/stuartsierra/component)

Mainly, from reading the code, it doesn't seem like support for (tubes/create! t), followed by (tubes/destroy! t), followed by another call to (tubes/create! t) is a supported operation. I'm noticing that the tube is still marked as :destroyed true even after I re-create it.

What is your suggestion for stopping and then starting a tube? Thanks!

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.