• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MultiThreading Project Idea

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
I am planning to do my Masters project on Java multithreading and I am looking for some project ideas.I have one idea where I am planning to use the sourceforge JExcel API(this library manipulates Excel) to speed up the excel sheets manipualtion by introducing threads while using the JExcel API to read/write excel .I am kinda stuck now because I dont know how to go about this.
I am not sure if I am going in the right track..Ok so this is my first appraoch:
1) I want to read multiple worksheets(independent of each other) in an excel file concurrently,so that the excel file opens more quickly.

Any suggestions or advice..I really need help.

Sify
 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sify, I'm not expert in Threads. and I haven't worked with JExcel. the whole of the work can be like this that, create 3 or n thread (according to your files) with a controller(main) thread and start them(main starts other), and then it's dependence on your business that how do you want combine these files, row by row? sheet by sheet? (i.e. row by row.), the main thread reads a row of each thread an put it in the target file. I think you have to synchronize threads, and communicate with them with wait() and notify() guys. anyway Threading guys would help you better.
 
Sify Alto
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Arash for your reply.
I think thats a very good idea.I will try to implement what you told.I will let you know if I have any more doubts and if I was able to do that.

Sify
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Just pointing out the obvious, apologies if you already know this.... reading a file is an I/O bound operation. This means that for most of the operation, the CPU is not doing anything, as it is waiting for the hard disk to fetch the file data. Also, the hard disk sits on a bus, which is used to transfer the data from drive to memory -- and in most cases, this is not even done by the CPU -- it is done by the DMA processor.

So... you do know that unless the files are on separate disks, and likely on separate controllers, it is very unlikely that you will get any speed up via adding more threads, right?

Henry
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe perceived performance is the intended goal, though?
If the idea is to display the contents of the workbook to a user it might make sense to just load the first (few) worksheet(s) and let the user interact with that data, while a worker thread quietly proceeds to load the additional worksheets in the background. Stealthfully. Like a ninja.
 
Sify Alto
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Henry for the reply.
Yes,in my test data I was planning to have the files in different partitions. I had another question,if I wanted to compare the execution times both in single core and dual core,is there any way that I could use my dual core machine as a single core-Is setting all the processes(from task manager) affinity to core - 0 get the results ?
 
Sify Alto
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Jelle .
Thats a neat idea.I will definitely try that .
reply
    Bookmark Topic Watch Topic
  • New Topic