tcp-gateway | High performance TCP Gateway base on Netty | REST library

 by   SongranZhang Java Version: Current License: BSD-3-Clause

kandi X-RAY | tcp-gateway Summary

kandi X-RAY | tcp-gateway Summary

tcp-gateway is a Java library typically used in Web Services, REST, Kafka applications. tcp-gateway has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.

High performance TCP Gateway base on Netty 4 for request data or push message.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              tcp-gateway has a low active ecosystem.
              It has 276 star(s) with 150 fork(s). There are 39 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 0 have been closed. On average issues are closed in 703 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of tcp-gateway is current.

            kandi-Quality Quality

              tcp-gateway has 0 bugs and 0 code smells.

            kandi-Security Security

              tcp-gateway has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              tcp-gateway code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              tcp-gateway is licensed under the BSD-3-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              tcp-gateway releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              tcp-gateway saves you 4245 person hours of effort in developing the same functionality from scratch.
              It has 9004 lines of code, 1076 functions and 52 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed tcp-gateway and discovered the below as its top functions. This is intended to give you an instant insight into tcp-gateway implemented functionality, and help decide if they suit your requirements.
            • Channel read
            • Convert byte array to hex string
            • Push message
            • Create session
            • Get local host name
            • Get local host by socket address
            • Gets local address
            • Get IP list by registry IP
            • Send notification asynchronously
            • Waits for the future to complete
            • Do send message async
            • Connect to the server
            • Add session - created event
            • Main loop
            • Wait queue
            • Initialize the channel
            • Can telnet?
            • Cancel this future
            • Expire the session
            • Called when a channel is inactive
            • Initialize and start the tcp session listener
            • Shutdown tcp server
            • Start tcp server
            • Matches an IP
            • Get available port
            • Send message
            Get all kandi verified functions for this library.

            tcp-gateway Key Features

            No Key Features are available at this moment for tcp-gateway.

            tcp-gateway Examples and Code Snippets

            No Code Snippets are available at this moment for tcp-gateway.

            Community Discussions

            QUESTION

            Calling multiple registers simultaneously in a ModbusRTU using python?
            Asked 2019-Nov-19 at 10:06

            I have a Modbus-RTU thats connected to a Modbus-RTU/TCP-Gateway, which i'm trying to call. Works fine, but I have to read multiple values each reading cycle.

            I'm using the pymodbus library.

            Say I have 3 Registers to read:

            Address, WordLength

            1: 0,2

            2: 2,2

            3: 206, 4

            What I'm doing at the moment is calling the register values 1 and 2 together, by starting to read at adress 0, with a word count of 4. But then I have to make another request to register value 3.

            Which means, when trying to timestamp the values I encounter the problem that they were actually not read at the exact same time.

            The question: Is there a way to call multiple modbus registers simultaneously, say by calling read_holding_registers with a list of registers and a list of their respective word counts in python?

            In a way that would work like this:

            ...

            ANSWER

            Answered 2019-Nov-19 at 10:06

            Short answer: No, there is no way you can poll non-contiguous registers on a single Modbus query. That's a limitation of the Modbus protocol.

            If your device (you don't mention what device in particular you are talking about, so from here on in I'll be guessing) sticks to the Modbus specification then the maximum number of registers you can interrogate on a single query is 125. That's required to comply with the maximum message length, which is 256 bytes according to the spec:

            The quantity of registers to be read, combined with all other fields in the expected response, must not exceed the allowable length of Modbus messages: 256 bytes.

            The lack of synchronization you mention is frequently overcome using one of the following two strategies:

            -At the device (slave) level (for instance, if your device is a PLC where you have the freedom to program whatever you want in it) you sample all sensors (or those you need to keep in sync) at the same time and do not update again for a certain period of time to give room to the Master to read all data (most sensors are not that fast so this is in general not a problem for most industrial settings).

            -At the master level, you can use a multithreading approach to launch two (or more) simultaneous queries (you need to somehow synchronize those queries). This only works for Modbus TCP devices that accept multiple simultaneous connections (most do). Since you seem to be working with the TCP side of your gateway, this solution might work for your time-stamping problem but be aware that, in essence, it would be just smoke and mirrors to keep the fantasy that your sensors are read in sync (not to mention it would be fancy smoke and mirrors because it would take some effort to come up with the code).

            You should recoil a bit and ask yourself what is the reason to have your readings in sync. If you are in a hard real-time environment (where, for instance, you have to take measurements of two sensors at the exact same time because you need to make a calculation using both variables and they change really fast) you need to rethink your data acquisition system to use the first approach I mentioned above (read in sync and freeze).

            I did not mention it earlier because I imagine you don't have access to the Modbus mapping of the final device, but if you do the trivial and smart thing to do is to reorganize the order of the registers according to your needs. Be sure to take a look at the manual of your unit, most high-end and/or real-time devices will actually allow you this kind of change (in an easy way I mean, changing the firmware will always fix your issue).

            Source https://stackoverflow.com/questions/58930376

            QUESTION

            Istio injected DB apps, make their service type as NodePort, the nodeport cannot be accessed
            Asked 2018-Nov-05 at 16:36

            I am using istio 1.0.2 version with istio-demo-auth.yaml, I have one mssql and activemq deployed in the same namespaces with other applications, both were be injected by istioctl. The applications can connect to those two services inside the cluster, but I make those two services' type as NodePort, it succeeded, but I cannot access those nodeport(52433, 51618, or 58161).

            kubectl get svc -n $namespace
            NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
            amq-master-01 NodePort 10.254.176.151 61618:51618/TCP,8161:58161/TCP 4h
            mssql-master NodePort 10.254.209.36 2433:52433/TCP 33m

            kubectl get deployment -n $namespace
            NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
            activemq 1 1 1 1 4h
            mssql-master 1 1 1 1 44m

            Then I try to use gateway and virtualservice for using ingressgateway tcp port 31400. It works, as below:

            ...

            ANSWER

            Answered 2018-Nov-05 at 16:36

            Referring to the documentation:

            Type NodePort

            If you set the type field to NodePort, the Kubernetes master will allocate a port from a range specified by --service-node-port-range flag (default: 30000-32767), and each Node will proxy that port (the same port number on every Node) into your Service. That port will be reported in your Service’s .spec.ports[*].nodePort field.

            Just update your config of all masters and you will be able to allocate any port.

            Regarding to the second question: I suggest you to create an issue on github, because it looks like a bug, there are no restrictions to use nodePort in the documentation.

            Source https://stackoverflow.com/questions/53150938

            QUESTION

            How to propogate an exception from tcp outbound gateway to upstream SI components
            Asked 2018-Jun-21 at 10:17

            I have been searching over the internet and have been trying different ways to make it work but I couldn't get it working.

            Actually my system need to connect to multiple tcp server endpoints (which we call payers endpoint) as a tcp client application. The client components include the throttling and queuing components and they get initialized dynamically based on the payers configurations stored in DB as a separate application context. I have created a tcp outbound gateway for this purpose and which is being initialized in a dynamic context based on the ideas given in

            https://github.com/spring-projects/spring-integration-samples/tree/master/advanced

            What I want is to catch/get exceptions to the calling code at the time calling the payersGateway component in case of any error. But I am unable to receive the exceptions back.

            My context file for tcp client connectivity is as follow:

            dynamic-tcp-gateway-context file ...

            ANSWER

            Answered 2018-Jun-14 at 19:21

            It should work as you need; exceptions before the throttlerChannel will be thrown directly to the caller; exceptions after that channel will be sent to the gateway by the poller's error handler.

            Perhaps your gateway timeout is too short?

            Turning on DEBUG logging and following the message flow should help you debug it.

            EDIT

            You can fix the missing failedMessage by adding a bean of this type to the Tcp outbound gateway's ...

            Source https://stackoverflow.com/questions/50814570

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install tcp-gateway

            Clone this repository, and add it as a dependent maven project.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/SongranZhang/tcp-gateway.git

          • CLI

            gh repo clone SongranZhang/tcp-gateway

          • sshUrl

            git@github.com:SongranZhang/tcp-gateway.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular REST Libraries

            public-apis

            by public-apis

            json-server

            by typicode

            iptv

            by iptv-org

            fastapi

            by tiangolo

            beego

            by beego

            Try Top Libraries by SongranZhang

            spi-imp

            by SongranZhangJava

            easy-rpc

            by SongranZhangJava

            apns-http2

            by SongranZhangJava

            api-monitor

            by SongranZhangJava

            configcenter-client

            by SongranZhangJava