This was for the data engineer 2 position at Uber,Bangalore.
It was a 90 min Zoom call, with a single machine coding question:
Design an In-Memory Pull Based Queue Library:
Use Cases to be supported:
1.Multiple queues maintained by the Library
2.Each queue must support multiple publishers and subscribers.
3.Each queue has a maximum retention period beyond which a message in the queue should not reside in memory.
4.Each message inside the queue can have an optional TTL value. Any message with expired TTL should not be consumed by any subscriber and should not reside in the memory as well.
5.Each consumer should read all the messages.
First 30 minutes were devoted to discussing the implementation approach, next 60 minutes to coding the solution.
Looking for ideas for a good solution.