GithubHelp home page GithubHelp logo

diffusiondata / diffusion-examples Goto Github PK

View Code? Open in Web Editor NEW
8.0 21.0 13.0 1.3 MB

Diffusion API and Getting Started Examples

License: Apache License 2.0

Java 21.76% Objective-C 14.15% Swift 1.29% Makefile 0.79% C 23.81% C# 22.22% JavaScript 5.72% HTML 0.25% Python 4.24% TypeScript 5.77%

diffusion-examples's Introduction

diffusion-examples's People

Contributors

adam-push avatar aelliott-push avatar dimejiogunyoye avatar jdjenvey avatar katshann avatar lmakama avatar lspacagna avatar mattunderscorechampion avatar pedro-loureiro-diffusiondata avatar peterhughesdev avatar philipa avatar ploureiro-push avatar sekharamritha avatar

Stargazers

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

diffusion-examples's Issues

Error when import diffusion

Hi, in 6.9.0 version, i receive the error when import diffusion.

Traceback (most recent call last): File "/Users/academiadosbots/Documents/Trade/william_hill/teste_diffusion.py", line 2, in <module> import diffusion File "/Users/academiadosbots/Documents/Trade/william_hill/.envw/lib/python3.10/site-packages/diffusion/__init__.py", line 4, in <module> from .internal.protocol import SessionId File "/Users/academiadosbots/Documents/Trade/william_hill/.envw/lib/python3.10/site-packages/diffusion/internal/protocol/__init__.py", line 22, in <module> from .message_types import read_stream, ServiceRequestMessage File "/Users/academiadosbots/Documents/Trade/william_hill/.envw/lib/python3.10/site-packages/diffusion/internal/protocol/message_types.py", line 14, in <module> from diffusion.internal.session.exception_handler import ErrorReasonException File "/Users/academiadosbots/Documents/Trade/william_hill/.envw/lib/python3.10/site-packages/diffusion/internal/session/exception_handler.py", line 17, in <module> from diffusion.session.exceptions import ( File "/Users/academiadosbots/Documents/Trade/william_hill/.envw/lib/python3.10/site-packages/diffusion/session/__init__.py", line 25, in <module> from diffusion.session.locks.session_locks import SessionLocks, SessionLock File "/Users/academiadosbots/Documents/Trade/william_hill/.envw/lib/python3.10/site-packages/diffusion/session/locks/session_locks.py", line 33, in <module> class SessionLocks(object): File "/Users/academiadosbots/Documents/Trade/william_hill/.envw/lib/python3.10/site-packages/diffusion/session/locks/session_locks.py", line 131, in SessionLocks async def lock( File "/Users/academiadosbots/Documents/Trade/william_hill/.envw/lib/python3.10/site-packages/diffusion/internal/utils.py", line 261, in transformer validated_main_func = validator(func) File "pydantic/decorator.py", line 36, in pydantic.decorator.validate_arguments.validate File "pydantic/decorator.py", line 78, in pydantic.decorator.ValidatedFunction.__init__ File "pydantic/typing.py", line 77, in pydantic.typing.get_all_type_hints 'AsyncContextManager', File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/typing.py", line 1870, in get_type_hints value = _eval_type(value, globalns, localns) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/typing.py", line 327, in _eval_type return t._evaluate(globalns, localns, recursive_guard) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/typing.py", line 699, in _evaluate self.__forward_value__ = _eval_type( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/typing.py", line 327, in _eval_type return t._evaluate(globalns, localns, recursive_guard) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/typing.py", line 694, in _evaluate eval(self.__forward_code__, globalns, localns), File "<string>", line 1, in <module> NameError: name 'SessionLock' is not defined. Did you mean: 'SessionLockScope'? profiling: /Users/jenkins/builds/ppJmC2r-/0/engineering/diffusion-sdk/dependencies/python-core/build/python/build/temp.macosx-10.9-x86_64-cpython-310/CMakeFiles/diffusion_core.dir/src/main/bindings/python/cbor.cpp.gcda: cannot open: No such file or directory profiling: /Users/jenkins/builds/ppJmC2r-/0/engineering/diffusion-sdk/dependencies/python-core/build/python/build/temp.macosx-10.9-x86_64-cpython-310/CMakeFiles/diffusion_core.dir/src/main/bindings/python/delta.cpp.gcda: cannot open: No such file or directory profiling: /Users/jenkins/builds/ppJmC2r-/0/engineering/diffusion-sdk/dependencies/python-core/build/python/build/temp.macosx-10.9-x86_64-cpython-310/CMakeFiles/diffusion_core.dir/src/main/bindings/python/main.cpp.gcda: cannot open: No such file or directory profiling: /Users/jenkins/builds/ppJmC2r-/0/engineering/diffusion-sdk/dependencies/python-core/build/python/build/temp.macosx-10.9-x86_64-cpython-310/CMakeFiles/diffusion_core.dir/src/main/cxx_api/buffer.cpp.gcda: cannot open: No such file or directory
Thanks.

No error notification when wrong Topic name given

Im using diffusion sdk 5.9.0 and able to connect and subscribe to topic is correct connection props and topic name are given.
Now, if i give incorrect topic name to session.subscribe function I don't get any error event on my session. Can you help how can i get the error event in above case?

onClose not called in missing topic handler

When closing the client session from the Diffusion console, MissingTopicNotificationStream#onClose() is never called. However, if I use MissingTopicHandler#onClose(), which is marked as deprecated, it is called.

// works
topicControl.addMissingTopicHandler(topic, new TopicControl.MissingTopicHandler() {
    @Override
    public void onMissingTopic(TopicControl.MissingTopicNotification missingTopicNotification) {
        logger.info("request: {}", missingTopicNotification.getTopicPath());
    }

    @Override
    public void onActive(String s, RegisteredHandler registeredHandler) {
        logger.info("active");
    }

    @Override
    public void onClose(String s) {
        logger.error("close"); // it's called!
    }
});

// doesn't work
topicControl.addMissingTopicHandler(topic, new TopicControl.MissingTopicNotificationStream() {
    @Override
    public void onMissingTopic(TopicControl.MissingTopicNotification missingTopicNotification) {
        logger.info("request: {}", missingTopicNotification.getTopicPath());
    }

    @Override
    public void onError(ErrorReason errorReason) {
        logger.error("error");
    }

    @Override
    public void onClose() {
        logger.error("close"); // it's not called!
    }
});

Client version: implementation 'com.pushtechnology.diffusion:diffusion-client:6.8.9'
Server version: 6.8.9

(the same behavior is observed on higher versions).

Node client

The JS examples require diffusion node client, version on github is too old, are you going to provide a diffusion node js file to run the examples?

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.