queue

Can I implement a queue on top of a keyvalue store without using atomic incr/decr?

I wish to implement a queue on top of my key-value store, but the keyvalue store does not support atomic incr or decr. Is this still possible? ...

Best practices for (over)using Azure queues

Hi, I'm in the early phases of designing an Azure-based application. One of the things that attracts me to Azure is the scalability, given the variability of the demand I'm likely to expect. As such I'm trying to keep things loosely coupled so I can add instances when I need to. The recommendations I've seen for architecting an applica...

Tree-like queues

I'm implementing a interpreter-like project for which I need a strange little scheduling queue. Since I'd like to try and avoid wheel-reinvention I was hoping someone could give me references to a similar structure or existing work. I know I can simply instantiate multiple queues as I go along, I'm just looking for some perspective by ot...

how to make a queue in php with mysql

hy, in my script i run a exec() function to make a movie file with ffmpeg. the problem is ffmpeg can run only 1 time on the server, if 2 people are online on server and first one already run ffmpeg i want the second to wait until the first end the process how to code this? thank you ...

Is it possible to Take object members directly from a queue of type object?

Hi all, If I where to have a Queue holding a collection of objects (Custom object,bool,bool,bool,bool) and the custom object holds three doubles itself. Can I use the .Take(IntegerValue) command to only take one of the doubles (for the specified take length) from the custom entity contained in the queue and cast it to a double array, p...

Is Oracle AQ/Streams of any use in my situation?

I'm writing a workflow system that is driven entirely at each step by explicit human interaction. That is, a task is assigned to a person, that person selects from a few limited options {approve, reject, forward}, and then it is either sent along to the next person or terminated. Just curious if Oracle Streams/AQ has anything to offer ...

Finding the index of a queue that holds a member of a containing object for a given value

I have a Queue that contains a collection of objects, one of these objects is a class called GlobalMarker that has a member called GlobalIndex. What I want to be able to do is find the index of the queue where the GlobalIndex contains a given value (this will always be unique). Simply using the Contains method shown below returns a bo...

SQLite as an App Queue, Exclusive Row Lock?

I am considering using SQLite as a "job queue container", and was wondering how I could do so, using custom C# (with ADO.NET) to work the database. If this was SQL Server, I would setup a serializable transaction to make sure the parent row and child rows were exclusively mine until I was done. I'm not sure how that would work in SQLite...

Purpose of front() and back() in assigning values in a Queue? (C++)

I have declared: queue<int, list<int> > Q After a series of calls: Q.push(37); Q.pop(); Q.push(19); Q.push(3); Q.push(13); Q.front(); Q.push(22); Q.push(8); Q.back(); I get: 19->3->13->22->8->NULL What I don't get is what the calls to Q.front() and Q.back() do. From what I understand, they return a reference to the first or la...

Special kind of queue

I am looking for something like a Queue that would allow me to put elements at the end of the queue and pop them out in the beginning, like a regular Queue does. The difference would be that I also need to compact the Queue from time to time. This is, let's assume I have the following items on my Queue (each character, including the dot...

Any way to have delayed_job execute some run-once code at startup and use across all jobs?

So I've got a delayed_job task that pushes some info to an XMPP server. Ideally you create a connection to XMPP once and then constantly push data to it, rather than creating a new connection every time you have some data to send. Is there any kind of facility in delayed_job for running a sort of 'setup' method when a worker starts, hav...

Queuing using the Database or MSMQ?

A part of the application I'm working on is an swf that shows a test with some 80 questions. Each question is saved in SQL Server through WebORB and ASP.NET. If a candidate finishes the test, the session needs to be validated. The problem is that sometimes 350 candidates finish their test at the same moment, and the CPU on the web serv...

What's the best general programming book to review basic development concepts?

I'm looking for for a programming book that reviews basic concepts like implementing linked lists, stacks, queues, hash tables, tree traversals, search algorithms, etc. etc. Basically, I'm looking for a review of everything I learned in college but have forgotten. I prefer something written in the last few years that includes at least a ...

Tomcat 6 thread safe email queue (javax.mail.*)

Hi I have design/architecture question. I would like to send emails from one of my jsp pages. I have one particular issue that has been a little bit of a problem. there is an instance where one of the pages will need to send around 50 emails at near the same time. I would like the messages sent to a queue where a background thread wi...

Creating JMS Queues at runtime.

I am working on an application where the app user can create / delete queues . Also , he would be able to move a message from 1 queue to another, delete a message , rearrange the messages in the queue based on some filter. One possible design is to use activemq for queues and apache camel for various other operations having integrated ...

Syncronization Exception

Hi I have two threads, one thread processes a queue and the other thread adds stuff into the queue. I want to put the queue processing thread to sleep when its finished processing the queue I want to have the 2nd thread tell it to wake up when it has added an item to the queue However these functions call System.Threading.Synchroniz...

how to sort a queue using (just) another queue and some varibles, in less than O(n^2)?

How can I sort a queue of size N, using just another queue of size N, and a finite number of variables? the naïve implementation - finding the minimum of the queue and pushing it to the empty queue, then finding the new minimal and pushing it, etc. is O(n^2). is there a more efficient algorithm? ...

jQuery animation queues

I am at a dead end, so hoping you jQuery gurus can help. I have a total of 10 elements (actually small images) on a page. I need to animate them like this: first 2 show up then the next 2 show up then the next 3 show up then the next 1 shows up then the last 2 show up So, I have added attributes to each one (sequence_num = "1" (or 2...

jquery animation headache

Doing some jquery animation. I have certain divs set up with an attribute of ani_seq='x' where x is 1 to 9, and then have a class assigned of 'animate'. I am using the following code, which works fine, and fades in each item in sequence: function my_animate( in_wrapper_id ) { $j("#" + in_wrapper_id + " .animate").hide(); // ...

How can I Submit client side answers (to a question) to the server using JAVA?

How can I Submit client side computer user's answers(to a multiple choice question) to the server using JAVA I have a centralized server and about 1000 client systems. In these 1000 systems students take multiple choice quiz at at time (in some 2 hrs time). Now i've to send all these answers of these questions to the server in an asyn...