Details
-
AboutGaurav Sharma
-
SkillsJava, Python, Android, J2EE, machine learning
-
LocationIndia
-
Github
Joined devRant on 7/7/2017
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
-
@Root that’s always true. You can have your cake and eat it too. But sometimes you have downstream systems not necessarily UI that will incur performance penalties per response because your payload was huge.
Some one has to sacrifice their cpu cycles. So it’s better than one system does than 20 others. -
Yes that happened to me too. I got 3.5x salary bump.
-
@hitko also I would update the calculation to make them more accurate.
-
@hitko oh no the use cases are correct let me explain.
If there is a collision then sure check in dB. But that probability is defined by you and can be low enough that you avoid 99.99 percent calls to dB.
Now about the distributed client issue. This filter is not meant to be inside that client instance’s heap, it would be in a central location like a redis cluster and then You can update this when you update the dB. So you definitely avoid the extra calls to the database.
For more info about the use case check example section of -
https://en.m.wikipedia.org/wiki/... -
Basically bloom filter is more specialised and is targeted for specific scenarios.
Indexing is a more general approach. -
@hitko I understand your point. That hour figure I calculated was based on the worst case scenario where my random function is shit. :D
Also, the random functions tend fail more than 0.01percent than I have mentioned there.
If the the million records turn to 100 million or maybe more then indexing won’t be a quick solution.
For example checking if a username is created in reddit or not. That’s basically real-time response.
What I aimed there was to show that if I have enough records in my dB that my random function starts to mess up my API will slow down significantly.
So a solution that takes less space than a index and is faster than an index would be a better solution. This will keep the dB free to do more important stuff.
Also, I have updated the log value too idk how I missed that. -
Also afaik, index can be cached and removed on the basis of the memory pressure. So you will get inconsistent performance.
Am I missing something here? -
@hitko looks like I used natural log by mistake thanks for that.
However the bloom filter is not built during the api call, it’s pre calculated.
We completely avoid a dB call if we use it. -
@JosiasAurel thanks man!
-
@yellow-dog
And just fyi Debian ships with java 11 which is the LTS Version. That’s what I meant by stable release.
A release that doesn’t get any support should it be put into work in production. -
@yellow-dog
Thanks for the comments. But the world doesn’t move at the pace you want to.
Around 60 percent of the enterprise is still on java 8 or previous versions.
And if there are breaking changes in the frameworks you are using then you would need to waste time in upgrading both of them and fixing any issues that then arise.
https://jrebel.com/blog/... -
Take a Mac. Even if macOS doesn’t work out for you. You can run Linux on it.
-
@yellow-dog easy there.
All frameworks support java 8 as it’s one of the stable releases. I am not writing a plain java hello world application. I might need depencies that may not support newer versions.
This is, for me at least a good enough sacrifice. -
@patfromthe90s sure I can and I have been using that for development.
But I think oracle has LTS for its releases and openJdk doesn’t.
I can go for a newer version if that’s not needed. -
@yellow-dog due to the licensing issues.
If you are using Java SE for non-commercial use and under a very restrictive scenario, you might have the rights to use Java SE for free. However, activating and using any ‘commercial features’ of Java requires a license, so it is worth confirming that you are not using any commercial features and are in accordance with Oracle’s Java licensing policies. -
@shoop because I want rdbms for storing relational and data and mongo for key value pairs.
For example - any user can create their own request for fcm I don’t know the dto structure that they will create. I would need to persist it.
I can save it as a blob but then performance suffers. So I used a nosql data store. -
@endor Yes you are.
The folder structure is like this ->
main_folder
- all_pics
- Some_folder
- Some_folder
- Some_folder
- ......
- Some_folder
- Some_folder
- Some_folder
- ......
- Some_folder
- Some_folder
- Some_folder
- ......
All folders can have jpgs. -
@PrivateGER unfortunately it's not piece of shit. It's point of sales
-
@highlight
public static void main(String... arts){
System.out.println("Bird is the word');
} -
It's Naya in hindi
-
@dozingncoding oh yes. Forgot about that.
-
@dozingncoding but this is a Android app.
So java, kotlin or js. -
@RemindMe 9.5m
-
@RemindMe 2m
-
@Floydian thanks bhai!
-
@ewpratten Thanks !
-
Ctrl + L
-
@heyheni not really, India is not on the list for payments. But I didn't write it for the money. It took me a while to piece things together so I wrote it.
-
@alexbrooklyn thanks!
-
Yep and users are loving it.