Chelsie  Towne

Chelsie Towne

1596114360

Hidden Treasure Chronicle Queue

Chronicle is a cool name right? It’s like science fiction movie’s AI. Chronicle find me the Uranium!

But unfortunately it is just a queue, it is a good one too.


In our project (It was a network project, we got datas from devices and analyzed them) there was a need that 10 million device objects have to be shuffled and send it to get datas from devices. They have to be shuffled because you shouldn’t go more than once to network devices at the same time, it cause too much network activity and it effects network quality in devices.

It is easy right just get the objects and shuffle them.

Collections.shuffle(list);

Nope. Your heap size gonna off the roof by doing this. 10 million object is really huge and object has 30–35 property.

If I remember correctly first time we try this, heap size was over 10GB and application was crashed.


So 10 million data, how can I shuffle them and not causing huge increase on heap size.

I started to research. I wanted to store them in a file and get them randomly, it would be quick and heap free. But how can you do that? Okay you stored your all object to a file line by line but how can you take them by random? File doesn’t have a line number to get data like lines.get(1) and I think I tried to find going to a random line but I couldn’t find anything.

I didn’t wanted to use db. Mongo_(we were using that) _was already doing too much work and it would be too slow to work with and getting datas by random is still a problem.

#java #software-development #queue #solutions #software-engineering

What is GEEK

Buddha Community

Hidden Treasure Chronicle Queue
Chelsie  Towne

Chelsie Towne

1596114360

Hidden Treasure Chronicle Queue

Chronicle is a cool name right? It’s like science fiction movie’s AI. Chronicle find me the Uranium!

But unfortunately it is just a queue, it is a good one too.


In our project (It was a network project, we got datas from devices and analyzed them) there was a need that 10 million device objects have to be shuffled and send it to get datas from devices. They have to be shuffled because you shouldn’t go more than once to network devices at the same time, it cause too much network activity and it effects network quality in devices.

It is easy right just get the objects and shuffle them.

Collections.shuffle(list);

Nope. Your heap size gonna off the roof by doing this. 10 million object is really huge and object has 30–35 property.

If I remember correctly first time we try this, heap size was over 10GB and application was crashed.


So 10 million data, how can I shuffle them and not causing huge increase on heap size.

I started to research. I wanted to store them in a file and get them randomly, it would be quick and heap free. But how can you do that? Okay you stored your all object to a file line by line but how can you take them by random? File doesn’t have a line number to get data like lines.get(1) and I think I tried to find going to a random line but I couldn’t find anything.

I didn’t wanted to use db. Mongo_(we were using that) _was already doing too much work and it would be too slow to work with and getting datas by random is still a problem.

#java #software-development #queue #solutions #software-engineering

August  Larson

August Larson

1624990500

How to Create a Queue in Python

Implement the queue data structure using Python

queue is a linear data structure that follows the First In First Out (FIFO) principle. That means the first element that is added to the queue is the first one to be removed. It has similarities to stack. Often queue and stack are studied together. But to keep things simple and short I decided to write two separate articles on them. Here is my article on how to create a stack in Python:

But in this article, we will learn how to create a queue. Let’s get started!

#data-structures #queue #computer-science #python #how to create a queue in python #a queue in python

Mya  Lynch

Mya Lynch

1598640600

Difference between Circular Queue and Priority Queue

Circular queue:Circular Queue is a linear data structure in which the operations are performed based on FIFO (First In First Out) principle and the last position is connected back to the first position to make a circle. It is also called ‘Ring Buffer’.

Priority queue:A priority queue is a special type of queue in which each element is associated with a priority and is served according to its priority.

Difference between a circular queue and priority queue are as follows:

Circular queuePriority queueCircular queue is not linear but circular.Priority is a special type of data structure in which items can be inserted or deleted based on the priority.It is also called as a ring buffer.It is also called simple queue.Items can be inserted or deleted from a queue in O(1) time.It can perform three operations like insert delete and display.Both the front and the rear pointers wrap around to the beginning of the array.It does not allow elements in sorted array.It overcomes the problem of linear queue.It allows duplicate elements.It requires less memory.It requires more memory.More efficient Less efficient.

#data structures #difference between #queue #priority-queue

How to Send E-mail Using Queue in Laravel 7/8

Today I will show you How to Send E-mail Using Queue in Laravel 7/8, many time we can see some process take more time to load like payment gateway, email send, etc. Whenever you are sending email for verification then it load time to send mail because it is services. If you don’t want to wait to user for send email or other process on loading server side process then you can use queue.

Read More : How to Send E-mail Using Queue in Laravel 7/8

https://websolutionstuff.com/post/how-to-send-e-mail-using-queue-in-laravel-7-8


Read Also : Send Mail Example In Laravel 8

https://websolutionstuff.com/post/send-mail-example-in-laravel-8

#how to send e-mail using queue in laravel 7/8 #email #laravel #send mail using queue in laravel 7 #laravel 7/8 send mail using queue #laravel 7/8 mail queue example

Madisyn  Lakin

Madisyn Lakin

1627306800

C++ Program to Implement Queue Data Structure using Arrays and All Queue Operations

We will be implementing queue data structure and all its standard operations. We will implement queue using arrays in c++ programming language.
Following are the stack operations -

  1. enqueue() -
    Elements are added from one end (Rear / Back).
  2. dequeue() -
    Elements are removed from one end (Head / Front).
  3. isEmpty() -
    Tells if the queue is empty or not
  4. isfull() -
    Tells if the queue is full or not.
  5. count() -
    Get the number of items in the queue.
  6. display() -
    Display all items in the queue

#queue #queueprogram #queuecpp #queuedatastructure #datastructures #queueds #queueoperations

#queue #c++ #queue data structure