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'd like some advice as to the best server-side code that can handle real time data from devices and make decisions based on inputs. A simple example: Suppose I have a web-enabled thermometer, running a light TCP/IP client stack. When the temperature gets to 30 degrees, I want the device to contact the server, and then I want the server to send me an email. I also want the server to be able to send a command to turn on a heater.
The issue at hand here is the ability to start a TCP message from the server, and get through an assortment of arbitrary firewalls and routers, all the way down to the client device. I know that there are 'workarounds' like polling the server for updates, or 'long polling' where I call up to the server, and keep a connection open in case it has something to send. The problem here is bandwidth. Messages are rare, but important, so the headers and handshaking make up 98% of the traffic.
I've been reading up on WebSockets, and it seems like they are exactly what I need, especially when paired with HTML5.
Does anyone know of a ready-to-go server software package that could run on a cloud server, and push data down to my devices using some standardized methods? I really don't want to reinvent the wheel here, and I can't believe I'm the first to try this. I see a few folks doing it with their own proprietary solutions, but I'm more interested in buying a one-stop package.
WebSocket is a valid choice for connecting embedded devices to backend infrastructure due to it's low overhead, low latency and compatibility with Web and general network infrastructure. There is a broad range of server implementations available, i.e. Jetty, node.js based etc.
As an example, here is a demo connecting an Arduino device to a WebSocket server and a browser client showing real-time data in a chart:
https://github.com/tavendo/AutobahnPython/tree/master/examples/wamp/serial2ws
http://www.youtube.com/watch?v=va7j86thW5M
The technology used there, AutobahnPython, is a Python/Twisted based WebSocket implementation that
provides server and client implementation
directly runs on embedded devices like RasperryPi
makes it easy to access sensors connected via serial or CANbus (since Twisted supports that very well)
provides RPC and PubSub messsaging patterns on top of WebSocket
The tech is open-source, so you can roll your own solution. If you look for help/services to get it done for you, contact me;) We also provide Tavendo WebMQ, a virtual appliance (VMware, EC2) which adds features, management UI etc and also includes a REST API to push data to WebSocket clients.
Disclaimer: I am author of Autobahn and work for Tavendo.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm using Angular 4 Typescript and MySQL to create a chat system. I can post messages to my server.
But, I'm having a hard time of understanding how to retrieve the data. When a user subscribes to the chat channel, I don't want him/her to receive all the chat logs at once. Only the most recent. How would I go about this?
Firstly, you need the server to talk to the client instead of HTTP polling. HTML5 has server-sent events (SSE) but there's a much better way.
Websockets is the way forward. This way the server can broadcast new chat messages to all clients. npm's socket.io is a great websockets implementation. Moreover, if websockets is not available on the browser (think crappy browsers) it falls back to HTTP polling and failing that it has further fallbacks for really crappy browsers.
Very happily for you, the socket.io hello world app is a chat app. You can see it here and follow the simple tutorial - https://socket.io/get-started/chat/
You can integrate socket.io into Angular very easily. As events are received by the client from the server you can emit these events to an RxJS Subject and anything can subscribe to this subject.
See this Angular info on using RxJS Subjects for inter-component communication - https://angular.io/guide/component-interaction#parent-and-children-communicate-via-a-service
OK, that's the easy part done. What about getting the messages before the user joined the chat channel. Server side, you should look at message queuing. I'm not greatly experienced here but techs like RabbitMQ are what you need. That should do it but, on the client-side, I would also take a look at RxJS Replay Subjects (a different type of Subject) which can emit events that happened before subscription.
TIP: If you are really going pro you should be using a client-side Angular store such as ngrx. Free tutorials here tend to be rubbish. I would recommend investing in the ngrx tutorial on Udemy. ngrx is what the pro's use.
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 have scenario for which I am looking for a message queue service which supports below:
Ease to Use
Very high in performance
Message once read shouldn't be available for other consumers.
Should have capability to delete the message once read.
Message once published should not get dropped.
The scenario which I have is described below:
There are many publishers.
There will be many consumers.
Queuing server and consumers residing on same machine, but publishers are residing on different machines.
Please let me know best queuing service apart from Rabbitmq and sqs satisfying above points
I would recommend Apache Kafka: http://kafka.apache.org/
If you want to know a comparison between Kafka and RabbitMQ you should read this article: http://www.quora.com/RabbitMQ/RabbitMQ-vs-Kafka-which-one-for-durable-messaging-with-good-query-features
Also, you should take a look to this: ActiveMQ or RabbitMQ or ZeroMQ or
Kafka as far I know is mainly meant for real data propagation and I think my requirement doesn't require something like kafka. I have used SQS but the only problem I have with SQS is high latency. Publisher pushed message to queue and consumer keep on polling for new message, this implementation is hitting me with very high latency. My requirement is simple as follows:
Queue service should have high availability and reliability like SQS
Latency should be very high lets say not more than 10ms. (here 10ms includes publishing and receiving the message).
Also my message size is very small say not more than 20-30 bytes.
I have thought of using redis, in which I will be pushing the messages to a list and workers will keep on popping them back to back till list becomes empty, but I have not done any benchmarking on that. So here I really need suggestion so I go in right direction.
Thanks,
For some of my system integration projects I met the MQ-tasks. Several rich costumers wants the production solutions like IBM WebSphere MQ, but I think it's too much expressive and difficult.
I found and used the simple and stable analog: e-mail server.
All integrated systems got the local e-mail boxes. Messages are e-mail, with command-code in subject and json in attachments. E-mail server listen and dispatch all queues, to recipients or to groups of them. E-mail protocols are stable and all developers know a lot of tools to work with it. Sysadmins and testers use the simple e-mail clients for testing and auditing. All e-mail servers have a logging tools.
It's best and easy solution, and I suggest it for most of integration projects.
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 4 years ago.
Improve this question
I haven been trying to understand the difference between VNC and RDP. My understanding is the VNC more or less just transmits a picture of the desktop. RDP however has more of a semantic understanding of what is happening on the desktop and transmits how to render certain types of windows, buttons, etc. (I don't know how relevant this is unless people are using Windows Presentation Foundation or something similar though...)
So it seems that RDP is a much more efficient protocol.
However, my primary use case will be for monitoring a desktop that has Chrome browser full screen. In this case, will RDP be doing the same thing as VNC would and transmitting the contents of the Chrome browser?
I think you are mostly right that RDP handles vector graphics, while vnc is mainly screen image based.
Another difference is RDP informs clients when changes occur, while VNC server waits for clients to request the screen updates. This also makes RDP more efficient.
However, as users want more and more of the same experience as the remote computer, RDP nowadays seldom send vector graphics, i.e., RDP pretty much also send screen image diffs. The reason RDP is still faster is because Microsoft has built-in drivers inside Windows to detect display changes while VNC uses workaround to do that, you can imagine Microsoft does much better job in this. So even both protocols send the same image, Microsoft is much more efficient. As a matter of fact, no Windows remoting software is as efficient as RDP (I know Citrix's ICA, let's put it under same RDP category).
If you plan to remotely use Chrome for videos, you mway feel disappointed by RDP, as it's slow unless you turn on RemoteFX, but it's only available from Windows 2008 servers (I am not sure if Windows 8 supports it, though).
So my suggestion, use RDP whenever possible.
I think you are getting confused by relating RDP and VNC with chrome. VNC (Virtual Network Computing) relates to various remote support tools like Ultra VNC, Real VNC, logmeinrescue, gosupportnow, GoToMyPC etc. and RDP means remote desktop access, remote desktop protocol, Microsoft remote desktop software etc. There are various meanings associated with RDP and VNC. It is a very detailed topic discussion of which requires lot of time.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have been writing software for several decades now and these days everything is web.
Before the web we had Client Server apps that were basically thick client applications that spoke directly to the database. They had some disadvantages, such as deployment was cumbersome, Did not scale because DB handled all traffic. Of course back then distribution of apps was limited to being on a desktop on a corporate network. The benefits to these apps were that they had fewer layers and were quick to develop.
There are times when the requirements call for an app behind a firewall with a dedicated database and a relatively small amount of clients. I suggest (sometimes on StackOverflow) the old Client/Server type architecture and everybody looks at me like I have 3 legs and 6 arms.
With modern technologies that allow automatic deployments of apps and the tools we have today. Is there a reason this technology is not viable ? Is it that the new generation of developers only know web stuff ?
I can think of at least two large-ish markets where client-server is still big:
Online games and virtual worlds, such as Battlefield or Second Life. Usually you need a thick client plus a connection to a shared server.
Custom-made scientific software. Complex technical or scientific software, especially if it needs an interactive graphical UI that does direct manipulation, is sometimes written in this fashion too.
I'm sure thick clients are still being developed, even today.
Having said that, choosing a web-based architecture is not about the "new generation of developers" only knowing web stuff, you do get a lot of advantages if you can make your application web-based:
Deployment is dead simple. Even with things like ClickOnce, automatic updates, etc, nothing beats simply refreshing the page to get the latest version
You can use something like Silverlight to get 99% of the benefits of a desktop application (in terms of the ability to run code on the client)
Web applications can be made available remotely much more easily than desktop applications (a lot of companies have remote workers these days, setting up a VPN is a pain if all you want to do is access payroll (or whatever))
But at the end of the day, it's all about the right tool for the job. Web applications don't help when you want to write plugins for Office (Word, Outlook, etc), they don't help if you have to control custom hardware (POS terminals, etc - although you could write that into the server in some cases...), and probably a few more cases as well.
We have some Flex apps that communicate with XML based web services that are pretty close to old school Client Server apps. But rather than using SQL, they speak a custom XML language and render SOAP responses.
We currently develop and deploy numerous client/server applications annually. The development is simple and automated. We are not limited to the database technologies we are able to deploy. Client/server deployments are faster for calculations, form updates and reporting. The Web/Cloud based applications are less responsive than an application running on a client station (thick client).
This is because of the distribution of cpu load. Whereas a server side application requires the server to perform all calculations the client side can run this on the local machine. As any system gets more complex the moments that a user has to wait for results increases. These moments of employee time are more expensive as they involve more of the paid employees. These moments add up within an organization as a great many "man hours" over a year.
The problems with updates are solved within our development tool set. Just as when you may open your favorite browser it notices that the version you are using is not the most recent we embed that same process within our client/server applications. In fact we don't give them a choice to update. Since updates may, many times, require database changes we force the update to happen before the user is allowed to run the software.
To improve visibility of the information contained with our custom client/server systems we offer custom developed web sites that have specific applications such as field dispatch or customer support forum integration into the desktop client/server applications. From my perspective I see a complete integration of client server and responsive web applications taking a better position in the years to come.
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
I want to run a website where people could see each other through web camera. I can't find anything in google, so, can you give me any suggestions or link to tutorial?
Thanks
Action Script 3 + Flash Media Server or opensource Red5 server
http://osflash.org/red5
Would like to try something hot ?
Silverlight 4 (now in Beta) seems to have support for microphone&webcam. You will need to create server side for it as well. Probably some kind of user management and contact list. There will be significant bandwidth if you get lot of users, so the server side should created be scalable to multiple machines. Maybe Azure cloud ? With any platform you choose it will take lot of effort.
I belive that you did not undestand that this think you ask, if you going to build it its takes months of design and developing.
if you search for "web chat webcam" you maybe see why I say that.
For example this http://www.ivideochat.com/ site have developed a program for that reason. See how complicate it is, how many think have.
Also you did not say, what platform you using, what is your server that going to split the video channels and send them all over the other, are you going to use it for one to one, or all to all, are you going to build it on asp.net ? on linux, on flash, on what ?
Some times small thinks in words, are too huge in developing.
So for me you must define a lot of thinks and then maybe you can see if you can do that.
1.Media stream server ? example http://www.adobe.com/products/flashmediaserver/
2.Developing platform.
3.Number of possible users.
4.The way they goint o interact each other.
5.All of them need to have camera ?
6.What about bad users (that show bad thinks) ?
7.Do they going to chat also ?
Think about all that first, then maybe is more clear to you what you going to get.
An adsl connection 12$, a computer
320$, as3 documentacion about camera
class priceless
Architecturally, you need a server to relay the video/audio to both parties, since they cannot connect directly.
You need a Silverlight or Flash 'movie' running in the browser, which you have written, and you need a server to do the relaying.
Its relatively straightforward using Haxe.
Haxe is a Free language for creating both Flash 'movies' and server applications (and more; read their homepage).
One of the Haxe-related servers that is available for Free is HaxeVideo - literally a video server that (among other things) supports live streaming from clients. Run HaxeVideo on a server and you can easily make Flash clients (written in the Haxe language naturally) do video chat.
There are several sites that do precisely this e.g. Reel Portal and DoVisio
If you anticipate a very high volume you can turn to $$$ servers such as Wowza or Flash Media Server (FMS), or you can simply add peering support to HaxeVideo.
My suggestion is to hire a developer or two who know how to build web-applications involving real-time audio & video capabilities in Flex/Silverlight.