You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Christopher Blythe <cj...@gmail.com> on 2006/10/24 17:05:10 UTC
Re: Proposing an "SSB to JDBC" mode for Daytrader
I know it has been a while since this thread has been visited; however, I
finally got a chance to add a "Session Direct" mode to the DayTrader runtime
modes. Fortunately, it did not require that many changes to the source.
Here is a brief summary of the changes I made...
- Added an inSession flag to TradeDirect class. If this flag is true, we
skip the transaction management logic
- Added similar logic to the KeySequenceDirect class
- Created a new session bean (TradeJDBC) which implements the TradeServices
interface. Each service method within this session bean creates a new
instance of TradeDirect with inSession set to true
- Added two additional primitives: PingServlet2Session2JDBC and
PingServlet2Session2JDBCCollection
I tested the changes out under load without any exceptions. Just for
reference, I performed the tests on a 1 x 3.2 GHz Intel Xeon system
(connecting to a DB2 database) and noted the following results.
Direct Mode: 645 req/sec
Session Direct Mode: 119 req/sec
I have attached a patch file based off of a 10/24/2006 snapshot of
daytrader/trunk. If you have any comments, let me know. There are probably
some things in there that could be cleaned up (ie. comments, class names,
etc.), but I think this does provide a good starting point.
Thanks...
Chris
On 7/24/06, Matt Hogstrom <ma...@hogstrom.org> wrote:
>
> I think this makes a lot of sense Chris. I assume your adding a third
> runtime mode as opposed to
> removing the ejb mode?
>
> I'd like to start thinking about how to rearchitect DT ro be more
> relevant. I'd like to include a
> Spring mode as well as update the EJBs to EJB 3.0.
>
> Any other thoughts out there?
>
> Christopher Blythe wrote:
> > The EJB and Direct modes in Daytrader provide a good measure of how a
> pure
> > EJB (Session/CMP Entity) application stacks up against a pure JDBC based
> > app. However, one of the things I have felt Trade/Daytrader has always
> > lacked is a middle ground. In my experience, I have neither seen nor
> heard
> > of a large number of customers out there in the market using the full
> EJB
> > programming model (Session and Entity beans). I think a more common
> > customer
> > usage scenario is the stateless session bean to JDBC model where the
> direct
> > JDBC calls are wrapped/managed by the SSB.
> >
> > I have already taken a quick stab at an implementation since all it
> really
> > requires is a merging of the TradeDirect and TradeBean code. I have most
> of
> > the operations working on a single client, but haven't performed any
> load
> > testing yet.
> >
> > Anyway, I wanted to submit the idea to group and see if there were any
> > comments.
> >
>
--
"I say never be complete, I say stop being perfect, I say let... lets
evolve, let the chips fall where they may." - Tyler Durden
Re: Proposing an "SSB to JDBC" mode for Daytrader
Posted by Christopher Blythe <cj...@gmail.com>.
Thanks Matt... I will go ahead and open the JIRA...
On 10/24/06, Matt Hogstrom <ma...@hogstrom.org> wrote:
>
> Chris,
> I'll take a look at the patch you provided. The best way to submit
> patches is to open a JIRA and attach the patch there. When attaching the
> patch it will ask you to grant the patch to the ASF. this provides a good
> trail for copyright info as well as visibility for people tracking the
> project.
>
> On Oct 24, 2006, at 11:05 AM, Christopher Blythe wrote:
>
> I know it has been a while since this thread has been visited; however, I
> finally got a chance to add a "Session Direct" mode to the DayTrader runtime
> modes. Fortunately, it did not require that many changes to the source.
>
> Here is a brief summary of the changes I made...
> - Added an inSession flag to TradeDirect class. If this flag is true, we
> skip the transaction management logic
> - Added similar logic to the KeySequenceDirect class
> - Created a new session bean (TradeJDBC) which implements the
> TradeServices interface. Each service method within this session bean
> creates a new instance of TradeDirect with inSession set to true
> - Added two additional primitives: PingServlet2Session2JDBC and
> PingServlet2Session2JDBCCollection
>
> I tested the changes out under load without any exceptions. Just for
> reference, I performed the tests on a 1 x 3.2 GHz Intel Xeon system
> (connecting to a DB2 database) and noted the following results.
>
> Direct Mode: 645 req/sec
> Session Direct Mode: 119 req/sec
>
> I have attached a patch file based off of a 10/24/2006 snapshot of
> daytrader/trunk. If you have any comments, let me know. There are probably
> some things in there that could be cleaned up (ie. comments, class names,
> etc.), but I think this does provide a good starting point.
>
> Thanks...
>
> Chris
>
> On 7/24/06, Matt Hogstrom <ma...@hogstrom.org> wrote:
> >
> > I think this makes a lot of sense Chris. I assume your adding a third
> > runtime mode as opposed to
> > removing the ejb mode?
> >
> > I'd like to start thinking about how to rearchitect DT ro be more
> > relevant. I'd like to include a
> > Spring mode as well as update the EJBs to EJB 3.0.
> >
> > Any other thoughts out there?
> >
> > Christopher Blythe wrote:
> > > The EJB and Direct modes in Daytrader provide a good measure of how a
> > pure
> > > EJB (Session/CMP Entity) application stacks up against a pure JDBC
> > based
> > > app. However, one of the things I have felt Trade/Daytrader has always
> > > lacked is a middle ground. In my experience, I have neither seen nor
> > heard
> > > of a large number of customers out there in the market using the full
> > EJB
> > > programming model (Session and Entity beans). I think a more common
> > > customer
> > > usage scenario is the stateless session bean to JDBC model where the
> > direct
> > > JDBC calls are wrapped/managed by the SSB.
> > >
> > > I have already taken a quick stab at an implementation since all it
> > really
> > > requires is a merging of the TradeDirect and TradeBean code. I have
> > most of
> > > the operations working on a single client, but haven't performed any
> > load
> > > testing yet.
> > >
> > > Anyway, I wanted to submit the idea to group and see if there were any
> > > comments.
> > >
> >
>
>
>
> --
> "I say never be complete, I say stop being perfect, I say let... lets
> evolve, let the chips fall where they may." - Tyler Durden
> <session_jdbc.patch>
>
>
> Matt Hogstrom
> matt@hogstrom.org
>
>
>
>
--
"I say never be complete, I say stop being perfect, I say let... lets
evolve, let the chips fall where they may." - Tyler Durden
Re: Proposing an "SSB to JDBC" mode for Daytrader
Posted by Matt Hogstrom <ma...@hogstrom.org>.
Chris,
I'll take a look at the patch you provided. The best way to submit
patches is to open a JIRA and attach the patch there. When attaching
the patch it will ask you to grant the patch to the ASF. this
provides a good trail for copyright info as well as visibility for
people tracking the project.
On Oct 24, 2006, at 11:05 AM, Christopher Blythe wrote:
> I know it has been a while since this thread has been visited;
> however, I finally got a chance to add a "Session Direct" mode to
> the DayTrader runtime modes. Fortunately, it did not require that
> many changes to the source.
>
> Here is a brief summary of the changes I made...
> - Added an inSession flag to TradeDirect class. If this flag is
> true, we skip the transaction management logic
> - Added similar logic to the KeySequenceDirect class
> - Created a new session bean (TradeJDBC) which implements the
> TradeServices interface. Each service method within this session
> bean creates a new instance of TradeDirect with inSession set to true
> - Added two additional primitives: PingServlet2Session2JDBC and
> PingServlet2Session2JDBCCollection
>
> I tested the changes out under load without any exceptions. Just
> for reference, I performed the tests on a 1 x 3.2 GHz Intel Xeon
> system (connecting to a DB2 database) and noted the following results.
>
> Direct Mode: 645 req/sec
> Session Direct Mode: 119 req/sec
>
> I have attached a patch file based off of a 10/24/2006 snapshot of
> daytrader/trunk. If you have any comments, let me know. There are
> probably some things in there that could be cleaned up (ie.
> comments, class names, etc.), but I think this does provide a good
> starting point.
>
> Thanks...
>
> Chris
>
> On 7/24/06, Matt Hogstrom <ma...@hogstrom.org> wrote:
> I think this makes a lot of sense Chris. I assume your adding a
> third runtime mode as opposed to
> removing the ejb mode?
>
> I'd like to start thinking about how to rearchitect DT ro be more
> relevant. I'd like to include a
> Spring mode as well as update the EJBs to EJB 3.0.
>
> Any other thoughts out there?
>
> Christopher Blythe wrote:
> > The EJB and Direct modes in Daytrader provide a good measure of
> how a pure
> > EJB (Session/CMP Entity) application stacks up against a pure
> JDBC based
> > app. However, one of the things I have felt Trade/Daytrader has
> always
> > lacked is a middle ground. In my experience, I have neither seen
> nor heard
> > of a large number of customers out there in the market using the
> full EJB
> > programming model (Session and Entity beans). I think a more common
> > customer
> > usage scenario is the stateless session bean to JDBC model where
> the direct
> > JDBC calls are wrapped/managed by the SSB.
> >
> > I have already taken a quick stab at an implementation since all
> it really
> > requires is a merging of the TradeDirect and TradeBean code. I
> have most of
> > the operations working on a single client, but haven't performed
> any load
> > testing yet.
> >
> > Anyway, I wanted to submit the idea to group and see if there
> were any
> > comments.
> >
>
>
>
> --
> "I say never be complete, I say stop being perfect, I say let...
> lets evolve, let the chips fall where they may." - Tyler Durden
> <session_jdbc.patch>
Matt Hogstrom
matt@hogstrom.org