Are there any programs that can simulate an unstable network connection? [closed] - simulation

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
We need to simulate an unstable network connection to try to debug some connectivity issues in our server/client application and I was wondering if there are any programs out there that can simulate those conditions such as on a faint wireless network.
I'm not just referring to reducing bandwidth, but also reducing reliability, frequent on and off, short bursts of disconnectedness, etc.

I used a tool called netem that runs on linux. It allows you to increase packet loss at a given percentage, introduce delays within packets and handle packet re-ordering. Basically it's designed to emulate different networks.
All you need to get it up and running is a spare machine to install Linux on with a couple of Ethernet cards. Hook it up as a bridge, and run netem between them. Should be quite simple to do. I used it for my University project having no Linux experience, but I've probably still got all the setup instructions somewhere.

Ian's solution seems like a pretty good long term solution, but sounded a little involved for just some quick testing. (finding another machine, hooking it up, possibly setting up router stuff etc)
I ended up just using Net Limiter and randomly set the limit to something stupidly low manually (like 1 byte/sec) and that seems to be sufficient for our needs.

http://snad.ncsl.nist.gov/nistnet/
It's a little complicated to setup, but works very well.

Related

New Intel processors KPTI bug. Which slowdown to expect for floating point computation? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Some media have reported that a new hardware bug in Intel processors, allowing user mode processes to access kernel mode memory, has been discovered:
It is understood the bug is present in modern Intel processors
produced in the past decade. It allows normal user programs – from
database applications to JavaScript in web browsers – to discern to
some extent the layout or contents of protected kernel memory areas.
The effects [of fixes] are still being benchmarked, however we're
looking at a ballpark figure of five to 30 per cent slow down,
depending on the task and the processor model.
After the bug is fixed, which slowdown am I to expect for multicore floating point computations?
To my understanding, only the performance of switches between kernel and user mode are affected. For example, handling a lot of I/O is a workload where this is frequent, but CPU-intensive processes should not be affected as much.
To quote from one article that analyzes performance of the Linux KPTI patch:
Most workloads that we have run show single-digit regressions. 5% is a good round number for what is typical. The worst we have seen is a roughly 30% regression on a loopback networking test that did a ton of syscalls and context switches.
...
So PostgreSQL SELECT command is about ~20% slower with KPTI workaround, and I/Os in general seem to be impacted negatively according to Phoronix benchmarks especially with fast storage, but not gaming performance, Linux kernel compilation, H.264 encoding, etc…
Source: https://www.cnx-software.com/2018/01/03/intel-hardware-security-bug-fix-to-hit-performance-on-windows-linux/
So, if your FP computations rely mostly on in-memory data shifting and not I/O, they should be mostly unaffected.

Remotely Updating Raspberry Pi Software 'over the air' [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
We use a Raspberry Pi embedded computer to connect IP cameras on a customers network to our cloud based recording service.
We are using Raspbian and about 50% are Wheezy and 50% are Jessie.
The challenge we have is how to remotely update the software running on these IFUs.
Our current method involves using SSH and Ansible. We have a complex Ansible script that makes all the changes to the Raspberry Pi and we have automated this to an extent so we can updates lots of Raspberry Pi's at a time.
However, the problem is is that this is a non-atomic update. The Raspberry Pi's do not necessarily always have exactly the same package versions on them depending on when they were updated. Its also possible for an upgrade to fail half way through etc.
I am aware that there are a couple of ways of doing an atomic upgrade by downloading a new 'software image' and swapping over to using it instead using a bootloader. I think OpenWRT can do this as well as swupdate: https://github.com/sbabic/swupdate
Has anyone ever done something like this on a Raspberry Pi before?
Thanks
As a bit of an update to this question, I found a couple of ways of doing this.
The first thing to consider is that you do not have to stick with the RPI's default bootloader as #user3145836 pointed out. Uboot allows you to flip the boot partition.
The best option at the moment appears to be https://mender.io and this is the option that we have gone with.
If you can dockerize your app, https://resin.io/ is a nice hosted way of doing it.

Raspberry pi as a universal remote [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I would like to know if I could use the raspberry pi phone as a universal remote. I am new to the raspberry pi. Would you recommend any parts for the device. If you are familiar with the pi phone them could you recommend any if blasters or batteries.
This is some hardcore serious overkill for a homebrew remote project.
you should be able to simply drive a normal IR-LED directly from one of the Digital Out lines on a raspberry pi board ( assuming that the PI phone leaves at-least one spare. ) The power consumption from something like that is a bit larger than what you would expect (therefore you would only get a few hours out of it. ) something like a ardunio would have a significantly longer battery life (and if you get creative and drop a capacitance sensor onto it to turn on and off the Touchscreen if you are holding it or not then you can have it live even longer. )
It is less than ideal due to the current draw from a IR LED, so a more suitable answer would be to run a transistor from the GPIO port and a secondary regulated power source for the LED.

How to monitor a web socket connection? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I tried to find a tool to monitor single web socket connection... I didn't find any useful resources. My intention is to read the data that is going through a socket like, what data is passed through these methods.
subscribe()
unsubscribe()
onreceive()
send()
connect()
just saw this question. Answering for any others that may be wondering on the issue.
As mentioned Wireshark can "inspect" WebSocket frames as described here.
However for around an year now, Google Chrome has built in support for this. In Developer Tools, under Network there is a sub-filter for WebSockets. Another nice Chrome feature are the so-called "Net-Internals" thay can really help dive "behind the scenes" in the browser.
Here are some nice articles on how this can all be used together:
Logging WebSocket Frames using Chrome Developer Tools, Net-internals and Wireshark (TOTD #184)
And a book chapter listed by Springer (PDF) The book seems to be The Definitive Guide to HTML5 WebSocket.
This may not be what you're after, but you could use something like wireshark. It'll let you monitor all of the network traffic that's going on from your machine. From what I can remember, you could then apply filters to only listen for particular types of traffic, or for traffic between certain IP addresses. I'm not sure if you can apply filters to particular sockets, however it is a pretty flexible piece of software.
If you're looking for a much higher level, then you might be able to get away with just using a something like fiddler, which is a local proxy server that lets you examine web traffic.

Programming an IPTV application- Client/Server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am part of a team which has been given a task to deploy an IPTV solution for a company. The system has been architect-ed like this.
There is Video capture card , which receives satellite signals from a satellite receiver. This video capture card is part of a windows 7 machine. The signals need to be trans coded here and passed to a streaming server which will be received by end users.
The end users will be desktop users having a C#.NET application installed to view the channels.
I am confused at the choice of server software as I have multiple choices - Windows Media Server, VideoLan (VLC project), or Flash Media Server, it also supports MPEG-2 HD.
My main aim to be able to stream MPEG-2 channels with HD quality and encrypt the channels at the server end so that the streams can be protected. I know reversing is possible but it wont be easy as for every naive user with wireshark snooping my streams.
If any of you here has ever done such an implementation please do suggest me the best technologies I should go for.
Iam open to C#,C++ and other similar languages. Any help shall be deeply appreciated.
edit: End Users shall be part of Internet and not necessarily a lan, reason for this question is internet doesn't support multicast like Lan, so I need some suggestions.
Guys, We have finally settled to use XMBC , Boxee's code base for our solution.