Code Monkey home page Code Monkey logo

ls30's People

Contributors

nickandrew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ls30's Issues

@NIC include path

Could be a local config issue but straight out of the download I found the code had problems finding the library files.
eg errors like

Can't locate AlarmDaemon/Controller.pm in @INC (@INC contains: .....

Easiest way for me to work around it, was to add the local lib path via the following line at the top of each file.

#add a local path to lib
use lib './lib'; 

Use AnyEvent as the event loop

I'd started to write modules to do asynchronous I/O built around a select() loop for several years and included my work to date into LS30. Since then I found AnyEvent which does a much better job of it, so rewrite the event loop parts of LS30 using AnyEvent.

Daemon to send responses only to the requesting client

For the daemon to send responses to all clients risks confusing those clients request/response pairs.

To implement this, the daemon needs to use LS30::Commander.

Also, there could be an option for a client to be a passive listener, to receive all other clients requests and responses in its feed. Such a client could track the state of the device passively, as was my intention about 4 years ago.

Rewrite it as a webserver

I could totally rewrite this in Mojolicious nowadays and provide a REST/Websockets interface.

Or somebody else could (hint hint).

perl ipv6 support somewhat dodgy

OK to listen on an ipv6 socket if the listening address is fully described, i.e. ":::1681"

Can't make an outbound ipv6 connection using IO::Socket::INET6 version 2.54 unless my local hack is included. Should I add that to the git repo?

Watch Class

Could be a similar problem to my issue #3, this one is with watch.pl reporting an error

Unable to require class Watch at bin/watch.pl line 31

Which I was unable to get around with the lib include. Could be my complete absence of perl knowledge not helping either.

Protocol errors

The LS-30 protocol does not ensure that a response matches up with a request. I tried a query-all across a link with long (and varying) latency and I found that the client can give up on a response for an earlier query (A), and send later queries (B,C,D). When it receives the first response (for A) it may be waiting for a response for B, and so get out of step.

Part of the problem is on the client end - the client treats the request/response pair as a unit of work and it has to have some kind of timeout on reading the response. I could make the timeout bigger - but, how big? 60 seconds? 120 seconds?

I could also make the processing of responses asynchronous with the sending of requests. In other words, the client could send all of (A,B,C,D) without waiting for any response, and later when the responses come in, they are processed in that order. Also if we miss a response, say we send (A,B,C,D) and we receive (A,C,D) then the response 'C' is not matched to the request 'B' and so B would be marked as "no response" and the response would be correctly matched to 'C'.

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.