non blocking client

44 views
Skip to first unread message

Christoph Sturm

unread,
Mar 9, 2017, 5:47:23 AM3/9/17
to project-voldemort
Hello Voldemort Developers!

I am trying to read from a voldemort server from a non blocking http handler (my web app uses undertow), and I'm wondering if there is a StoreClient that is non blocking. I noticed that there are Stores that are non blocking (i.e. SocketStore), but i did not find a non blocking StoreClient. Now I wonder if the best solution is to use SocketStore directly.Will that work?  Does SocketStore handle clustering correctly or is there one SocketStore for each server in the cluster? What would you recommend?

thanks
 chris

Arunachalam

unread,
Mar 9, 2017, 1:17:13 PM3/9/17
to project-...@googlegroups.com
Voldemort does not expose non blocking client at the application code. Though the client to server communication is all non blocking.

The problem is in Voldemort protocol, when you get a non blocking response, you need to initiate some actions like retries or other behavior. This requires a thread to do the job.

The easiest for you to is make your own thread pool to do the voldemort operation.

Thanks,
Arun.

--
You received this message because you are subscribed to the Google Groups "project-voldemort" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-voldemort+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/project-voldemort.
For more options, visit https://groups.google.com/d/optout.

Christoph Sturm

unread,
Mar 10, 2017, 6:31:45 AM3/10/17
to project-voldemort
thanks arun!

maybe our use case is not so typical for voldemort. Our store is read only and we just want to read from it without any retries. So i guess i could take a PipelinedRoutingStore, but instead of using it directly just get the list of its nonBlockingStores and then directly talk to the correct SocketStore for my key via the non blocking api. Is the determination of the correct store inside PipelinedRoutingStore, or is it a separate class?

thanks again
 chris


Am Donnerstag, 9. März 2017 19:17:13 UTC+1 schrieb Arun Thirupathi:
Voldemort does not expose non blocking client at the application code. Though the client to server communication is all non blocking.

The problem is in Voldemort protocol, when you get a non blocking response, you need to initiate some actions like retries or other behavior. This requires a thread to do the job.

The easiest for you to is make your own thread pool to do the voldemort operation.

Thanks,
Arun.
On Thu, Mar 9, 2017 at 2:47 AM, Christoph Sturm <m...@christophsturm.com> wrote:
Hello Voldemort Developers!

I am trying to read from a voldemort server from a non blocking http handler (my web app uses undertow), and I'm wondering if there is a StoreClient that is non blocking. I noticed that there are Stores that are non blocking (i.e. SocketStore), but i did not find a non blocking StoreClient. Now I wonder if the best solution is to use SocketStore directly.Will that work?  Does SocketStore handle clustering correctly or is there one SocketStore for each server in the cluster? What would you recommend?

thanks
 chris

--
You received this message because you are subscribed to the Google Groups "project-voldemort" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-voldem...@googlegroups.com.

Arunachalam

unread,
Mar 10, 2017, 10:30:25 AM3/10/17
to project-...@googlegroups.com
Retries can happen, even if there is no write. Server not responding within the timeout, server rebooting or client GC pauses or multitude of other reasons. 

Any modification you are going to do is certainly possible, but you have to understand and maintain the code. You are looking at the right places.

Thanks,
Arun.



To unsubscribe from this group and stop receiving emails from it, send an email to project-voldemort+unsubscribe@googlegroups.com.

Christoph Sturm

unread,
Mar 10, 2017, 12:54:39 PM3/10/17
to project-voldemort
ok thanks. we don't want to retry because then our handler will already have timed out anyway. 
Reply all
Reply to author
Forward
0 new messages