Some question about Tephra

54 views
Skip to first unread message

MohammadReza

unread,
Nov 15, 2014, 5:31:01 PM11/15/14
to tephr...@googlegroups.com
Hi

1-How is standard way to implement  " all of the client instances required " for TransactionContext ,could you tell me by an example?

2-Did you use any paper like "google percolator paper" ?(or did you released any paper?)

3-I saw your latest code update by updating hTableInterface ?Is it solved completely? 

4-We are in a production environment with a lot of requests,Is Tephra support a lot of transactions in a time? 

Best

Gary Helmling

unread,
Nov 17, 2014, 2:53:07 PM11/17/14
to MohammadReza, tephr...@googlegroups.com
1-How is standard way to implement  " all of the client instances required " for TransactionContext ,could you tell me by an example?


I'm not sure exactly what you mean by "all of the client instances required".  In order to use Tephra, you need a TransactionServiceClient instance, which itself uses a ZKClient.

If you are using Google Guice, you can make use of the Guice modules that we provide for dependency injection, which will help you get a fully configured TransactionServiceClient instance:

    Injector injector = Guice.createInjector(
      new ConfigModule(conf),
      new ZKModule(),
      new DiscoveryModules().getDistributedModules(),
      new TransactionModules().getDistributedModules(),
      new TransactionClientModule()
    );

    ZKClientService zkClient = injector.getInstance(ZKClientService.class);
    zkClient.startAndWait();

    TransactionServiceClient client = injector.getInstance(TransactionServiceClient.class);

You can do this during your application startup and reuse the same TransactionServiceClient instance across all application threads.

Then, within each application thread, you can use a TransactionContext instance, along with TransactionAwareHTable instances to interact with HBase:

Configuration conf = HBaseConfiguration.create();
HConnection conn = HConnectionManager.createConnection(conf);

TransactionAwareHTable txTable = new TransactionAwareHTable(conn.getTable("mytable"));
TransactionContext txContext = new TransactionContext(client, txTable);
try {
  txContext.start();
  txTable.put(...); // perform normal operations
  ...
  txContext.finish();
}  catch (TransactionFailureException tfe) {
  txContext.abort();
}


If you are not using Google Guice, then it should be relatively straightforward how to construct a ZKClientService and TransactionServiceClient from looking at the code / javadocs.

 
2-Did you use any paper like "google percolator paper" ?(or did you released any paper?)

We do not use the Percolator approach for transactions, which is a locking based approach.  Instead Tephra uses optimistic concurrency control and performs conflict detection on the transaction manager.  We do not yet have a paper about Tephra, but we do have a recent blog post about some of the design decisions and motivation that might be of interest:


For more details about how exactly Tephra transactions work, you can refer to the presentation:

 

3-I saw your latest code update by updating hTableInterface ?Is it solved completely? 

The fix for TEPHRA-44 addresses the issue with using TransactionAwareHTable with HConnection.getTable().  Yes, it fixes it completely.
 

4-We are in a production environment with a lot of requests,Is Tephra support a lot of transactions in a time? 

We have not done extensive performance testing, but Tephra should be able to support tens of thousands of transactions per second.  How this scales will depend on the number of concurrent clients and the size of each transaction.  You can scale up the overall system throughput by batching more operations per transaction.  As with anything else, the best way to get an idea of expected performance will be to benchmark your own workload instead of using synthetic benchmarks.  If you run into problems along the way, we're here to help.


Gary 

moy...@gmail.com

unread,
Oct 23, 2015, 1:45:28 AM10/23/15
to Tephra User, mofa...@gmail.com, ga...@cask.co
I am also interested with similar questions.

1. How to formally prove that Tephra's transactions are really serializability (or linearizability) guaranteed.
2. Do you have any test/benchmark results like TCP-C or others to show that Tephra can correctly execute the txn?
3. Do you have some results for the throughput or scalability?

moy...@gmail.com

unread,
Oct 23, 2015, 1:56:04 AM10/23/15
to Tephra User
Hi, 
I think you may also be interested with Trafodion that is anther transactional SQL engine.

It will be very helpful to all the users of HBase to see some comparison between the two.
Reply all
Reply to author
Forward
0 new messages