• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Question about Design

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am wondering which design would be better than the second for a business appliation managing user sessions (active/inactive etc):

1- Leave incoming threads to interact with sessions/database
2- Have internal threads managing incoming threads and serve their requests? How would I do that?
3- Any other idea is welcome.

Thanks!
 
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
3a. Use a framework that handles sessions and threading for you. Learn how to use it. Then worry about your business issues, and less on threading and sessions.
 
Amer Seifeddine
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to build my own framework along with the business application.
 
Ranch Hand
Posts: 265
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Amer Seifeddine:
I am trying to build my own framework along with the business application.



The great thing about open source projects is that the source is available to actually look at. Pick a couple of existing frameworks you like, and look at their source code to see how they handle it. What do you feel you need to do differently?

You can learn a lot by reading source code. One of my favorite tech bloggers, Scott Hanselman, does a weekly source code post where he talks about what he learns from reading the source of different types of applications. Great stuff for developing your own skills.
 
Rancher
Posts: 4804
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Amer Seifeddine:
I am trying to build my own framework along with the business application.



As a mental game, thats cool. But life is too short to re-write code that someone else has designed, written, tested, and documented.
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic