Kettle - Parallel readings of files and Multithreading [closed] - multithreading

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
It is possible with Kettle to read different files simultaneously? How does it work?
There is the notion of parallelism? Is it related with threads?
Thanks

This is naturally how Kettle works. Each step in a transform runs in its own thread. So if you have multiple input steps, each reading a different file, each file will be read in its own thread.
Note, this is true of transforms, not jobs. Parallel execution in jobs is trickier. For an example of sequencing parallel jobs, check out my answer here:
Waiting for Transformations in a Job

Related

What is a simple definition for a CPU intensive application to answer in an interview? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I got asked during an online interview:- What is CPU Intensive Application? Answer it in 3-4 lines (briefly). I just want the simple definition that can be explained with few-real world examples.
Doesn't get any simpler than this forever loop:
while (true) {}
To explain this, just remember that nodejs is single-threaded, so anything that blocks the event-loop is bound to turn the process into a CPU-hungry beast. Of course the kernel is free to schedule the nodejs process as it sees fit, but the truth of the matter is that only that loop will get a chance to do anything meaningful in your program.
See also Don't Block the Event Loop

what is the best practice for multiple threads writing to one file [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm writing a multi-threaded program and all these threads should write their data to a single file.
these threads only writing different strings for some kind of append-only logging
whats the best practice for sharing a file between threads for out put?
For logging (for future questions, make sure you put that information into the question rather than just a comment) there's a strong preference to not have the threads do file access they don't have to; as it means that logging negatively impacts performance for the rest of that thread.
For that reason, NathanOliver's suggestion of having the threads write to a shared container and then one dedicated to dumping that container to file would probably be the best option for you.

How to create threads in haskell? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
How to create threads and assign tasks to them? Is there any way to do it, like usage of
thread.start_new_thread ( function, args[, kwargs] )
in Python?
thanks in advance
Haskell threads can be spawned using forkIO.
I recommend also reading the GHC concurrency guide, since it has all the relevant pointers.

How PLINQ is better than traditional threading? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Currently I have n suppliers web service which gives me search result for particular product. I am creating n threads myself and merging the final results returned by supplier. I have just come to know about PLINQ. I want to know if it would help the performance. If yes, how.
Better? Depends on what that means for you. PLINQ is definitely cleaner and more maintainable code for a lot of use cases. On the performance side depends on what you compare it against.
In your case if you are creating n threads by hand i would say you might be slower because PLINQ will use the threadpool and avoid some thread creation overhead.

What is Thread locality [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
What is thread locality? I've been doing some research on a particular topic and thread locality has come a up a few times. I haven't been able to find a clear definition of what's meant though.
Thread locality refers to thread local storage. Data marked as threadlocal/threadstatic, is available as per thread copy to each thread accessing it. Any modification in data in one thread is isolated to any other thread.
Read this for details.

Resources