Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Phoenix #4

Open
jtaylor-sfdc opened this issue Nov 6, 2013 · 12 comments
Open

Support for Phoenix #4

jtaylor-sfdc opened this issue Nov 6, 2013 · 12 comments

Comments

@jtaylor-sfdc
Copy link

Great job on the transaction support! It would be interesting to have a version of Haeinsa that works with Phoenix.

@satoshi75nakamoto
Copy link

👍

@satoshi75nakamoto
Copy link

I'd love to see Salesforce Phoenix support Haeinsa.

@rrmckinley
Copy link
Contributor

👍

@jmlvanre
Copy link

jmlvanre commented Nov 8, 2013

This support would be very useful.

@eincs
Copy link
Contributor

eincs commented Nov 12, 2013

Hi everyone! Sorry for late reply. Thanks for good suggestion.
I would be very excited and pleased, if Haeinsa helps Phoenix to support transaction.
I'm now studying Phoenix for few days and I'll deeply see how Phoenix implemented and finding good way to Phoenix and Haeinsa works together. If anyone who have the good suggestion about this issues (like implementation ideas), Please let me know.
Thanks!

@satoshi75nakamoto
Copy link

Thanks @eincs.

@jtaylor-sfdc
Copy link
Author

Thanks, @eincs. I'm happy to answer any questions you have about Phoenix.

@satoshi75nakamoto
Copy link

@eincs What do you think of Phoenix so far?

@eincs
Copy link
Contributor

eincs commented Nov 14, 2013

@preillyme I'll study Phoenix this weekend.
Do you have any opinion, such as how to integrate Pheonix and Haeinsa?

@eincs
Copy link
Contributor

eincs commented Nov 18, 2013

@jtaylor-sfdc @preillyme Here is my thought on this issue.

Transaction algorithm of Haeinsa relies on checkAndPut and checkAndDelete of HBase client. Those operations are carefully managed by several classes in Haeinsa, such as HaeinsaTable. Note that Haeinsa do not uses any coprocessor and never modifies Region Server.

In my opinion, to use Haeinsa in Pheonix for transaction, Phoenix and Haeinsa should both modified. Since Haeinsa relies on client-side algorithm, Pheonix should use Haeinsa client internally. This means codes of Pheonix should be modified quite a lot. And also there is some functions which Haeinsa doesn't support (which are supported on Hbase client) These should be fixed in Haeinsa-side.

For example, I see Pheonix use batch(Rows) operation on MutationState class. And Pheonix creates Scan operation in ScanUtils. Following can be problem in Haeinsa:

  • Haeinsa don't support batch(Rows)
  • Haeinsa operations, such as HaeinsaPut, HaeinsaDelete, do not have setAttribute method: since pheonix uses attribute for coprocessors, this is neccessary.
  • Haeinsa don't support filter in HaeinsaScan.

I'm totally agree with setAttribite should be implemented on Haeinsa. And I also think it is reasonable that implementing filter in HaeinsaScan operation. But I don't sure about implementing batch(Rows) because Haeinsa executes all operation in the transaction batch in commit phase. We can discuss about other problems.

And note that Haeinsa is designed to have good performance in small number of row in single transaction. Haeinsa works best on scheme which is similar to facebook messaging system, which all the data for user are stored in single row. You can see blog post1 from facebook engineering team. This means performance of Haeinsa can be not so good according to schema of the table.

P.S.
I studied Pheonix last weekend, but there can be some misunderstand, so please let me know if there is error.

@eincs
Copy link
Contributor

eincs commented Nov 21, 2013

I added related issues. See #10 and #11.

@satoshi75nakamoto
Copy link

@eincs thanks for adding those other issues that will aid in Phoenix support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants