473,320 Members | 1,839 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,320 software developers and data experts.

Implementation strategy: Registering and unregistering entities

Hello Everyone!
I have to ask about how do I approach this problem. The scenario is explained below.

We are a QA organization and need to deploy many versions of an application. There are some helper scripts which gather information about the app (version, components, host name, etc) and hit a PHP get URL. This PHP code saves the information inside an XML file.

While apps regularly get recorded into this XML, there is no mechanism to un-register (the app is deployed on Unixes too, so there is no uninstall code as such, it is simply required to delete the app folders). I would estimate that an app deployed is deleted after around 1 month.

I am unable to decide when do I check for older entries in the XML.
- Should I record the date when the entry is made in the XML file and on each execution of the PHP to record a new app, parse the XML to find existing dates and remove those recorded prior to 1 month ?
- Another line of thought was to try and connect to the app via http (within the PHP code) if it was over a 1 month old. If the app was available, retain else delete. But doing so for each execution (when another record request comes to the PHP) would be time consuming. Is there something like starting a new thread ? (I am a newbie to PHP)
- My XML is stored on a Unix system (Solaris 10 to be precise). I was also thinking about a daily 1 time cron task.

Can someone please suggest what approach do I follow ? And if new threads / processes could be spawned from PHP ?

Thanks in advance,
Parag Doke
Jan 19 '10 #1
2 1486
dlite922
1,584 Expert 1GB
You have PHP launch of another application on the server that does this. see the manual of system() and exec() calls.

Based on the information you gave me, I don't have enough to decide. Don't know any performance metrics other than "time consuming".




Dan
Jan 19 '10 #2
Hello dlite922.
Apologies for being unable to convey clearly in the 1st attempt. Here is an excerpt of the XML file where the information will be saved in:
Expand|Select|Wrap|Line Numbers
  1. <App id="InstanceName@host1"> 
  2.     <Release>R1</Release> 
  3.     <Build>B1</Build> 
  4.     <Component>C1</Component> 
  5.     <Arch>x86</Arch> 
  6.     <OS>2003</OS> 
  7.     <DB>SQLServer</DB> 
  8.     <Host>host1</Host> 
  9.     <Contact>myemail@company.com</Contact> 
  10.     <URL>http://host1:port/webapp</URL> 
  11. </App>
  12.  
There are many such entries (right under the root node) in the file (around 100). When a new entry is to be registered, if I decide to parse the date registered tag (to be introduced if this method is chosen), it might take time to finish the registering. But maybe I am wrong here and it might not have a noticeable effect on the performance as PHP could be fast enough (as I said, I am a newbie to PHP).

Thank you for the suggestion about system and exec. I will try them and see if those help.

Regards,
Parag Doke
Jan 19 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Les Caudle | last post by:
After removing the .NET Framework (so that I can install the 1.1 Framework), I get the following error msg in the event log: The description for Event ID ( 1071 ) in Source ( ASP.NET 1.0.3705.288...
4
by: Claudio Jolowicz | last post by:
I am trying to find a solution to the following design problem (code at the bottom): We are implementing a trader agent that can trade with other traders on an electronical trading platform. To...
6
by: Saso Zagoranski | last post by:
Hi! How can I unregister all the events registered to a control? I have seen a piece of code in another thread, which gets all the registered handlers for a specific event. Let's say I have a...
1
by: | last post by:
Hi all I am using RegAsm.exe to register .NET assemblies like this: regasm D:\...\...\MyDLL.dll /tlb:d:\mybin\MyDLL.tlb for unregistering: regasm D:\...\...\MyDLL.dll /tlb:d:\mybin\MyDLL.tlb...
7
by: anon | last post by:
Hi, How do i register a DLL(like OWC) on the server...will just running regsvr32 work....any syntax issues...?? Thanks. *** Sent via Developersdex http://www.developersdex.com *** Don't...
2
by: Todd | last post by:
Hi Guys, Ive hit a problem that I just can't find a solution to... Ive created an application that downloads images from a digital camera. The application is written in C# and uses the WIA...
9
by: Harold Crump | last post by:
Greetings, I have a fairly vanilla PHP web application that stores and retrieves data in a MySQL database. Users will be adding a lot of special characters such as single and double quotes,...
2
by: Frantic | last post by:
I'm working on a list of japaneese entities that contain the entity, the unicode hexadecimal code and the xml/sgml entity used for that entity. A unicode document is read into the program, then the...
1
by: sylver | last post by:
Hi, Unregistering event listeners (or memory allocation) is a good practice in programming, but do we need to use removeEventListener() for all addEventListener() implementation? Please...
7
by: tempest | last post by:
Hi all. This is a rather long posting but I have some questions concerning the usage of character entities in XML documents and PCI security compliance. The company I work for is using a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.