Tag Info

Hot answers tagged

4

If you simply want to remove AJAX in favor of Web Sockets, there must be one problem: what if the client doesn't support Web Sockets? If, on the other hand, you keep AJAX requests if there is no active Web Sockets connection, and use Web Sockets otherwise, then it might make the architecture more difficult to follow. More code written means more code to ...


3

If i load an asset though the browser normally (http request) will the browser will keep that image in memory once it's no longer being rendered. Browser typically cache files, like images. When asking the server for files it first asks if they have changed. If the browser returns that the file has not changed the browser will use the file from ...


3

600 persistent connections should not be an issue - in general connecting overhead is high compared to idle connection overhead(especially if using secure, handshake-based protocol such as TLS), so keeping connections open rather than closing and opening them upon actions definitely reduces the amount of load on the server(and the network, for that matter). ...


3

I have some cognitive dissonance regarding the pause button - as a user, I consider 'Pause' to mean - halt what the server is doing. From your requirement, though, it seems that the server is not affected by the button at all, which might be confusing, and even misleading, as the feedback to the user really stops. I believe that in most cases, a button ...


2

'GUI' or web fronted You can choose between several very easy and fancy web frameworks to build the frontend (you already mentioned web.py and Cherrypy). Personally I prefer Flask, which is actively maintained, widely used, easy to learn, very lightweight and has great docs/community. 'Backend' or asynchronous tasks Celery is a good library to have tasks ...


2

There are several methods for this: Web Sockets Long Polling (or the blanket term Comet) For solutions, check out: django-socketio Not a django implementation, but a great resource for concepts: SignalR I would recommend going the websockets route, then falling back to long polling. Here's a fairly scholarly article on long polling and best ...


1

That is how HornetQ's websocket implementation works (Stomp doesn't necessarily have to work over WebSockets but HornetQ exposes both naked TCP and WebSocket options). StompConnection.java Essentially the connection object is wrapped with the metadata of the HornetQ session ID and the login credentials and flagged "isValid". So yes, it's certainly a ...


1

If you want typical request-response client-server communication use ajax. If you want bidireccional communication and for example sending updates from the server to the clients use web sockets. "It seems like I could use a simple node.js websocket server as an intermediary to between the client-side JS and PHP, passing commands from the client over ...


1

I think it's easy to see websockets as simply upgraded AJAX so the natural question is "Why not use websockets for everything?" While it's true you could use them for everything (more or less), it might be good to think about the original intent. AJAX was really good at grabbing resources asynchronously and doing something once complete. Then came COMET etc ...


1

One way to achieve it is to use <iframe> element in HTML which is use to embed another document inline of the current HTML document. http://www.w3schools.com/tags/tag_iframe.asp Otherway to do it, would be to use JavaScript. You would have a JavaScript file which adds dynamic elements to the site. You could host it on your server and ask websites to ...


1

Keep in mind that node is non blocking when waiting for io, not if you are processing items within your code. If you are using node to loop through or manipulate large datasets, consider offloading that work to the database or other processes. It also sounds like you are trying to combine database logic (primary keys, rows) with application logic (user ...


1

Section 10.3 of the RFC explains exactly why masking is required. It's a very specific response to a specific hacking technique. The problem it is trying to address is described in a 2010 paper called Talking to Yourself for Fun and Profit by some of the sharpest Internet transport security folks. Client-to-Server masking is used by the Websocket protocol ...


1

It looks like Autobahn fits nicely with what you're trying to do. There are other tools available as well. Check out the Windows Azure Service Bus (which has client frameworks for Java, .NET, PHP, Python, NodeJS, and Ruby). While the built in rest messages are useful. You'll find that your application will outgrow basic CRUD operations. For instance if your ...


1

If you have the connectivity, go with a message queue - although you have to define your own protocols (hardly a difficult task!) to send messages of a particular structure and format. The problem with maintenance is that typically the client and server are built separately so you need to be careful to keep both ends using the same message definitions, but ...


1

If I do not, I need to store stuff on the client, since the information will then be distributed on my network. Is any of the HTML5 storage models good for this? I've read somewhere that they have a size limit. The only way I know how to distribute data in your scenario is with a web server component. If you want to store your data client side ...



Only top voted, non community-wiki answers of a minimum length are eligible