Challenge Overview
Challenge Overview
We are using node-orm2 module in a nodejs application to access Postgresql database. Recently we started using transaction and we found that there is a bug in handling transaction in this module when using it in both single connection mode and connection pooling mode.
We wrote two script to reproduce these bugs, they are provided in challenge forums, to summarize these bugs :
- Here is a brief explanation about the connection pool issue https://github.com/dresende/node-orm-transaction/issues/2
- In Single connection mode the same transaction is reused in all incoming requests, the reason is that the node-orm2 transaction plugin coded in that way.
In this challenge we need a fix for these two issues, with following notes taken into consideration :
- We are heavily depend on node-orm2 related methods and hooks, we have a large application and the cost of switching to another ORM2 module is high, so we consider it as a last option in case we could not fix the underlying issue in node-orm2 module, but I am sure we can, we are topcoders :)
- It is acceptable to move the transaction logic in node-orm2 module or write new plugin. We are Ok with getting rid of the node-orm2 transaction plugin.
- It is acceptable if the suggested solution requires adding an additional call to pass transaction or connection between calls.
- We are using plugins, hooks and association features provided by the node-orm2 module, the solution should address the case where sub-queries execution in these features need to be part of the transaction execution.
- We are not always using transactions, so your solution should not break non-transaction mode.
- There are few discussion about the transaction problem you might find useful, none of these discussions provided a solution :
- https://github.com/dresende/node-orm-transaction/issues/2
- https://github.com/dresende/node-orm2/issues/284
- https://github.com/brianc/node-postgres/issues/472
- We are going to work in a forked version of node-orm2 module, the ultimate goal is to merge our changes back to that public repo.
- It is highly prefered to provide a PoC of your proposed solution.
- The scope of the challenge will only cover PostgreSQL db/driver.
Documentation Provided
Scripts to reproduce the bugs are provided in challenge forums.
Support
Winning Architect will support all upcoming challenges to implement the proposed solution until we get it integrated in our web application.
Final Submission Guidelines
Submission Deliverables
Using the provided documentation, competitors will complete the architecture deliverables (https://apps.topcoder.com/wiki/display/tc/Module+Architecture+Tutorial+-+Deliverables).
- Sequence Diagrams
- Interface Diagrams with detailed implementation notes
- Assembly Specifications
Submission Guidelines
For each member, the final submission should be uploaded via the challenge detail page on topcoder.com.