Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project Architecture #4

Open
kb1lqc opened this issue Nov 30, 2017 · 6 comments
Open

Project Architecture #4

kb1lqc opened this issue Nov 30, 2017 · 6 comments
Assignees

Comments

@kb1lqc
Copy link
Member

kb1lqc commented Nov 30, 2017

faradayio is a program/module that provides the following service:

image

I want to share my thoughts on how this project will go together. The end result is a program we install. However, I think it may be beneficial to define a module which is pulled in that builds that program with custom functions. This provides easier unit testing as well as the ability to use that python code in any other project as an import package.

I'm also using @hdkmike's simple-tuntap project to help figure out the IO and architecture of this project a well.

Tagging: @reillyeon, @hdkmike, and @el-iso to include

@kb1lqc
Copy link
Member Author

kb1lqc commented Nov 30, 2017

Hey @hdkmike am I missing something, your repo doesnt have an echo program?

@kb1lqc
Copy link
Member Author

kb1lqc commented Nov 30, 2017

I'm trying to figure out if the best way to put this program together is to have a module that provides two functions. send() and receive(). These both perform the functions in reference to TCP/UDP packets for the paths in the diagram above spanning through pytun, sliplib, and pyserial-asyncio. That way the actual installation program faradayio simply invokes both of these functions (maybe this is what uses pyserial?) and we can unit test the conversion path between send and receive paths. Thoughts?

@hdkmike
Copy link

hdkmike commented Dec 1, 2017

@kb1lqc , the echohandler is here: L18 in tunnel_easy.py.

Let me emphasize, this is a really dumb handler. There's no error handling and it makes a bunch of assumptions.

@hdkmike
Copy link

hdkmike commented Dec 1, 2017

@kb1lqc , I don't completely understand your question. I get the design in the diagram above.

So you're looking to have a faradayio module. What happens if I call send()? Does it send the data to the board thus bypassing the tun adapter? Then I can call receive() and read data send to the module from the board? Then you can call some sort of "make tun adapter" method which will actually make the tun adapter and then have it's mechanisms call send() and receive()? Do I understand correctly?

@kb1lqc
Copy link
Member Author

kb1lqc commented Dec 1, 2017 via email

@kb1lqc
Copy link
Member Author

kb1lqc commented Dec 7, 2017

⚠️ Heads-up I needed to install sliplib from Github as pypi module is way out of date (V0.0.1) when the Driver class is missing and the Github (V0.1.0) contains it.

https://github.com/rhjdjong/SlipLib

kb1lqc added a commit that referenced this issue Feb 1, 2018
Pulling in Packaging code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants