Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Speed querying interface  (Read 504 times)

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Speed querying interface
« on: May 28, 2019, 12:03:12 AM »

Say I were working on software design for an enhancement to a router. I’m thinking about my Firebrick FB2700 for example. There are one or more modems attached to this router and the router needs to discover the upstream speed capacity of each modem by querying the modem using some kind of protocol.

Here’s the problem: the way that the modem is queried, the language used, could be anything at all. It could be some proper interface meant for the task and intended for efficient and convenient publishing of speed info meant for consumption by a machine. Or it could be some kludgy technique which is awkward because the info published is in a form intended for human viewers, with eyeballs, not for computers and it is verbose, full of unwanted extraneous cruft that is in the way, and worse still, is not standardised according to any agreed spec, so that that it can change with a new software release so as to be incompatible with the expectations established by the experience of the earlier versions. It could be something based on http, or on a telnet cli session. It could be using http webpages meant for humans. It could be using a dedicated api protocol meant for the task. It could be something else entirely. SNMPv.x, or some custom thing, who knows.

ISPs have this kind of situation but with an information source that is indirect, and modems and DSLAMs are being queried remotely, with information relayed somehow. I have no idea how. Does anyone know ?

So the question : how does one design a very flexible subsystem for our router so that it can query speeds using goodness knows how many possible L7 protocols and data formats and also needing to filter out possible extraneous stuff or not and also reformat source data arbitrarily? How do you specify the language of this and the technique you need to follow? Specifying protocols and data formats ? A nightmare.

Could one try and spec one of a reasonable number of particular base protocol classes that are likely, and then on top of that have some sort of description of a state machine, an algorithm, and you ‘execute that’? An established similar example would be that of a dialup modem handler system’s spec for a recipe for a session setup: how to get connected and then log in to some system by dialup, first issuing commands to a modem, then talking through the modem to a remote system itself to get logged in.

An enumerated choice of base protocols, then a description - in what language ? - for an L7 algorithm over the top, and then what? Somehow need to describe data formats and where and how to find the info we need plus any format conversion or filtering needed. And again - how. One idea occurs to me - regexes. Use this pipeline of one or more regexes which you spooky in sequence to get and alter information that you receive. But regexes imho are only good at handling certain types of byte-oriented text-like data. I can’t see how to deal with arbitrary binary data conveniently with them. Not without dreadful verbosity and inefficiency and dread diseases.

A cop-out would be to say that there are n known cases and you have real dedicated code for each and those are the only scenarios that can be handled, without a software upgrade to add more code. So it’s down to a limited set of options for protocol / handler device drivers.

Madness. Anyone have any contributions to help restore sanity?
« Last Edit: May 30, 2019, 05:11:35 AM by Weaver »
Logged
 

anything