Hello -
My script use a DB file which is written by XML, and the user load
this DB file (XML tree in memory), and then do some updating about
this tree, such as delete element, generate new element or move
element.
The thing is, my script is a cmd based program (based on module
"cmd"), and there are many users would use this script at same time,
in a shell style prompt (module "cmd"), so I want to implement a
updating after a user update the XML tree, it such as a "signal
console", so that all the user can keep same DB, or other user can
see update a few seconds later.
What I did is, create a new file calling "db_change", and put a number
"1" in file, and then update the real "DB" file (by change uid to lock
file), other user to check this file and then re-load XML file, but I
do not think it is a good idea, the performance is not good.
I would like to know if you could help on this matter, I hope I can
get inspiration/example from you guys.
Thanks, 3 1221
Evan wrote:
Hello -
My script use a DB file which is written by XML, and the user load
this DB file (XML tree in memory), and then do some updating about
this tree, such as delete element, generate new element or move
element.
The thing is, my script is a cmd based program (based on module
"cmd"), and there are many users would use this script at same time,
in a shell style prompt (module "cmd"), so I want to implement a
updating after a user update the XML tree, it such as a "signal
console", so that all the user can keep same DB, or other user can
see update a few seconds later.
What I did is, create a new file calling "db_change", and put a number
"1" in file, and then update the real "DB" file (by change uid to lock
file), other user to check this file and then re-load XML file, but I
do not think it is a good idea, the performance is not good.
I would like to know if you could help on this matter, I hope I can
get inspiration/example from you guys.
Start using a proper database. And get rid of the XML. If you need it for
output/exchange purposes, generate it from the DB.
Diez
If I get rid of the XML, I have to change my script more and more, it
is not easy to do that. :( :(
Thanks,
Evan wrote:
If I get rid of the XML, I have to change my script more and more, it
is not easy to do that. :( :(
Thanks,
It is even harder to write a multi-user XML database (which is what you are
wanting). Put the data in a multi-user database and convert to XML as needed.
-Larry This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: writeson |
last post by:
Hi all,
I've got a PHP program that I've added flock() to in order to protect
multiple scripts trying to write to the same file. After I added the
flock() to the code the performance of the code...
|
by: nathan |
last post by:
I've got a page with DB data displayed, and a link beside each record
to update the corresponding record. When the update icon is clicked, a
popup with the data comes up, once the user is finished...
|
by: Menon |
last post by:
Hi folks
First time posting -if this is not the correct forum, please let me
know.
For updating a LOB in Oracle (using JDBC), you need to lock the row. Is
it true in DB2? How Are LOBs...
|
by: Peter Lin |
last post by:
Dear all;
I need to monitor a xml file so that I can update my data in
hashtable, but the problem is it will trigger more than one event for
a lastwrite action(I trigger this action by add...
|
by: Jervin Justin |
last post by:
Hi,
I've been having this problem for some time with Web Forms:
I have a web app that sends data to a service when the user presses a
button. Based on the data, the server will send several...
|
by: muttu2244 |
last post by:
hi all
am updating the same file in ftp, through multiple clients, but am
scared that two clients may open the same file at a time, and try
updating, then the data updated by one data will be...
|
by: sam.s.kong |
last post by:
Hi!
I've been programming ASP for 5 years and am now learning PHP.
In ASP, you can use GetRows function which returns 2 by 2 array of
Recordset.
Actually, it's a recommended way in ASP when you...
|
by: dchadha |
last post by:
Hi,
I am working on application in C# which uses and stores data in xml
file. This app can use xml file from two different ways: (a) From User
Interface (Windows application) and (b) From...
|
by: archana |
last post by:
Hi all,
I am having application wherein i am using asynchronous programming and
using callback i am updating one label control.
My question is can i use lock statment to lock control. If yes...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: jack2019x |
last post by:
hello, Is there code or static lib for hook swapchain present?
I wanna hook dxgi swapchain present for dx11 and dx9.
|
by: DizelArs |
last post by:
Hi all)
Faced with a problem, element.click() event doesn't work in Safari browser.
Tried various tricks like emulating touch event through a function:
let clickEvent = new Event('click', {...
| | |