Tag Info

Hot answers tagged

47

According to legend, the original stack received its name by analogy to the stacks of dishes in the university cafeteria: you put one on top, and the (spring-loaded) stack of dishes goes down a bit, you take one away and it pops up a bit. Therefore 'pushing' received a connotation of operating downwards, even though you don't actually push down on the plate ...


43

Think about a Pez dispenser. That's your mental model for a stack - last in, first out. So adding an item to a stack requires you to push down the existing items to make room.


13

I think Windows required applications to poll for IO until NT and Windows 95. Modern general purpose operating systems have pretty much eliminated the need for polling. When your application requests to read from a socket, the read function has to make a call to operating system kernel. The OS puts the calling thread into a suspended state. As network ...


9

Request-response vs. message pushing Some architectures and protocols were designed for request-response type of communication. In HTTP, the client asks the server to GET, POST, DELETE, HEAD etc. something, and the server responds (or fails to respond). In POP3, the server role is limited to answer the requests, nothing more. Some others are designed in a ...


8

Polling is always acceptable when real-time isn't a necessity. What you have to ask yourself is why would you use one instead of the other? The purpose of a push service is a couple things; it can be considerably less traffic for you to deal with if your pushes are broadcasts and a 3rd party provider does the broadcast - this allows you to send one message ...


5

Technique is called long polling, which basically means maintaining the request connection open. In particular case of AJAX name Comet was coined for it's various implementations. With introduction of WebSockets this can be replaced by normal, persistent two-way communication.


4

Automate. Automate. Automate. You're on the right track with an explicit DB version number, but I would go a step further and make the code explicitly aware of exactly what schema it expects to work against (e.g. by committing the actual DDL script and having the updater parse it); then at update time you only have to discover the existing scheme via ...


3

FIFO is a Queue - the first one added to the group is the first one served. LIFO is a Stack - like a bunch of trays. You always take the one from the top of the stack. The term push is used when adding an item to the LIFO/Stack, because at some cafeterias the stack of trays is on a spring loaded surface. As more items are pushed on the stack, the entire ...


2

The illustrations using cafeteria plates or trays, pez dispensers, and piles of books all came later. From Wikipedia: (with references) "The stack was first proposed in 1946, in the computer design of Alan M. Turing (who used the terms "bury" and "unbury") as a means of calling and returning from subroutines." Additional work and patents by others ...


1

Polling should be fine in your case. And you won't have to integrate with yet another system (or multiple systems for multiple platforms). Device specifics may be an issue, though. Can you reliably poll when the app isn't front and center on the device? (may or may not be an issue for you). Your ability to do so may depend on the techonolgy you are ...


1

Of course. It's also easier (just beware of pull spikes if everyone is pulling on the same schedule). That said, I would challenge the assumption that 'a large delay is acceptable', considering mobile users expectations. ('Maps are not updated in real time! Unacceptable!' - or - 'I know it's the weather service, but I'm going to keep pushing that refresh ...


1

One way of handling this is to use PubNub. It is a paid service, but well worth it since it basically handles the entire messaging portion of what you describe, and wouldn't have any scale issues. Its very easy to implement. The clients would connect to the service using long polling (if you roll your own) or one of their client libraries. Messages are ...


1

The database schema versioning is the way to go - each version has only one change to the database, or at least changes that can be reverted as whole. DBDeploy is a great tool to automate that. Some things I have learned useful are: Always test your change locally, and test your code with it, just the ALTER passing is not enough You need to synchronize ...


1

Sure there is. UDP socket applications in Unix, for example, can be pure-push. The best known would be the classic BSD Unix syslogd, which declares its willingness to accept incoming ("pushed") packets and processes them. No reverse communication at the application or protocol level (the "pusher" doesn't even know if the packet was correctly received and ...


1

I would also consider sockets that Charles already presented to certainly be "push" design. He walked you all the way from the realm of the electrical signals up, but another topic to consider are "push" designs which are purely application architecture decisions and happen at much higher abstraction layers. Typical event frameworks would be considered ...


1

You might want to check out Comet or BOSH Which are two methods to simulate sockets over HTTP, they are way more efficient than polling, and technically could scale to the 10k if you use a light weight server such as Nginx which is alot better at handling concurent connections than apache. As for the server with more than 100 connections you could get a ...


1

Proposal 3 is certainly the most efficient, however it is also the most time consuming to implement. Memcache doesn't include this feature, so you'd either have to find some other framework or roll your own (using Gearman in this case). It's not super hard, but it's not trivial and it adds a significant moving part to your system that can fail. I'd make sure ...



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