473,408 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

xml as a data hub between 2 application.

I have two applications, and they use the same xml doc as a data
exchange channel.

I mean each application holds a reference of this xml doc. each
can change the xml doc, in the mean time the other can get
node-changed events.

how should I implement this senario?


THANKS!

Nov 15 '05 #1
8 1314
There are some issues with what you want to do.

1) Xml is loaded entirely into memory when the DOM is created and then the
connection (generally) is lost from the physical file.
2) Two applications live in different processes and therefore cannot share
a references to the same object. On application cannot subscribe to events
for an object created in a different application.

I am not familiar with remoting, but you might need to use that to
facilitate the communication. Or you might try implementing a COM+ object
that runs as an application, then more then one application might be able to
get a reference to that object which would then wrap operations on the XML
file.
"Chau Johnthan"
<a_*********************************************** *@hotmail.com> wrote in
message news:#C**************@TK2MSFTNGP12.phx.gbl...
I have two applications, and they use the same xml doc as a data
exchange channel.

I mean each application holds a reference of this xml doc. each
can change the xml doc, in the mean time the other can get
node-changed events.

how should I implement this senario?


THANKS!

Nov 15 '05 #2
Hi, Peter:

Really appeciate your reply.

in fact, fortunately, my case shoule be one application, aside a
comopnent dll. I want to know if the msxml support attributes
changing-event, or is it possible to subscribe those eventset in xml
doc object.

Thanks!

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:#v**************@TK2MSFTNGP11.phx.gbl...
There are some issues with what you want to do.

1) Xml is loaded entirely into memory when the DOM is created and then the connection (generally) is lost from the physical file.
2) Two applications live in different processes and therefore cannot share a references to the same object. On application cannot subscribe to events for an object created in a different application.

I am not familiar with remoting, but you might need to use that to
facilitate the communication. Or you might try implementing a COM+ object
that runs as an application, then more then one application might be able to get a reference to that object which would then wrap operations on the XML
file.
"Chau Johnthan"
<a_*********************************************** *@hotmail.com> wrote in
message news:#C**************@TK2MSFTNGP12.phx.gbl...
I have two applications, and they use the same xml doc as a data
exchange channel.

I mean each application holds a reference of this xml doc. each
can change the xml doc, in the mean time the other can get
node-changed events.

how should I implement this senario?


THANKS!


Nov 15 '05 #3
Are you looking to use msxml or the XmlDocument class?

From the documentation for XmlDocument, it looks like there are events that
are fired when the DOM changes. You could subscribe to these, but what you
will need to make sure that you subscribe to the events on the same object
that you are modifying.

"Chau Johnthan"
<a_*********************************************** *@hotmail.com> wrote in
message news:eP**************@TK2MSFTNGP12.phx.gbl...
Hi, Peter:

Really appeciate your reply.

in fact, fortunately, my case shoule be one application, aside a
comopnent dll. I want to know if the msxml support attributes
changing-event, or is it possible to subscribe those eventset in xml
doc object.

Thanks!

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:#v**************@TK2MSFTNGP11.phx.gbl...
There are some issues with what you want to do.

1) Xml is loaded entirely into memory when the DOM is created and then the
connection (generally) is lost from the physical file.
2) Two applications live in different processes and therefore cannot

share
a references to the same object. On application cannot subscribe to

events
for an object created in a different application.

I am not familiar with remoting, but you might need to use that to
facilitate the communication. Or you might try implementing a COM+ object that runs as an application, then more then one application might be able to
get a reference to that object which would then wrap operations on the

XML file.
"Chau Johnthan"
<a_*********************************************** *@hotmail.com> wrote in message news:#C**************@TK2MSFTNGP12.phx.gbl...
I have two applications, and they use the same xml doc as a data
exchange channel.

I mean each application holds a reference of this xml doc. each
can change the xml doc, in the mean time the other can get
node-changed events.

how should I implement this senario?


THANKS!



Nov 15 '05 #4
>I have two applications, and they use the same xml doc as a data
exchange channel.


Why on earth choose an XML data doc as the common ground? If you have
multiple apps working on the same data, a RDBMS seems like a better
choice to me.....

XML is great as a cross-boundry data exchange format - it's *NOT*
replacement for a REAL database.

Just my $0.02

Marc
================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
Nov 15 '05 #5
I attempted unsuccessfully to use xml as an interprocess communication tool.
What with the problems of file locking and file corruption, it was a
headache. When I rewrote the xml accessing functions to use a DB, all these
problems dissapeared, as pretty much any DB you use will have these issues
sorted internally.

Mine was one of those projects that grows *way* beyond the initial scope.
For a couple of processes talking to each other every few minutes, XML
was... passible. For a few multi-threaded apps on different machines
talking amongst themselves, XML was overwhelmed. But when I moved to using
a DB, it was (surprisingly) faster, and *much* more stable. As a persistant
medium, DB's are the way forward.
"Chau Johnthan"
<a_*********************************************** *@hotmail.com> wrote in
message news:%2****************@TK2MSFTNGP12.phx.gbl...
I have two applications, and they use the same xml doc as a data
exchange channel.

I mean each application holds a reference of this xml doc. each
can change the xml doc, in the mean time the other can get
node-changed events.

how should I implement this senario?


THANKS!

Nov 15 '05 #6
Hi, Marc:
Why on earth choose an XML data doc as the common ground? If you have
multiple apps working on the same data, a RDBMS seems like a better
choice to me.....

XML is great as a cross-boundry data exchange format - it's *NOT*
replacement for a REAL database.

Just my $0.02


seems I should use sqlserver to store those application settings variables.


Nov 15 '05 #7
> I attempted unsuccessfully to use xml as an interprocess communication
tool.
What with the problems of file locking and file corruption, it was a
headache. When I rewrote the xml accessing functions to use a DB, all these problems dissapeared, as pretty much any DB you use will have these issues
sorted internally.

Mine was one of those projects that grows *way* beyond the initial scope.
For a couple of processes talking to each other every few minutes, XML
was... passible. For a few multi-threaded apps on different machines
talking amongst themselves, XML was overwhelmed. But when I moved to using a DB, it was (surprisingly) faster, and *much* more stable. As a persistant medium, DB's are the way forward.


I have just 7 (maybe 8) global variables to store, which db will be your
suggestion?


Nov 15 '05 #8
1) Use the registry, I think that is thread/process safe or can be.
2) Create Memory Mapped File (MMF) to store this struct for access across
processes and sync access to it with a named mutex.
3) Use remoting and host the data on one in memory. Public Remoting Get/Put
method on it for the "client" app.

--
William Stacey, MVP

"Chau Johnthan"
<a_*********************************************** *@hotmail.com> wrote in
message news:#W**************@TK2MSFTNGP12.phx.gbl...
I attempted unsuccessfully to use xml as an interprocess communication

tool.
What with the problems of file locking and file corruption, it was a
headache. When I rewrote the xml accessing functions to use a DB, all

these
problems dissapeared, as pretty much any DB you use will have these issues sorted internally.

Mine was one of those projects that grows *way* beyond the initial scope. For a couple of processes talking to each other every few minutes, XML
was... passible. For a few multi-threaded apps on different machines
talking amongst themselves, XML was overwhelmed. But when I moved to

using
a DB, it was (surprisingly) faster, and *much* more stable. As a

persistant
medium, DB's are the way forward.


I have just 7 (maybe 8) global variables to store, which db will be your
suggestion?

Nov 15 '05 #9

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

Similar topics

9
by: J. Baute | last post by:
I'm caching data in the Application object to speed up certain pages on a website The main reason is that the retrieval of this data takes quite a while (a few seconds) and fetching the same data...
3
by: Sander Janssen | last post by:
Hello, I have this peculiar problem concerning MS SQL Server. My company works with an mailing application (ASP) which uses SQL Server as it's repository. What I want to do is send data...
3
by: Sandros | last post by:
Background: I'm collecting usability statistics for a group of applications. Each count has the following attributes: date, application, major heading, minor heading, count. My intent is to pull...
0
by: Stylus Studio | last post by:
DataDirect XQuery(TM) is the First Embeddable Component for XQuery That is Modeled after the XQuery API for Java(TM) (XQJ) BEDFORD, Mass.--Sept. 20, 2005--DataDirect Technologies...
3
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing...
8
by: Du | last post by:
I'm trying to automate the upload process to yousendit.com, but the file size doesn't add up and yousendit.com keep rejecting my upload (it accepts the upload until the very end) I don't know...
2
by: headware | last post by:
I'm relatively new to ASP.NET and ADO.NET, but I have a basic design question regarding the use of web services and APS.NET applications. Right now we have an application that uses web services to...
5
by: rogsonl | last post by:
My computer was moved last week, and the company changed the network groups we work on. As a result, one of the main benefits from Whidbey (database connectivity) no longer works. Situation: 1....
17
by: Timothy.Rybak | last post by:
Hello all, This is my first attempt at an application, so kid gloves are appreciated. I need to make a very simple form that only has a few elements. One is TraceCode - a text field that is...
4
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.