You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create an object of type com.inmobi.assignment.StoreImpl
Call init on this object by passing config file path as the argument
Invoke get and put methods as required.
Call destroy on the same object to safely destroy the Store.
Assumptions And TradeOffs
Keys are comparable.This is needed for efficient storage
in a file.
Total data stored in persistent store would at all time be less the maximum allowed size of the file.
After the data is transfered from memory to file,all the blocked threads are invoked.
This could cause sudden spike in memory usage beyond threshold value.
TradeOff:Alternative to this could be invoking blocked threads one by one which could have affected the performance
EDIT On re investigating the implementation the above issue won't happen because the invoking threads need to re acquire the write lock.
If multiple instances of Store are running under the same JVM than it is mandate to specify different paths of persistent storage file.
Null is not a valid value to be stored against any key.Storing null would behave as if the key doesn't exist.
Steps to run Test
Execute mvn test to run all unit test
Execute mvn test -P coverage to run test along with clover code coverage.
Jmeter setup is required to run the load test.
Load Test Plan is located at src/test/resources/Load Test Plan.jmx.
Custom Jmeter samplers are located at src/test/com/inmobi/jmeter