Fastest collection for concurrent read and write other than Java Collections -
i have requirement store strings collections. collection hold billions of strings.
the collection must support fast up, add , delete in concurrent manner.
is there know fast, low latency collections available besides java collections...
i searched didn't come across interesting...
to hold billions of strings of reasonable length on reasonable cost server need use strategy have outlined below. first consider implications of "billions" of strings:
- do storage calculation (e.g. 10 billion strings, 64 characters per string average): 1.28 trillion bytes = 10 billion x 64 x 2 (utf-8 need @ least 2 bytes per character)
that means 1 cannot use storage on computer hold strings.
the required storage capacity drives 1 use external storage ... flexible use database, fronted cache in mamory. since collection interface, can implement huge storage strings using collection (that internally strings , handle "overflow" database.
further implications: there required methods have return null or error, since not have storage produce results, example
- toarray, toarray
so .. answer question, need implement own collection "huge capacity", , perhpas own caching (or use product ehcache .. example, not recommendation)
Comments
Post a Comment