Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Couple the Sequence to make coarser calls

 
suekar meredilko
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I hope I am not violating any rules of the forum. Can I 'couple' a sequence of actions into one and still meet the requirements of the assignment ? In my design I have the following

e.g. each of the below methods which are granular in nature

1. ListofFlights
2. PriceForSelectedFlightAndAlternatives
3. SeatsAvailableOnSelectedFlight
4. payForIternarySelectedFlights (Requires a logged-in user)

instead, I can also provide just 2 methods in my facade which are coarse in nature

getFlightDetails() that provide me all the information together e.g. (list of flights available, prices of these and the seats available for each)

then a seperate method for paying i.e. payForIternary(selectedFlight).

This way I can get coarse functionality in my session Facade and fewer roundtrips ?

what do you think ? Am I violating the assignment's requirement ?
[ August 20, 2006: Message edited by: suekar meredilko ]
 
Bobby Sh
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi suekar ,

I am thinking of the second option :

getFlightDetails() that provide me all the information together e.g. (list of flights available, prices of these and the seats available for each)

Th reason is " user will not be changing any criteria during the following process:

1. ListofFlights
2. PriceForSelectedFlightAndAlternatives
3. SeatsAvailableOnSelectedFlight


Rather he would be narrowing down the Search result(like choosing flight, selecting seat ).

Consider the scinario, where a user selected a flight and is about to select a seat. Now he decided to go back to the earlier flight seach result to choose other flight.In this case , he would be having the all the result in the form of coarse grained bean.

In the first option. I feel that you may have to go back to the server to get the result (correct me if my understanding is wrong)

Bob
 
veena madhukar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am planning to go ahead with the first option. As the data retrieved with the first option could be huge and hence could result in network traffic.

Also...the user might be interested in looking at the seats of those flights which might interest him..not all the flights. So as and when he chooses the flight i plan to get the seat details for the specific ones --- this could mean that i am hitting the server more number of times.
 
Cleuton Sampaio
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

All communication between the client side and the facades is coarse grained (flights with price and availability etc).

Network bandwidth is not a problem because all the communication is inside the FBN network.

Cleuton (Brazil).
 
veena madhukar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All communication will not be in the FBN network. Customers who would like to make the reservation will do so from the internet. It is only the travel agents who would use the client application.
 
suekar meredilko
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm, come to think of it now...

FBN being a national airline and not a travel website (like orbitz) the number of airline choices between 2 places would not be large..infact it would be v. few. You can go ahead with a coarse grained approach for searching. The likely search result would not be much.
To be safe, you can put it as an assumption. These things are usually clarified as part of requirement gathering, since we dont know much on this we can put it as an assumption and go ahead.

For search feature esp. for those who are not logged in, this seems to be the best approach. For logged in users, you can pickup the data from here and go ahead to prepare thier iternary.


suekar
[ August 24, 2006: Message edited by: suekar meredilko ]
 
Bobby Sh
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi suekar ,

Please correct me if I am wrong. The method getFlightDetails() is going to return all the detail.

for the web user, the sequence of steps would be:

1. ListofFlights
2. PriceForSelectedFlightAndAlternatives
3. SeatsAvailableOnSelectedFlight


Now how are you planning to store the state of search. Are you going to keep in web tier? or you are planning to have a stateful session facade bean

Bobby
 
Cleuton Sampaio
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember that Web Customers are in the Client Tier. All the calls from the Presentation (or Web) Tier will be inside FBN�s network, so, it nakes sense turn them into coarse grained calls.

Cleuton (Brazil)
 
veena madhukar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remember that Web Customers are in the Client Tier. All the calls from the Presentation (or Web) Tier will be inside FBN�s network, so, it nakes sense turn them into coarse grained calls.

_____________________________________________________________________

Please confirm to me if my understanding of what you are saying is right.

Let us say a customer is accessing from the internet. Then the entire search information could be retrieved by means of a coarse grained call as the web tier is also in the FBN network and the network will not get blocked bez of large amounts of data.

Further depending on what user would like to see ...we can present that much of information to the client in the client tier from the web tier.

Please confirm to me if my understanding of what you are saying is right.
 
Cleuton Sampaio
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming that the Web Tier is in the same network and it is a high capacity network, Gigabit ethernet or fiber, for example, that�s correct.

I have faced similar problem many times and the best solution was coarse grained messages. This approach minimize the requests on the Business Logic components, helping to better distribute the processing load.

I have assumed that, due to the flight search parameters, the flight list will not be very large (in fact, I have built an application just like that one).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic