java - Apache Thrift: Server with sync and async methods, it is possible? -
I am trying to implement a Twitter like service with the customer using Java. I am using Apache Savings for RPC calls. I service uses a key-value store. I am trying to make service defective with stability and data-replication in key-value stores. For example: To assume at one time, there are 10 servers running with ID S1, S2, S3 etc and a client call (key, value) on S1 Now S1 saves this value and puts RPC for data-replication on all remaining servers (key, value). I want to start a thread with the async calls to save the server method and return customer success and on the remaining 9 servers so that the customer is not blocked during the replication.
The auto-generated code is escaped as an encrypted and I currently have a server in the driver class I
My target is to expose a backend server in the client and the client and server and Make normal (blocked) calls between the server async calls.
I understand the data replication model is raw, but I am trying to learn distributed systems.
Can someone please help me with how I can achieve it, with an example.
Also, if you think my design is faulty and there are better ways in which I can get data-replication using Apache Rift.
Thank you.
A
Onway method is asynchronous, any other method is changed toOneway is not marked with is synchronous.Exception Omigosh {1: string msg} Service Twelfth Night Yahoo Watts {// A onway method is a "one shot" method server // it can execute asynchronous, to implement the server In use with / / messenger system on the basis when it is used / can be very useful / again / does not return anything / except which includes zero without exception IAsync (1: i32 foo, 2 : String bar, 3: double falcon) // any method of onway Student has not marked synchronous. Even if the call / / does not return anything, then it still throws zero Imasinkronus (1: I 32FU, 2: string bar) for the customer, (1: Omyogoosh Omji) IOSM Imaswell (1: double bass) throws (1: Om Mageosh OMG) Zero METU ()}Performs
Onway unlimited form of connection to server connection Or not, it depends on the implementation that your server uses. A thread or Threadpool server seems a good option.Customer has sent its own
Onway request, it will not wait for the response from the server and will continue in its execution flow. Technically,Onway is generated for a recv_Xxxx () function, only send_Xxx () part.If you need data sent back to the customer, then the best option is to set up a server in the client process, which I like in case of your special use in cases where it is possible (HTTP) seems that typical workings are voting or long-lasting calls, though both techniques come with some losses.
Comments
Post a Comment