473,769 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best practice? Managing concurrent access to Business Objects on the middle-tier

My architecture is, (ala Fowler PoEAA)

Presentation Layer
|
Service Layer
|
Problem Domain
(My Business Objects are held in memory)
|
Persistence Layer
|
Physical Storage

It is the aim that business objects be accessed by many threads at once.
There will be many more reads than writes. I will need to lock the object(s)
when they are being written but not when they are being read. I will also
need to provide some kind of transactional support.

One of my ideas was to derive all business objects from ContextBoundObj ect
and use the [Synchronized] attribute.

My question is this. Would this completely serialize access or is there some
way, still using ContextBoundObj ect, to effect something like the
ReaderWriterLoc k?

Also, on a different track, does anyone see problems with maintaining large
numbers of business objects in memory assuming RAM can be added if
necessary.

Robert Zurer
Jul 19 '05 #1
1 1779
JD
If you can take a look at the book "Transactio nal COM+" by
Tim Ewald. He has some good advice in building scalable
architectures, it mostly is about COM+ but applies to
what you are trying to do.

Basically it goes against what you are trying to do. He is
not the only one I have read that goes against this
architecture either, in both the Java and MS world. You
have the ability for ReaderWriterLoc k at the DB level
using transactions and could even push it out to the COM+
level use its transactional capabilities, so there is no
reason for a developer to come along and duplicate it at
the object level with the use of threads.

- J
-----Original Message-----
My architecture is, (ala Fowler PoEAA)

Presentation Layer
|
Service Layer
|
Problem Domain
(My Business Objects are held in memory)
|
Persistence Layer
|
Physical Storage

It is the aim that business objects be accessed by many threads at once.There will be many more reads than writes. I will need to lock the object(s)when they are being written but not when they are being read. I will alsoneed to provide some kind of transactional support.

One of my ideas was to derive all business objects from ContextBoundObj ectand use the [Synchronized] attribute.

My question is this. Would this completely serialize access or is there someway, still using ContextBoundObj ect, to effect something like theReaderWriterLo ck?

Also, on a different track, does anyone see problems with maintaining largenumbers of business objects in memory assuming RAM can be added ifnecessary.

Robert Zurer
.

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
9269
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
3
2660
by: Marc Gravell | last post by:
Kind of an open question on best-practice for smart-client design. I'd really appreciate anyones views (preferably with reasoning, but I'll take what I get...). Or if anybody has any useful links on the subject? (and yes, I have already googled it at length, but still no strong decision) ============= After a long stint of pure-desktop / pure-server applications, I'm currently working on a number of smart-client projects in C# using...
9
7301
by: david | last post by:
I have a class with some business-logic and with every roundtrip, I need an instance of this class, so I have to create it, every time again. That doesn't seem very efficient. I thought it would be 'better' to store an instance of this class in a session-variable, so it's available all the time and needs to be instanced only once. Is this, generally speaking, a good idea, storing objects in session-variables ? Do you guys ever use this...
7
3584
by: Steve | last post by:
I am building an object library for tables in a database. What is the best practice for creating objects like this? For example, say I have the following tables in my database: User: - Id - FirstName - LastName - CompanyId (many-to-one )
5
2885
by: Frank Millman | last post by:
Hi all This is not strictly a Python question, but as I am writing in Python, and as I know there are some XML gurus on this list, I hope it is appropriate here. XML-schemas are used to define the structure of an xml document, and to validate that a particular document conforms to the schema. They can also be used to transform the document, by filling in missing attributes with default values.
0
9586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10043
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3956
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.