Tech IndustryDec 13, 2018

Apple interview question

I had apple interview where technical questions were asked. One question where the interviewer stressed upon was.. How to make parallel calls to google.com, amazon.com, apple.com and aggregate results. I explained multithreading and concurrency but interviewer doesn't look satisfied. Is there any other concept/way to do it? What is he looking for?

Apple
Apple
Apple
New
V000r Dec 13, 2018

Distributed system.

This comment was deleted by the original commenter.
Infosys ac OP Dec 13, 2018

Backend

AMD Zootaxy Dec 13, 2018

Map/Reduce?

New
leet4job Dec 13, 2018

Learn Swift. Apple uses Grand Central Dispatching for its concurrency model.

Amazon Bismillaa Dec 13, 2018

There are many ways - multiple threads, thread pool + task queue, futures, actors, distributed queue + workers, coroutines etc

PayPal jCOB68 Dec 13, 2018

Scatter gather pattern. Super easy with GoLang. In Java you could do in many varieties. If you are using RXJava you can Zip up all the remote calls and have a callback called when all are done. You could plain ExecutorService and submit futures and join all of them or use completable future for callback. Multithreading is tricky you need to code otherwise you will just suck at these interviews.

Unity Ztal672 Dec 13, 2018

In Go, sync.WaitGroup