Waseem's profileWaseemPhotosBlogLists Tools Help

Blog


    December 03

    MSN Live Networking.

    Live is trying to renew itself from all the money making social networking sites. Though MS has a Facebook (100 million users) ad and access deal they still went ahead with a serious plan to persuade all the 280 million hotmail users to use MS own social networking. It’s a brilliant idea, a fresh start and very intimidating. Seriously, a lot is missing like all those little apps that we use on facebook, myspace and orkut. Well today I spent some time to check and redo the blog look. I have been blogging for 3 and half years on spaces, here are the things that I found.

    Google Chrome does not support most of Live features and FireFox on vista is aslo pretty bad. Try it on IE 6, 7 XP, Vista or Firefox XP SP2.

    ·         No ads at the top of the page. This I like, no doubt the best thing so far.

    ·         Themes and Settings and Modules, They are all the same and nothing has changed. MS should have added some new stuff just to get the users excited about the new look and networking capacity.

    ·         Adding Friends from facebook took me 14 min 23 sec. That’s a lot of time for just 54 invitations and it failed to send invitations to 21 users. (I am sure everyone in my friends list on facebook will get an invitation but basically it was a test.)

    ·         Nothing innovative in the contact list. It’s still the same and boring.

    ·         May be because there are lots of people trying out hotmail or may be its some technical problem. I constantly got a reply “website cannot be found”.

    ·         Skydrive offer seems to be very interesting but it needs to accommodate a lot of file types otherwise it’s just any other storage device.

    ·         There is a way to add wordpress uses to Spaces. But I am not a wordpress users.

    ·         Partnership with popular networking sites lack. There needs to be close integration with myspace, twitters, orkut, ebloggers etc.

    ·         Fun is still missing with no games. Where is scabullous, chess, poker etc.

    ·         An IPHONE MSN app, like facebook. MSN is missing out on world wide iphone users where facebook has done some cool job of its app which is as powerful as its website.

    ·         A lot of improvement hs been done to the profile pics. Though most of the features and layout resembles facebook, MS has tried to its best to be original.

    All and all I would Say nice work but a lot of improvement is needed but it has to come fast so that they can take advantage of the excitement. 2 out of 5

    October 08

    Chrome

    Who said Google Chrome doesn't crash.
     
     hung1
    February 21

    I am "Waseem"

    I define it technically then why do I have to be technically handsome and 'Waseema' is also a name which I think means beautiful.
    September 01

    Missed Connections

    Its been long enough. Its work that kept me busy and during the evenings I really got lazy to do anything but to watch movies and to be over the phone.
    I was on the craigs list website, salem, looking for some shared apartments. I found a link called ‘Missed Connections’. A place where you can go and post about people who you see somewhere and want to get your messsage across. An example is  ”I see you almost every day. You are a flagger on turner rd. where I-5 passes over (on the side closest to the airport). You're smile melts me. I would really like to meet you, so if you read this or if anyone out there knows who I am talking about please email me.” A way to tell people that I felt a connetion and we missed it. If you find this message then call me or get in touch with me. people call it 'throwing a with a message in the ocean of web", go to a beach and lock a meesage in a bottle and throw it in the water and hope that one day the message reaches the person. Time for my missed connection, "The girl at Mc Donalds, You are cute, attractive and very nice to me. you also gave me a free side of fries. I hope you read this and leave me a surprise comment." and thats the way the cookie crumbles.
    Nothing wrong in it, Its just a way of letting it out.
    August 06

    Identity Theft

    As a contributor to technology I can understand the growing concern of loosing Privacy. There will be a time that nothing can be hidden. If you have watched the series from discovery about the world in 2057 that is 50 years from now. An exact yet I think a very conservative projection of technology has been presented. Clothes with transmitters, houses centrally connected, cars controlled my city traffic and every move by the humans will be recorded. As I was watching the program I heard a lot of wow!! wow!! but I was getting very concerned about security, privacy and most importantly democracy. We are so bound and controlled by one number (SSN) and even a little information over SSN will help you mock any person in real. A recent Identity theft ripped $6000 off in 3 hours at home.

    August 02

    Laptop

    It was inevitable, after being with me for more than 2 years the end had to come. We shared good times, I had good conversations, bad conversations, watched movies together, met new people, had new experiences  and some time got naughty as well. It started slowing down and I did everything possible to get it back to its health and today it gave up on me as every other person. My Laptop died. May its soul rest in peace. I will miss the laud noise you used to make,  how hot you used to get,  how you saved me when I had some pretty tough lonely times. I have only one thing to hold against you, Why didn't you give me enough time to back up our good memories? Why? Why? I had so many pictures of some beautiful women that I shared with you in confidence, some important work related files and   User name and Passwords for all my site. I hope to steal some memory from you when I start the postmortem. ComputerFor our good times. Ameen!!

    I ordered for a new companion and it will be arriving a day after tomorrow. All I can say about her is that she is a super cool awesome laptop. Thin, Sexy, Athletic and fully loaded in every possible way. Can't wait to have my hands on you JAANWink.

    December 06

    S/W consultancy offers

    19 different consultants in less than 3 days have called me to ask if I am looking for a job. Most of the consultant’s offers are more or less the same benefits. Here is a preview

    - Competitive Salary Options (Salary/Hourly/%) with raises every (6) Months

    - Employer contributes 50%-80% of Medical, Vision & Dental

    - Excellent 401(K) plan with employer Contribution

    - Platinum Level travel package

    - Paid Holidays (8 Day per Year)

    - Paid Sick Days (5 Day per Year)

    - Paid Vacation (2 weeks per Year)

    - Free Room & Boarding

    - Paid Bench time (3 Weeks per Assignment @ 70% of wage)*

    - Free Training & Mentoring

    - Business Cards

    - Sponsored H1B & Green card

    Benefits

    consultant

    Other Companies

    Salary Revision

    Every 6 Months

    DOE *

    Medical Contribution

    80% (S)

    50%

    401(K)

    Yes with Contribution

    Not Applicable

    Paid Holidays (PTO)

    Yes (8 Days)

    No PTO

    Vacation (2 Weeks)

    In 6 Months

    In 12 Months

    Bench

    3 Weeks every Project *

    2 weeks a Year

    Green Card

    100% by consultant

    60% or Employee

    Now compared to the benefits a permanent job in a company with H1B visa sponsorship will have almost the same or little less or little more than what a consultant offers but the problem that I see is relocation. If it’s a permanent job you might not have to relocate to a new city after every project but with consultants that the case always not to forget the interviews that you have to give before every project. But it is very tempting to opt for the consultant with the benefits and the growth that you would enjoy working for different clients on different projects over a period of time. The offers that I got were very tempting from all of them but I would pass it for the time being and look for something bigger. Till then I will be positive.

    December 13

    ASP.Net

    We have Visual Studio 2005 and I have downlaoded it from the college website and it is up and Running. As I have aleardy worked with Visual Studio Web developer 2005 beta before it final release I found it vey easy to work with. They came up with GUI to avoid programming givnig users most of the options(If you want to know how they do it --- a basic idae refer to my project Code Generator on this blog).
    There is defenitly a huge difference between the VS2003 and VS2005 later having IIS which is built there is no more of setting up a virtual directory and calling a localhost:8080/page.asp. Just run the project...you are there. It is a bit slow, when ever you run your page it takes a 4-5 sec to load up. It is defenitly worth the wait though. Templates are very good looking. You no more have to a role based database coz they have already given a application which takes 5 minutes to set with email management. Data Access - New controls in ASP.NET 2.0 enable developers to build sophisticated, data-driven Web pages with little or no code.
    There is a formidable difference with C# programming. they have come up with few more templates to avoid code. the list just goes on....
    I would say it is worth waiting for Visual Studio 2005.
    To learn ASP.NET and get a hang of it fast and easy then the answer is .NET programming by Jeff Prosise. It is a beautiful book that clearly exlains concepts of ASP.Net with C# programming. If you want to see the video from MSDN website just click on this link http://www.microsoft.com/seminar/shared/asp/view.asp?
    I have a couple of more features of VS2005 to look at like the WebServices....I dont know what changes they have made to VS2003.
     
     
     
    December 11

    Free BSD Page Replacement using FIFO algorithm

    FreeBsd 4.1 Page Replacement Algorithm using FIFO
     
     
    This course to me is like huh! a BSD compiler that sucks and confusion of design concepts in different versions of BSD, since we follow freeBSD 4.4 in class and we do projects on 4.1BSD. yes, there is a formidable difference...double check with the issues below with a trust worthy source.
     
    1. In what situations is the original FreeBSD page replacement algorithm better or worse than the FIFO algorithm?
      
    The Predictive page replacement algorithm of the original BSD uses the locality of references means it keeps a track of the page which has been often used and perdicts that it will be used in future and it never takes that out of the queue. This makes the FreeBSD replacement algorithm more effective since it reduces the number of faults. As in FIFO there is no such strategy to retain often used pages, it takes the first page out of the queue since it doesnt use the locality of the references. Also The original free BSD algorithm has ACTIVE queue and INACTIVE queue.  If the page is not available in the Active queue it will check the INACTIVE queue and if found then will take page from there, this saves the unwanted pagein-pageout overhead if the page couldn’t find in the Active queue. Thus maintaining the two queues unlike FIFO (Uses only one queue ) helps the original free BSD to reduce the pagein – pageout processing and increases the probability to found the pages on the two queues.This reduces the number of page fault. It doesnt make sence to implement INACTIVE queue in FIFO since the pages in the top of the queue are removed with no relevence of locality or history.

    2. In what situations is the original FreeBSD caching policy is better or worse than the algorithm you designed for Part 3?

    In the original freeBSD principle of "Locality of Reference" is made strong since it uses caching techniques both ways. When a page fault occurs we check the queue in both forward and backword direction so that it can take as much as pages it can. Our algorithm just pages out the algorithm which os faulted this way we do not use the locality of reference priciple.  When ever a fault occurs we do all the page handling which is not the case in FreeBSD it has more chances of finding the page since it finds the queue in both ways and takes in lots of pages. If we try to implement both ways search for FIFO it will no more be called a FIFO since it has to remove the page which was first used.

    Let us consider a Server processing request from many clients in this situation FreeBSD algorithm will underperform since there might be a little possibility of same request from 2 different clients. In case of FIFO as soon as a request ends it can be thrown out and a pge for new requested will be loaded. LRU might waste resourses and might also give a lot of page faults in this situation.

    3. In what situations is the combination of the original FreeBSD page replacement algorithms? and current preloading policy better or worse than your FIFO page replacement and new pre fetching policy?

    The original FreeBSD is considered to be fast compared to FIFO but if we consider 2 combined where one gets the pages from memory fast and the other is slow but rather powerful in handling page faults. In this situation a FIFO whcih can get pages from memory stores it in a queue and when ever a page faults occur instead of LRU going to the memory gets the pages from the FIFO queue. Consider a server with 2 different kinds of request a general and a group. A group request can be stored in a FIFO and General requests can be taken care by freeBSD.

    In other cases in general the most commanly used Whenever we run the sample programs in FIFO and new prefetching policy we get the more pagefaults than the original Free BSD page replacement algorithm and current prefetching policy. It is thus because the basic fundamental principle “locality of reference”, to reduce the number of page faults is ignored in the FIFO page replacement algorithm. It also doesn’t cache the pages that are behind the faulted page,and by doing so decrease the probability to find the pages in the cache. As there are less pages in the cache so there are less chances to find the pages in the cache as comparable to original FREE BSD page replacement algorithm during any page fault.

    4.Can you use the original four lists in the FreeBSD?

    we can’t use the original four lists of the Free BSD, As we are implementing FIFO which doesnt make sence in implementing in all the queues since the pages will page in and page out with out rlative reason and doesn’t bother about the locality of reference and reference bits,this makes it very simple and only needs us to use ACTIVE and FREE queue for the page fault handling. While we also need not interfere with the Wired queue and it's working as in original FREE BSD.Thus we are not using INACTIVE queue, we are no longer need to migrate pages from ACTIVE queue to the INACTIVE queue and then from INACTIVE queue to the FREE queue.Here we are checking the ACTIVE queue for potential pages that can be paged out to the FREE queue. We are just checking the busy and protection bits of the page and during the pageout remove the page which is at the head of the queue, without knowing that How many times it is used.We simply goto the free queue on page request.

    5.How can you monitor/log the page faults of a process and collect data?

    In the Source code File vm_fault.c we associate a counter with each occurrence of page fault. So whenever a page fault occurs the counter will be increased and we can print that value and be can monitored on the screen.. Now we easily log/Print the number of pagefaults using that counter value. And then log the number of page faults after the page faults handling

    6.How will you test your implementation?

    we run  C programs such as Linked list and Matrix multiplication which refer the larger portion of memory at different places. These programs helps us to understand the page faults occurred during randomly referenced portion of memory. We run these programs using both on the LRU and FIFO along with preloading algorithm and see the differences between the number of pagefaults occurred.
     Note ::
    The test Program should use all the RAM available in a system to generate a proper count of page faults. other wise the number of faults dont make sence.


     

    Repository Test Collaboration System

    Repository Test Collaboration System
     
    If you are thinking - -  " What the heck is this?" then I can assure you that once you open this document's link you will say HMM. This is an extention to the previous OCD that I posted here i.e. the Remote TestBed.
    To put it in simple words it is a Testbed System with Repository. Yes Repository. It isn't that easy as how it sounds. There are so many modules and It is loaded with so many features that my professor went ahead with a team of 18 developers to implement this in a course named Software Studio and it was successfully implemented after a 6 months of team work and hard work. Professor Jim Fawcet was really happy with the team. note I didn't take Software Studio course it was worth mentioning their effort.   But ofcourse I did this OCD as my course project (Software Modelling and Analysis) Go Ahead -->
     

    Graph Abstract Data Type .Net Environment

    People might think that I am having a great time going out, visiting places and having fun in life then you might want to reconsider your thoughts after looking into this. Buying a car is easier than doing this project, imagine doing both. I submitted this project and gave away the car. Both of gave me problems so I decided to dispose();

     

    http://www.filelodge.com/files/hdd2/18664/Graph%20Abstract%20data%20type.zip

     

    Purpose:

    This project requires you to build a graph class, using adjacency lists[1].  In Project #3 you will provide functions to evaluate a graph’s transitive closure, strong components, and order a directed acyclic graph’s nodes with a topological sort.  You will find the references below[2] to be very helpful for Project #3.  Please note that your submission should demonstrate all of the functional requirements with explicit tests and output.

     

    There are two purposes motivating this project.  The first is to give you practice using STL containers and iterators.  The second is to show how a sequence of modules can cooperate to provide some major functionality.  The results of this project combine, in a very natural way, with the dependency analyzer you built in Project #1, to evaluate dependency structure of a large complex system.  Project #1 provides the basic direct dependency information, while this project can be used to investigate indirect dependencies and mutual dependencies as well.  You are not asked to make that combination in this project.

     

    Requirements:

    Your Graph program:             

    1.       shall use standard C++[3] and the standard library, compile and link from the command line, using  VC++ 7.1, as provided in the ECS clusters and operate in the environment provided there[4].        

    2.       shall use services of the C++ iostream library for all input and output to and from the user’s console[5] and C++ operator new and delete for all dynamic memory management.             

    3.       shall implement a graph class, based on adjacency lists.  The adjacency list representation shall use at least two STL containers, and access their elements using iterators.  The graph class shall implement vertex and edge insertions and deletions.      

    4.       The graph class shall use template arguments that specify types to be associated with vertices and with edges.  This would support, but not be limited to, associating string names with each vertex and edge.  You are encouraged to provide any traits and policies you think may be useful for user’s of your graph class.     

    5.       The graph module shall provide a function that displays the adjacency list representation of any specified subset of a graph’s vertices, using some suitable formatting process.         

    6.       The graph module shall provide a function to carry out depth first traversal.  The depth first traversal function shall accept a reference to an abstract operation class.  Applications will derive from this to carry out operations on each node visited.  This operation hook will be useful for demonstrating that you meet the other requirements by displaying visited nodes.             

    7.       The graph class shall provide an iterator for the graph class that supports Depth First Search (DFS).               You may use this iterator as part of the implementation of the requirement above, if you wish.  

    8.       The graph module shall provide a function to build one or more named graphs from an XML file.  A sample of the file syntax is provided below.  The function should return a collection of references (pointers or iterators) to each of the graph objects built.  You will use the references to conduct tests to demonstrate that requirements #3 - #7, above, are satisfied. 


    The XML file format should use the following syntax (you should test graph<string,string> and graph<string,double>):

     

              <? xml version=1.0 ?>

             <graphs name=”Project #2” author=“Joe Code“>

               <graph name=”g1” application=“test1“ vt=”string” et=”string”>

                 <v num=”1” vtv=“v1“><e num=”1” etv=”e1”>4</e><e num=“2“ etv=“e2“>7</e></v>

                 <v num=“2“ vtv=“v2“><e num=“3“ etv=“e3“>5</e><e num=“4“ etv=“e4“>7</e></v>

                 <v num=“3“ vtv=“v3“><e num=“5“ etv=“e5“>1</e></v>

                 <v num=“4“ vtv=“v4“></v>

                 <v num=“5“ vtv=“v5“><e num=“6“ etv=“e6“>6</e><e num=“7“ etv=“e7“>7</e></v>

                 <v num=“6“ vtv=“v6“><e num=“8“ etv=“e8“>2</e></v>

                 <v num=“7“ vtv=“v7“><e num=“9“ etv=“e9“>3</e></v>

               </graph>

               <graph name=“g2“ application=”test2” vt=”string” et=”double”> ....</graph>

             </graphs>



    [1] An adjacency list is a list of child vertices of a specified graph vertex: DFS and TopoSorts

    [3] This means, for example that you may not use the .Net managed extensions to C++.

    [4] VC++ ver 7.1 is Visual Studio .Net and is available in all the ECS clusters.

    [5] You may use a form window for the user interface if you wish.

    File Dependency Analysis C++ .Net environment

    This was my first project in syracuse University. I sucked at this but later when the grades came I realized that I am not bad.......My first hand on such a project.

    http://www.filelodge.com/files/hdd2/18664/Filedep.zip

     

    Purpose:

    When a team develops a large software system, management of file dependencies is critically important, due to the need for almost constant change.  Changes occur due to latent errors, performance problems, changes of requirements, and changes in design.  Files are the unit of change management and are the entities we deal with during unit test.  When we test a file it is important that the tested file depend only on already tested files.  Dependency defects, like mutual dependency and dense dependency relationships make change and test very difficult.

     

    This project requires you to build a program that accepts a path and a set of file patterns on the command line, searches the directory tree rooted at that path, and analyzes each source code file found for its type-based dependencies on other files.  That is, the FILEDEP program finds each type declared and defined in the file collection of all analyzed files, then discovers all the Files that use the name of that type.  When analysis is complete, FILEDEP must show each file in the analyzed set, in alphabetic order, and after the name of each file show all the files on which it depends:

     

    You should support fully qualified file names[1].  That is, show the path and file, like this:

     

                C:\homework\filedep.cpp

                            C:\homework\fileInfo.h

    C:\homework\fileInfo.cpp

     

    There are several interesting issues to think about.  Should you scan files and do analysis iteratively or recursively[2]?  In a single pass or in multiple passes?  Should you show types in the standard libraries and system libraries?  Note that you can’t follow the relationship chain into those libraries, as you don’t have their source code readily available.

     

    Requirements:

    Your DEPENDS program:

    1.       shall use standard C++[3] and the standard library, compile and link from the command line, using  VC++ 7.0, as provided in the ECS clusters and operate in the environment provided there[4].          
               

    2.       shall use services of the C++ iostream library for all input and output to and from the user’s console and C++ operator new and delete for all dynamic memory management, if you use any.       

    3.       shall accept, from the command line, a path name to begin searching for files, and a set of one or more file name patterns[5].           

    4.       shall display the ordered set of all source code files found in the tree rooted at the given directory path.           

    5.       shall display, on the lines below each file in 4., the set of files on which it depends. 

     

    Note that #include relationships are not strong enough to establish a dependency.  It occasionally happens during the evolution of a module that it may cease to depend on some other file due to changes made in its source, while the #include is inadvertently left intact.


    [1] Your FILEDEP program should provide a command line option to display only file names with no path qualification.

    [2] If you load files based on #include statements then you will almost certainly want to use recursive scanning.  However, walking the directory tree to build a file set, then analyzing interatively, is another viable option.  Can you think of trade-offs with these approaches?

    [3] This means, for example that you may not use the .Net managed extensions to C++.

    [4] VC++ ver 7.0 is Visual Studio .Net and is available in all the ECS clusters.

    [5] You may find it easiest to specify only cpp files on the command line and then analyze any local headers they include.

    Remote Programming Assistant (RPA) ---- ASP.NET

                                 These are few requirements that I had to implement for my Internet Programming Final project. I had a tough time not because it was this was too much of work or because i had to implement  this with ASP.NET but because I used the BETA version of Visual Studio Web Developer 2005. My fellow team mate was using Visual Studio 2003. We had 3 restless nights just to integrate our works on Visual Studio 2003 though both of us completed our job way a head of the deadline. Did we succeed?? guess || and try it out.
    These were the requirements my professors posed to us:  The link to the code below has 2 part one project1a by me and project1b by SHREYAS my team mate.
    http://www.filelodge.com/files/hdd2/18664/IP.zip

    Purpose:
    You are a consultant, often traveling to customer sites to discuss projects you are working on for them.  You need to be able to download Visual Studio Projects from your remote web server, demonstrate program operation , make customer suggested changes at their site, and upload the modified project to your server.  You also need to track bugs, record notes for future modifications, schedule future meetings through a web calendar, and write draft project specifications, all at customer sites and uploaded to your server.  You want to do all of this through an attractive web site that will impress your customers.
    Requirements:
    The requirements for this web site are to provide: 
    1. Login access that forces a link to any page to verify that you are a valid user, by checking the current session to see if  you are currently logged in, otherwise redirecting you to a login page.  Please develop a user control for this that you will make part of every page.
    2. Multi-file download and upload facility that manages the transport of any Visual Studio project between the server and your local machine.  Please use a web service to support this requirement.  Note that you can start an application on your laptop from a web page served to your laptop.  The application, in this case, is a client of a web service provided by your server.
    3. A control on the file transfer web page that starts Visual Studio with the downloaded project.  To do this you will need to run msdev with appropriate command line arguments.  You will also have to configure your laptop so that it trusts your remote server .
    4. A bug-tracker page that uses a DataGrid control to display, edit, add, and delete bug notes.  Each bug is allotted one line of the Grid display, but when double clicked will popup a form with details.
    5. A notes facility that supports the display, editing, addition, and deletion of business notes.  You are encouraged to use code shared with the bug-tracker, but must support a different layout for both the Grid and popup displays .
    6. A meeting scheduler that uses the .Net calendar control, and supports two levels of scheduling: recording and editing scheduled events that only your login allows, and requested events that are recorded through login accounts you make available to your customers and secretary.  Scheduled events and requested events should appear differently on the calendar (color coding is acceptable).  You should be able to convert a requested event to a scheduled event, from your login, using only a mouse click or two.  Each event must support the addition of background text that is accessible from a popup text screen by double clicking on the event.  Anyone accessing the calendar can access this information, e.g, you, your customers, and your secretary.  Please support all the data handling and role models for the calendar using a SQL server relational database.
    7. A form used to record a draft project specification.  The form should provide the following:
    a. Title
    b. Customer name and address
    c. Topic
    d. Date
    e. Itemized list view with full editing capability.  Each item is one requirement.
    f. Free form text block at the end for notes.
    8. The site is to be constructed using Asp.Net applications.
    9. Use, and demonstrate that you use, ideas and contents of at least one of the papers, linked below.
     
    Because this project is fairly ambitious you may work with one other person, if you wish.
    November 11

    Fair Share Scheduling In 4.1 BSD

    Operating System 4.1 Free BSD
    Let me not Blah Blah ... about how OS works what does what etc.. Let me zero it down to the design and few important issues which makes the design clear.
    The link for the files in which the code was modified i.e kern_synch.c and kern_exec.c this link is a ZIP file inside it is a tar file. Unwrap the tar file to see those 2 files.
    Note: This is just about okay as for as FSP idea is concerned. Its is not completely implemented.
     
    Note: Fair share processes are given FAIR(key word) and a number(percentage the process is seaking) as arguments.
    Eg:-   ./a.out FAIR 30
     
    (no % symbol after 30.)
     
    I implemented this  by modifying the roundrobin by hardcoding the cpu percent usage using unused arrays in proc.h file.
    if a process id is not 0 and if the process is a user process then (p->p_usrpri = 127 ) we set the priority high so that it sits at the end of the queue. if not we assign a normal priority which keeps it ready to run. In kern_fork() we have hardcoded the priority value to a constants here in our case 40. The same is done in vfork and rfork to make sure that the child process get the same allocation(even though it takes the default values from parents.just in case).
    1. [How can you identify a process as a FSP process and how can you assign the share to the process?]
    All the processes that run in my User space are considered as FSP processes. If the user id of a process is equal to my user id of a system call, we consider that process as a  FSP process.
     We used the p_pad1[] array to actually store the value of the cpu percentage that has been allocated to a FSP process.
    2. [How will you ensure that 50% of the CPU cycles will be dedicated to guaranteed processes? It is not essential that exactly 50% of the time is dedicated to the guaranteed processes, but over a significant time, say a minute (that is 6,000 time slices), the percentage shouldn’t deviate by more than a percent or two for processes that have been ready to run throughout that time period.]
    We implemented an if statement in the roundrobin algorithm and then there is a comparision of the effective user id of the process to our groupid. if there is a match and the amount  of cpu percentage that has been allocated
    is actually more than what had been demanded then the process priority is set to minimum. so the process would give the cpu.
    3. [Over what window of time will you maintain the balance, and how will you account for process sleep times? The window should not be too large, else you will get into a situation where a process that may have slept for a long time will fall so far below its expected allocation of CPU that it would need 100% of the CPU for an extended period to make up the difference. You should pick a window of time and maintain CPU time histories for each process over that period.]
    A window could be maintained for 1 sec. A process which is still in execution and has a priority less then the sum of other executing processes it sleeps and there is a roundrobin between process of same priority. If a procesces sleeps more then a sec it gains priority and gets it share the next second.

    4. [How can you verify your solution within the current framework? You should write a few test programs. Some of the running processes in the system should be FSP processes and some should not. You must print necessary scheduling information either on the screen (which we prefer, for demo purposes) or in the kernel log.]
    we can test the process by running a few user programs with the userid as our userid and then making some other user login into the same computer so that the userid is different for this user. so we can actually have two
    kinds of processes running.
    November 10

    Links for OCD's and their Prototypes

    I thought of posting the actual documents <links> to the OCD's of Code Generator and Remote Testbed system.
     
        I implemented a prototype of the privious OCD the link for that is below. Note: This is just a prototype which gives a glimpse of most of the features discussed in the OCD of code generator.
       
      Code for CODE GENERATOR Guess what? I coudn't Generate code for this
     
       As I said the code will come here....so here it is.
    May be due to many modules inside, people might get confused with execution but you shouldn't have problem if you have read the OCD and the comments in the code. Anyways. run the executable in RTestBed folder this is client's GUI. Run the executable in SERVER folder. Yup!!it is server ... GUI is ok enough to take you through.
    I dont believe in beatification so the GUI might be not pleasing but you might want to look at how things have been implemented rather than how it looks. I am too lazy for that. I am always known to get my work done than perfection. As they say "Nobody is Perfect" not even the moon.
     
     
     
     
       
    October 25

    Test-Bed system cont..3

    We need to build a message passing system with queues on top of Remoting. The advantage of having a message passing system is all communication between the client (Test Master) and server (Slave) is in XML messages.

     

    <RequestMessage>

    <MessageType>TestRequest</MessageType>

    <ClientIP>IPAddress</ClientIP>

    <ClientPort>PortNo</ClientPort>

              <Tests>

                    <Test>filename1</Test>

                   <Test>filename2</Test>

    </Tests>

    </RequestMessage>

    A server or a client request for a remote test machine, including the test files to perform tests on. Now the client has decodes the xml file and understand the command with the key work ‘RequestMessage”.

    <ResponseMessage>

    <MessageType>Testresult</MessageType>

                <Testname=”Testname1”>Contents1</Testname>

                <Testname=”Testname2”>Contents2</Testname>

    </ResponseMessage>

    Client sends the requested component. Encodes the result of each test contents and sends it back to the Server(Peer) who requested for the component

    <Command>

    <Command>Getconfig</Command>

    <ClientIP>IPAddress</ClientIP>

    <ClientPort>PortNo</ClientPort>

    </Command>

    Client sends the command type message to get  a specific task. A lot of xml messages has to be built and both the server and client must have the decode and encode functions to communicate.

     The server contains a single remotable object that implements a function ‘getMessage’. This function simply receives messages from all clients and places them in a queue. The messages of course need to follow some fixed format to allow the server to interpret each message distinctly. The clients of this server in turn need to implement a single ‘postMessage’ function that accepts a message string and places it in a queue to be sent to the remote server. This method ensures that neither the client nor the server has to wait for request and response, making the communication asynchronous. The diagram shows how the asynchronous communication between 2 Rem-test peers will take place. This layer is built on top of the Remoting layer.

     

    The communication subsystem needs to use .Net threading also. The client that wishes to communicate with the server embeds the function call inside an XML message. This message is then placed in a message queue by the main process thread. These messages are pulled off the queue at the other end by the send thread and sent over the communication channel to the server. At the server end, there is a receive thread that keeps receiving messages from the client and placing them in a common queue. The main processing thread then removes the message from the other end of the queue, parses it, and makes the corresponding function call. The result of the call is embedded in an XML message and it goes through the same steps to get back to the client.

    For synchronous communication, we build another layer on top of this layer. The only difference would be the send thread would block on a response from the remote object, instead of going ahead with its processing. Once the receive thread receives a response, the send thread starts sending again. Thus the communication system discussed above allows the peers to communicate synchronously as well as asynchronously.

    Activity Diagrams:

     

                            Activity Diagram for Server i.e. Test Master

     

    In the above diagram the server runs a test, First it load and processes the configuration file. It can run test on itself or distributes the load to the clients. If it wants to run tests on the same machine, it simply loads DLL gets the test collection sorted and runs the tests. The result is displayed on GUI. If it wants to distribute the load then it connects and send commands to the client. The tests are run on the remote machine and the results are sent to the server or the dependent module.

     

                                        Clients Activity Diagram

    In client activity diagram we could see that it behaves in 3 different ways. When it acts as a test slave it gets the commands from the server loads required library to run the processes and sends the result back to the server retaining a copy for itself. A user at the client level has two options one to test his own module on the local machine which is called the Sand-alone mode. In this case the user has a already configured file which he uses and runs the tests. In the test master mode a user can test other modules other than his which are related to his module. He could configure the remote machine as the server has done. NOTE: the X in the above diagram means the test Master mode of the client. Its behavior is the same as the server.

     

    Critical Issues:

     A remote test-bed system is no exception when it comes to critical issues.

    Communication protocols:

    When there are two computers communicating, the set of protocols the two follow must be very clear. In some cases when a system send a command or a message to the other system. It may understand the command but could not process the information due to insufficient information. It is very important to have a good send received acknowledgement which is state bound. With remoting we can use protocols like TCP, HTTP which are well designed and fits to our project requirement. Since we run tests on remote machine and if there is a connection loss, the test machine should finish the test and send it to the server when the connection is reestablished. In a network these things happen very often. We should also be able to handle situations like system overload, slow testing, multiple threads etc. These problems are critical when these issues are not considered during design.

    Testing Problems:

    The above application gives the user to pause or cancel the test running. In such a situation the application should act intelligently by storing the test status, number of test that passed and log them properly into the logger. A half run test should not be discarded.

    In case of pause it should hold the current state till the process is resumed and all the dependent modules depending on the strength of the bonding should be paused or let run.

    Since the server keeps getting the status every run it knows when a problem occurs and has to display that to user explicitly.

    Errors:

    General errors may crash the program. Properly unhandled threads crash the program with out a hint. Better error handling be should be implemented. All vulnerable code should be enclosed in try, catch/throw blocks.  Finalize statements should also be used to properly close open files, threads or resources.  Great care should be taken to avoid data access conflicts between threads. Error logger on the screen should be precise about connection failure or data corruption.

    Performance:

    A test-bed system is really useful when it performs on a machine with out overloading it. Since this application runs many test on the system it should be capable of handling many threads, communicates with the clients and transfer and uploading of the logger contents. This is a lot of work and a good system with a good configuration might not work properly. Test bed distributes its work with the clients but still the performance of the system might slow down slowing down the testing invariably. The only way to solve this problem is to upgrade the system.

    DLL’s:

    When a testing is done on some machine, instead of compiling the whole test program sending the DLL to the system will help in saving resources but the remote system might now know how to use the DLL’s. In such a situation a message should be attached to file saying what is to be done with the file.

    Blocking queues:

    A blocking queue is usually used on the client side to hold messages in the event that communication with the remote receiver fails and to free the main thread of the client so it can do other tasks. Likewise on the server side, in addition to separating the main thread from the communication thread, one uses a blocking queue to quickly remove messages from the socket buffer so that the socket buffer never fills. This kind of set up is more suited for asynchronous messages. For synchronous messages or direct calls, one does not need to have queues because the client calling thread has to block until it gets a response from the server so there is no risk of accumulation of messages and in the case of a network failure the client calling thread has to wait anyway. Remtest uses both kinds of messages. Moreover all messages ends up being collected by MsgHandler object on the server side. Which then discern their type and either processes them if they are asynchronous or hand them over to adapter if they are synchronous. Because of that one can have no blocking queue on the server side as for synchronous calls the enqueuing of messages in not needed. Only AsynMsgHandler (client) would need to have a queue for that.

    Problems with threads:

    Each system is going to be running several REMTEST instances with each instance having two to four threads. When running multiple threads on a single system two important issues need to be taken into account. One is deadlocks, and the other is the use of virtual memory. Deadlocks are pretty difficult to resolve and the system must be kept simple to prevent them.

    Versioning:

    In case if the server is testing the code and a user changes the code on his machine. There will be two different versions running. One the system testing and other will be the new version, the reports generated may be of the older version. In this situation all the code running in client, server and other remote clients should be stopped and the server should be informed about the new version of the code. This won’t help a big deal if we need the older version for some reason, in that case  the server has to take a decision and should store the old version with all its information in log file and create a separate folder for each version and each machine for each module.

    Summary:

    In this document we have discussed the need of  Test-bed system, who will use it, outline of what is expected and some issues that has to be carefully thought about. With few prototypes of how a GUI looks it gives the designer, architect a clear picture of what the requirements are. The remtest-bed system is broken down in to simple modules for better understanding and the activity diagram shows the behavior of this system in different roles in different situations. A careful thought is need in case of communication protocol settings and configuration files.

     

     

     FoR DIAGRAMS REFER TO THE PHOTO ALBUM LIST

     

     

     

     

     

     

     

    REFERENCES

    • Remote synchronous test harness by Ravi Ranganathan

    Acknowledgements:

     

    1.      Dr. James Fawcett, Instructor, CSE 681

    Test-Bed System cont..2

    The information could include the IP address of the remote system where the module is located and the port number where the server of that remote module is listening. These can be stored in a file. This file is not going to change often but should be capable of being changed easily by the user.

    Use cases:

    1. The user would initially need to configure the information of all the modules that it depends on. All this information can be stored in some network configuration file which can be opened and edited by the user.
    2. The user can start a series of tests. The configuration of these tests is stored in configuration files which specify the location of the tests, the logging options and options for specifying the lower level modules that should be tested.
    3. A user can ‘pause’ the test that is initiated by that particular remtest. This implies that the tests that were initiated on a remote machine by the test-master should be capable of being paused.
    4. The user could resume the tests that were initiated by that particular remtest. This implies that the tests that were initiated on a remote machine by the test-master should be capable of being resumed.
    5. The user could ‘abort’ the tests that were initiated by that particular remtest. All the tests that were initiated by this test-master including all those tests in all the test slaves should be capable of being aborted.

    Test slave mode:

    In the test slave mode the client machine receives the command from the test master in the form of Xml messages which is to be decoded and executed. The command can be to load new DLL and run files or start, stop or pause commands. When the command to report the test results come in the clients keeps a copy of test for it self and send one to the requesting machine.

    Graphical user interface:

    GUI is an interface where the user interacts with the system. A server, as in the figure shows the test modules which can be selected using a checked box list. A task pane that has mode, module and progress pages. The mode shows that the server is running 2 modules on a system on a system with ip address 123.53.23.22. A pause and start button to stop and pause the testing anytime. A stand alone mode is used when a module in the system itself is what to be 

                                        Server Remote Test bed

    On the client side we have a similar interface with test master mode, stand alone mode and test slave mode. A client can run a test on itself in a test master mode. It can also run processes on remote machine with test master mode and tests get tested on itself in test slave mode.

    Test slave processes In the task pane shows the processes being run in the background which is actually initiated by the server. The display progress in detail button shows how each is running what are the dll used and file transfer and test result. 

    A server should be able to get all the test results update and the stop and pause button can stop and pause each module being tested on remote machine. This is in the task pane called progress in task pane.

    Analysis:

    Load analysis: At any given time several instances of the test harness can be executed on a single REMTEST by different users. This implies that several threads would be running at once independent of each other, which would drastically increase the time taken to run a single test. The x-axis of the above graph represents the number of test harness threads that are going to be running at a given time and the y-axis represents the net time taken to execute a single test.

     

    If a user sitting at his system is running local tests on the modules that he has modified, and some other remtest module is using his machine as a test-slave, he would have to wait for a long time for his tests to complete as the processor is being used by other remtest.

    Security: The remote test-bed is capable of causing a security breach in a company’s network, if the network is not properly configured.  The network then can close the network port, which is allowing the remote machines to communicate to the test master.  If the remote system is handling requests from the test masters and network breach causes the port to be shut down.  This would cause the test master to wait and perhaps time out and not successfully finish that test.  One security concern is that if network addresses are not correct or not properly configured if we are dealing with sensitive tests where test results are not to be disclosed.  That would be a major security breakdown.  There should be a database or some sort of check to make sure the addresses that are being used to connect to and from are valid and are supported by the remote test-bed system.  In other words, the networking element must be pre defined.  A secure routing table would be ideal.  This is especially critical when dealing with large distributed systems like Missile Defense systems.  Also, another concern is that the test results should be constant or write protected.  We do not want an intruder on the network if they are probing a specific port to be able to modify the test results. The network administrators have a big role in security for the remote test-bed. 

     

    Cost: The cost of the remote test-bed system depends on how much the cost is for network security, network bandwidth, and possible upgrades for remote and local test machines.  The software that will be needed to secure the network should be installed on the network by the administrators.  The network bandwidth depending on what kind of connection is required might be the biggest expense for the remote test-bed to work efficiently. If the teams are located in the same building a simple intranet would be required.  Another cost might be a possible upgrade for the remote test machines.  If it turns out that the remote test machines performance is poor due to rigorous testing and intense test data then it would be practical for the development team to reconsider the hardware platform the system is operating on.  The systems must be ready to handle worst case scenario and while the worst case is being handle the CPU load should not exceed the benchmark set by the development team.  If it does, an upgrade should be strong considered. 

    Context Diagram:

     

             The test master accepts the start command from user and provides a GUI to the user through which user generates events. Since it is a test master the user can select what test module to test, on which machine, code distribution with related libraries and communicates with the test slave i.e. client via a communication schema which is message passing using Xml. The details of the clients and their test code are stored in a Xml file in the file handler module along with the configuration file. The results obtained from the client is will be displayed to the user in the view form and saved in a file in the file handler.

             A client can act as a test master, test slave and stand-alone. We have seen how a test slave works. In stand alone there will be a test harness option which tests the module in the local machine. All the information regarding this will be stored in a configuration file which is used to run the test with out doing much of the changes. This option is like a ready to run option where the user just clicks on one button and testing of the local module stops and the result is displayed via GUI. A developer may want to run these test conditions several times on his code.

             A Test master mode works simply works like a server but it won’t have configuration files of the whole system. Thus a few dependent modules and their system code and test will be available to a local machine and it can perform server type options only on those machines.

     

    Module Diagram:

     

                                        Module Diagram with User Options

    Graphical User Interface:

    This is the module that interacts with the user of the system. It can be considered as the entry point into the system when running as a test master. The module allows the user to select the tests to be executed, both on local and remote, or open an archived log file. The module simply passes the information about the test to be run and related logging option to the Test Aggregator module. In case of the user selecting the option to open a logged file, the module uses the File Handler module to open the XML file and display the contents in the UI window.

    The two main responsibilities of the user interface modules are to allow user to input commands into the test masters and eventually influence the remote test machines.  The second responsibility is to give user a visual representation of the results.  Even though it may not seem as if User Interface does much of any processing, but it is the only module that user interacts with.  Also the user interface allows the users to clear the results display.

    Test Aggregator:

    The test aggregator module can be considered as an executive module of the test harness. It receives commands such as start test, pause test, resume test and abort test from the remtest executive. To execute tests it needs the configuration file to be setup. This configuration file will have a path, where it searches for tests in DLL files that are derived from the standard interface and executes them. It should have a list of all the tests which are executed one by one.

    Test Master: This module is the executive module of the Remote Test-bed system.  It is responsible for processing the configuration file, initiating testing, and supporting commands such as start, pause and abort on user’s request and collecting reports and rearranging log files.

    Stand-alone mode: In stand alone mode the user test the code in its machine and he may like that code to be tested with just one click of the mouse button.. To provide this feature it is proposed that the test harness would get all the required information from the user in the form of a configuration file. The file that was last used will be opened and the tests can be executed by clicking a button. Otherwise, the user would have options to modify the configuration file through a graphical user interface.

     

    Test slave mode:

    In the test slave mode the client machine receives the command from the test master in the form of Xml messages which is to be decoded and executed. The command can be to load new DLL and run files or start, stop or pause commands. When the command to report the test results come in the clients keeps a copy of test for it self and send one to the requesting machine.

    Test code module:

    This module contains the main test code. The module contains a test function that is invoked by the Test Aggregator module each time Run Test is called. The module in turn calls the Test Data Generation module, the Logger module and the Client module. The Test Code module gets the data to execute the test from the Test Data Generation module. It then uses the Logger module to log the results of the test to either the console or memory or a file. This module uses the Client module when it has to invoke functions synchronously on remote machines. The test results are then sent back to the Test Aggregator module.

    Logger:

    The input to this module is from the tester and the outputs can be directed to the memory, to a file or to the console. The logger is an output module which will receive the results of the tests from the tester and will be capable of putting the results either on the console, system memory or in a file on the disk as requested by the user. The logger will consist of a file logger, a console logger and a memory logger which will help to accomplish the required functionality.

     

    Configuration Setup Module

     

    This module is responsible for keeping test configurations for the test master as well as all the remote test machines.  The configuration file should contain the host name of the remote test system.  It should contain the MAC address of the network card and the IP address as well.  Once the administrators have setup the system properly no changes should be done without authorization.  The configuration file should contain the path to the test code and the files to be tested.  The configuration file is specific for each of the system.  Perhaps to add more decision making capability to the test master the test configuration file can contain the specifications of each of the remote machines.  A more robust remote testbed system would ideally have the knowledge of all the systems (local and remote) some on the fly decision making could be handled by the test master instead of having to pre-define a test configuration file.  As par for the project specifications the test configuration file will be a XML based file.

    Communicational scheme:

     

    The communication Scheme module is responsible for allowing the test master to send request to each of the remote machines and in case of a larger distributed system allowing each of the remote machines to communicate with each other.  In any case the communication layer should be reusable no matter who is communication on each side.  One practical way to implement such a communication scheme involves the use of sockets and message passing.  The sender sends the message either as XML message or binary data and the receiver get the message and decode the messages. 

     

     

    Ideally we would like to architect the communication layer with a queue.  The sender has a queue which holds all the outgoing messages and the receiver has a queue in which it stores the incoming messages.  The sender should also have a queue allocated to incoming messages from multiple remote machines.  Each of the remote machines will also have a queue allocated to outgoing messages.  We essentially have two types of communication being implemented here:

    • Asynchronous: results will be passed using this type of communication, where we do not wait till we get results.  They will be stored in the queue upon their arrival.
    • Synchronous: the messages from test master will be passed down to the remote machines this way since we want them to take affect and the test master shall wait till the requests are properly executed.  

    Test Vector Generator:

    This module is instantiated by the test aggregator. The input to this module is from an xml file on disk and the output from this module goes to the application test, which is used to test product code.

    The test vector generator is responsible for supplying the test with structured data as required by the functions of the project code. This test data will be stored in an xml file since the xml file helps to store the data in a structured manner. Hence the test data generator should have the ability to do some kind of xml processing to access these files and derive the test data from them in the appropriate format. This data is then given as an input to the application test.

     Communication Model:

    The Remote Test-bed is a collection of tools running on different machines, and at the same time communicating with each other. A test master can invoke tests on the slave machine and also invoke functions on the remote module and get back the results from the function. Thus each Rem-Test consists of a client part and a server part. As a result, the communication model becomes the most important sub-system of the system. At almost every step of the system, there is communication between Rem-Test peers.

    Remoting involves a protocol that one program can use to request a service from another program located on a remote system. The remote system contains an object that can be used by other machines. The local machine simply builds a proxy of the remote object and makes a call to it. The proxy in turn calls the remote object, gets back the results and sends it to the client. Although this is a very straightforward technique, it has some limitations. This model requires new functions to serve each new client request. It should be noted that we need to have synchronous as well as asynchronous communication between Rem-Test peers. For this purpose we need to build a communication system that can be used for both, i.e. make it reusable. The diagram below shows the basic remoting model.

    Test-Bed System

    REMOTE TEST-BED

    Operational Concept Document

    Version 1 

     

    Documentation by

    Mohammed Waseem

    SUID # 222387755

    Graduate Student

    Computer and Information Sciences

    Syracuse University

     

    Introduction:

     

                As the industries expand and huge projects are being developed it is now becoming tough to test a product which has some hundred modules and some hundred thousand lines of code. These many numbers of modules and code can not be developed at one place in one office. So the most efficient way is to distribute the modules and get the work done. A system being developed is distributed location independently. This makes the work getting done faster and since a considerable number of people work on the subsystem they can concentrate totally on it rather than worrying about other subsystem. Distribution of the work is very economical. One of the few aspects that we have to consider is testing the code developed at each location and a check on the progress of the total system. Remote Test-Bed system makes sure that the tester doesn’t have to leave his desk and go to each location where the system is being developed and test it. This document provides a pathway to a tool which carries the test on remote machine and sends the results to the tester. It also answers few questions like Do we really need this remote test-bed system? How will it work and designed? What are the design issues, Tradeoffs, Efficiency and Future capabilities?

                A huge system being developed can not be tested on a single computer, since it has to consider different test cases for different modules. A remote test-bed system distributes the testing code and the code being tested accordingly to different machines providing them the libraries and data needed. A remote machine tests the data and sends the report to the server. The concept is quite simple but there are a lot of issues that has to discussed like communication between client and server, type of client server architecture, Message passing, Transfer of code and its libraries, Report generation and some design issues.

     

    Terminology:

                The terms that will be widely used in this document are

    TESTHARNESS:  It executes test on a remote machine when the information and the data is provided.

     

    REMTEST: It is the actual module which will test a code either be it on client side or server side. A test has to be done both at client side which can be called a Test Slave and the server can be called a Test Master. Since the server distributes the load the client should also have the capability to test code. Server should also act like a client when distribution of load is done.

    Remote Test-Bed: This word is used to describe the complete process of testing, communication and result passing.

     

    Executive Summary:

    The Remote Test-bed system distributes the load and complexity of a testing a large system testing project across multiple machines at different geographic locations.  The Remote Test-Bed system configures the testing environment of each machine and handles the results from each of the remote testing machines. It also uses a simple socket communication with message passing using Xml.

    As the size and complexity of the project increases, testing becomes critical to ensure that any change to the system does not affect any other part of the system. For each new module created in the project, one or more test classes are developed and are hooked-up to the Rem-Test, making it a part of the test suite. The Rem-Test executes all the tests in the test suite and provides either a visual or a log file presentation of the test results. Few important modules to give an overview are as follows.

    User Interface:  It provides event handlers that respond to user actions. A simple, less graphic and not so verbose interface should be provided for easy and quick understanding of how the system works

    Configuration setup: This will be an Xml file which will hold the information about the clients, the code to be tested on it, location, IP address, Mac address, port of communication, Directory location, and location of Log files of previous test files. If there are any changes the configuration file has to be updated accordingly.

    Test Master: This module is the executive module of the Remote Test-bed system.  It is responsible for processing the configuration file, initiating testing, and supporting commands such as start, pause and abort on user’s request and collecting reports and rearranging log files.

    Communication Channel: This module takes care of establishing communication between Test Master and remote testing machine. It uses the configuration file to set the communication protocols. The message passing is done using Xml. It uses sockets of .Net remoting.

    Synchronization: This module is responsible for making sure the tests are executed in an order the way it was planned.  The object created from one test might be used as an input to another test. Some tests may provide test results in ‘yes’ or ‘no’ and some may pass objects and some text. In that case a point system is used to define whether the test cases have passed or failed. It is extremely important that certain order is followed or some tests might not be able to execute.  This module is strong considered for large software systems.

    Test Aggregator: This module accepts user input from the User Interface module, and aggregates the tests into a single test suite. The tool can execute local as well as remote tests. In case of local tests, the module invokes the test function on each of the test classes, represented by Test Code. In case of remote tests, the module calls on the Client module to make the remote call. The test results are sent back to the User Interface module by the local tests or the Server module by the remote Client module.

    Logger Module: This module is responsible for logging the local and remote test results. The module receives test results form the Test Aggregator module. The logging options available are the Console, or the Memory or a File. The module uses the File Handler module to log results onto a file.

    File Handler Module: This module is responsible for all the file access operations and file transfer operations of the system.

    Message Handler Module: This module is used by both the client and the server. The main purpose of this module is to construct a message out of a function call or a test call, and to deconstruct a message by parsing the XML data.  This module is responsible for the encoding and decoding of the messages. This makes the communication a very easy and simple. Lot of remote operations can be performed by Xml messages.

    Requirements:

    Requirements are the necessary operations that the system has to perform. Few requirements that a system is built up on are.

    • Server operations shall support interactions with multiple concurrent clients.
    • Communication between clients and server(s), based on XML message-passing.
    • Support the division of testing activities for large projects across multiple machines by providing A build tool that supports both full and incremental builds, executed on a client. A test harness that loads test DLLs dynamically and executes their tests.  Clients will use a test harness for local testing of client’s code before committing to a larger test.  A REMTEST server will use the same test harness structure to run all shared testing.
    • Support client’s designation of one or more test configurations that define a test, e.g., a sequence of DLLs that define the tests and code to be exercised.
    • support file transfer from client to server of test code and code to be tested, based on the test configurations of the previous requirement.
    •  
    • support pausing or aborting testing of a specified test configuration on a REMTESTBED server.
    • Transfer test results as XML messages from REMTESTBED server to the client requesting a specific test.
    • Support quiet and verbose modes of testing.  Quiet mode simply returns the number of passed tests and the names and versions of test code and tested code for each test that fails.  Verbose mode reports back, to the client requesting a test, all trace messages defined by test code, with an option to return only trace messages for tests that fail.
    • Support requests by clients to switch verbosity mode during testing on any specific test configuration.
    • Support the display of current test status for each currently running test configuration, where status consists of at least the number of tests passed and failed so far.
    • Support the concurrent execution of testing on two or more test configurations, specified by one or multiple clients, allocating one thread to each configuration.
    • Record time-date stamp for each current test session and test module names and their last modified time-date stamps, along with the number of passed and failed tests.  This record must be stored, indefinitely, on the server, and provided to any client on request.
    • Support effective display of test results on the client requesting a specific test.  The remtest-bed system shall also support the transmission of test results for all concurrent tests to requesting clients.

    The above diagram shows how the Test master communicates and operates with the Test slave. The remote machines may be located geographically at different places. An important thing to notice is computer in a network are connected so that they can test dependent code in their subsystem. For interdependent subsystem server will take care passing that particular result to the requesting client.

    Users:

                The basic necessity for this tool is clear, this tool is needed for the testing the code for the development of huge project. So the people who develop the project need the tool the most. But the requirement and the way this tool is used is different when compared to each actor in the team are as follows.

    Software system architect: A software system architect is a key player in the product development. He would definitely know how useful if he has this kind of a tool is with him. A project architect designs a system and keeps an eye on the progress of all the modules. It would be difficult for him to test the code of a particular module for which he might not know the inside functionality of how a developer has developed it. With the help of this tool a system architect can get the code anytime, test it and get the results. If a test is dependent up on some other test and some thing goes wrong in a test. The architect will know where the problem occurred since the test bed system pin point the error because the test code is distributed. He can also check the progress by comparing the test at different level of product development. This tool might also help make the architect consider in redesigning of the product after few test to better the product with the series of result for the test-bed system.

    Project lead: A project lead will have a many teams working for different modules in a project. A project lead has to have a detailed progress of each team. Project lead can use the test-bed system to track the progress of each team by running test on the code developed on each team time and again. A project lead doesn’t have to spend too much time in getting to know details of each module since the test bed generates a detailed report of test and their result. He can always refer to the previous test results and can guide the teams. He can also estimate an accurate time line with the test results of each team. .  The leads can also use the remote test-bed system to implement acceptance testing plan which usually integrates all the components as if the system would be fully operational under customer’s supervision.

    Developer: A project developer is the person who deals with the actual code. A developer might be working on some module and would like to test his own module how it performs. At the same time the number of developers who are going to work on project development will be many. So a developer might want to make some changes in his module at the same time using this system he can make sure it doesn’t interfere with other dependent modules. The system has the ability to run tests on modules on the local machine as well as the remote machines. This system also has a mechanism to ensure that the user can at any point of time know about all the tests that can be executed, i.e. new tests added and old tests stored for future references, on the local and the remote machines.

    Quality Analyst: All the tests are run on different machines and the quality assurance people may not know how a system performs on different environment. To run the test on different environment they might have to configure the system again and rune the test. Generally the quality assurance personnel normally would not have the knowledge of configuring the network paths, but it can surely be made easy if they know how to simply edit the configuration files. The GUI would be so simple that with few click they can run tests on different machines and different environments. The log files will generate detailed reports on where the test was run and the test result.

    Customer: A customer will not use this tool as far as testing of modules or for report generation is concerned. But when the final product is ready he might want to test the product based on the requirement and see if the product is satisfactory. So only a test harness will be provided to him so that he can test his final product using remtest.

     

    USE CASES:

                A client can perform three different operations depending on the situation under which the remtest performs. A client can act as a test master, a test slave and in stand-alone mode. In stand alone mode the client tests the local code. All these three modes can run concurrently depending on user choice. The use cases defined can be divided based on whether the remtest is running in the test-master mode or the stand-alone mode.

    Stand-alone mode: In stand alone mode the user test the code in its machine and he may like that code to be tested with just one click of the mouse button.. To provide this feature it is proposed that the test harness would get all the required information from the user in the form of a configuration file. The file that was last used will be opened and the tests can be executed by clicking a button. Otherwise, the user would have options to modify the configuration file through a graphical user interface.

    Use cases:

    1.The user executes a series of tests on the local module. The modules and the tests are stored as dynamic link library (DLL) files; and the test data are stored in Extensible Markup Language (xml) format. The directory information of these files is stored in a configuration file. The configuration file also has details of the logging of results. memory or in a file. Additionally it should have an option to run tests on the local module or on the entire subsystem.

    All the user has to do is click the test button once the configuration file has been defined. A brief result comes out telling the user which test has passed and which one has failed

    1. Each time the user needs to change the way of testing, he can create a new configuration file by giving the directory information of the modules, tests and test data. On getting this command the test harness tool will open a blank editable window for the user to key in the configuration file.
    2. The user may open a configuration file that was previously saved. When this command is received the test harness will open the configuration file specified and display its contents on the graphical user interface.
    3. The user may want to edit the configuration file. This can be done using the graphical user interface where the configuration file is displayed. For example he/she may want to change the logger options or change the directory information of the project modules, test files and test data. This command brings the GUI to an edit mode where the user can make changes.
    4. The user will have the option of saving the configuration file as a new file or replace an existing file after editing it, prior to running the test harness. When this command is received the test harness will write the configuration file to disk.

    Test-Master Mode:

    In the test-master mode the remtest should first test its local module. For this it may need the services of the lower level modules lying on a remote system. The remtest should have in addition to the interface of the remote module, information about the location of all the modules that it uses. In addition it should command all the lower level modules that it depends on to test themselves. For this too it should have all the information of the remote modules.

    October 17

    Code Generator --- Operational Concept Model

    Code Generator

    Operational Concept Document

    Version 1.0

     Documentation by

    Mohammed Waseem

    Graduate Student

    Computer and Information Sciences

    Syracuse University

     

     INTRODUCTION:

     Code Generator, As the name suggest this tool generates code. Visual studio has lots of nice wizards some really good and some which doesn’t exactly do what we need. Code Generator is one such Wizard like application which helps us generate Boilerplate for C # programs. A boilerplate is a kind of template which is used over and over again. This project develops a program to generate code for Console Application, Library and Windows Application. For each specified file name the program builds a source file with manual page, maintenance page, and namespace and class definitions.  The program will not supply any semantic content, but will provide code for the specified namespace and class declaration with an empty default constructor.

             It also support multi-file application with as much code is sensible to provide and insert in manual page, maintenance page and test stubs, using an XML template that defines user information and template(s) that provide the layout of Manual and Maintenance comments and code.  Each generated file is expected to compile without error. Anything which is repetitive can be automated. This is an approach which is already gathering speed in the swift society.  Nowadays it is rare to see a project that doesn't use an automated build script. Automation is key to agility.

             This document discuses the architecture of code generator its design, uses, critical issues, flexibility and many other design concepts.

             Code generator makes the life of the developer easier by creating the code for similar application error free.

     USE CASE ANALYSIS:

    Code generator is wizard like application. A wizard interacts with the user and supplies inputs and out puts. A use case is a narrative document that describes the sequence of events of an actor (an external agent) using a system to complete a process. The architectural concept of code generator discusses the principal users and the ways they control and interact with the system.

     Principal Users

    The following are the principal users of this system:

    Software Architect:

    A simplistic view of the role is that architects create architectures, and their responsibilities encompass all that is involved in doing so. This would include articulating the architectural vision, conceptualizing and experimenting with alternative architectural approaches, creating models and component and interface specification documents, and validating the architecture against requirements and assumptions.

     This tool helps him in creating several projects and testing their compatibility. He might not have to worry about those small errors because the code generated is error free. A person like architect has no time for error correction and testing compatibility. This tool which builds compile-able applications, acts as a draft. The architect can save lot of time in typing similar code repeatedly.

     Software Developer:

    A software developer will be the key user of the code generator. A software developer is a programmer who concerns him/herself with one or more facets of the software development process, a somewhat broader scope of computer programming. This person may contribute to the overview of the project on the application level rather than component level or individual programming tasks Usually a developer will work in the development of large software systems which require him to build large number of  similar applications. This application will save time for writing code for different applications which have the similar code.

     Maintenance team members:

    Systems undergo changes for improvement over a period of time. This tool will help maintenance team to build applications which are similar project wise, application wise and code wise(partially), only writing code wherever necessary. During reengineering and remodeling period there might be on many occasions where a user might have to add a lot of new files to a projects of similar type. This tool makes it a lot easier for the user to create a file with default values with out much of writing code. Code generation is a beautiful way of creating files and adding files and projects to an application.

     End User:

    Most people experience computers as "end-users" of packaged programs. Trying to meet the needs of diverse users, they bloat their programs with many of features most people never use because they either don’t know to use them or they have no knowledge of it.  So it is necessary to make tools use very clear to the user before hand. Life (and programs) would be much simpler if each user could add the functions he/she wanted. The use of this tool is clear and easy to use. The code generator will also help the user to understand the structure and provides the flexibility to change his design by adding files when ever he wants to his application. GUI provides a very interactive and easy way to understand the tools so that the user doesn’t have to spend time on learning the features of the tools and how to use them. It is a clean step by step process with options to start right away with the work.

     VIEWS:

     An end user when using a tool must always have an easy and understandable operation. Code generator is a step by step progress rather than an abstract way of generating code some where with inputs here and there confusing the user. A user should always have an option of going back and correct his input should always be provided a Help button to guide user through the process. He should also be able to see a next if there is a next step at any point in the tools use or finish if it is the last step. Any application should always provide an option of adding new files with user options.

    Users upon running the tool see a form with options of selecting the type of application he wants. Like

    1.      Console Application

    2.      Library

    3.      Win form Application

    4.      Interface

    As the user selects the application type and clicks on the next button the tool should ask for user inputs for

    1.      Filename: The tools should also suggest some names as examples below the text box.

    2.      Path: There should be a browse button so that it is easy for use to browse and specify the folder where the project folder is created. If the user explicitly specifies the path for the project folder and if the folder doesn’t exist then the tool should create the folder for the user.

    3.      Namespace: Should provide an input box with examples.

    4.      Class name: The application should see that the namespace and class name are not the same. If a user inputs the same name for namespace and class name a message box should pop up and show the error to the user suggesting to change the input.

    On clicking next the user see a text area where a code is generated for him which is also editable. An option of adding a file is always provided though out. So if a user wants to add a new file he can just click on new file and a form will pop up asking him to select the type of form as shown above. Upon selecting the file type the next form will have some default values stored from the previously created file like the path, namespace etc. which are subjected to change by user in the editable textbox. A user should be able to repeat this process any number of times till he finishes his application. He can also close the application in half way and open it to see the changes saved. Once the user is done generating and writing the code. The user clicks on compile button and the application creates the Visual Studio project to compile and run the code.

    User Interface

    Based on the use case analysis, the User Interface for Code generator will have following GUI:User interface allows a user to provide the input in the given text boxes and also a button to exit from the system.

    When the user clicks on the New File button, it opens up a list box allowing the user to choose the file /application type from the list (console, library, Interface or windows). As user selects the type of the application, system prompts the user to enter the name of the file, namespace, class name and the path where the file is to be stored, in the text boxes given on the Win form, here the user will have option to edit the generated text in the given textboxes and then it will browse or give a navigation bar to select the path. The user might choose Exit to cancel this task or click on Ok to proceed. A User can always see a Help button in the form which will guide the user when ever he needs help on what to do next.

    View option provides a form which has four buttons. Display Window starts the Code generator and displays the source code.  Save As allows the user to save the file in a specified location with the help of a navigation bar. New Application on the top allows the user to open new application and to close the current one. Before closing the current application system will prompt the user to save or cancel the current project. Add File allows the user to add the new file to an existing project. Here the user can handle the multiple files by saving all the files for given project in the same directory. The path & namespace of the new file will have default values and later they are subject to modification between each file construction so that the user doesn’t have to enter the values again. There is also an Explorer button which when clicked shows the list of files related to that project as a list in a popup window. On restarting the tools it shows the last project used.

    CONTEXT DIAGRAM:

    The context diagram represents the entire system under investigation. Also called the birds view.

    Here the code generator interacts with the user and File system. User interacts with GUI and file system through xml parser. The bubble here represents the code generator and the blocks on the left and right is GUI and file system. This diagram just gives the outline of the whole application thus it is called a bird’s view of the project. It describes the important flow of information form one block to another in a correct flow. MODULE DIAGRAM:

     Module diagrams show the physical allocation of the classes to modules. It is very important to define a module since there is a lot of confusion in understanding the definition. In software, a module is a part of a program. Programs are composed of one or more independently developed modules that are not combined until the program is linked. A single module can contain one or several routines.

    Modules in code generator:

    1.      Executive

    2.      GUI

    3.      File handler

    4.      Help documents

    5.      Template Compiler

    6.      Parser

    7.      XML template and data

    8.      Visual studio project creation

    Modules in detail:

    Executive:

             The Executive module is a console application. This is the upper most module takes care all activities of the system from the command line. It generates the form with the options for the user to choose and provides communication with user with GUI. It manages many other functions such as providing help where ever necessary for the user. It manages file creation and template management on user selection and displays the output.

     

    GUI:         GUI is an interface through which the user communicates with the system. GUI should always be interactive so that the user doesn’t find it difficult to understand the system. GUI takes the inputs form the user and supplies it to the code generator like application type (Console application, Library and Windows application) then up on selection it asks the user for the inputs like the file name, path, name space and class name. GUI should also provide users with the option of correcting the inputs by going back and an option called “help” so that the user knows what to do next.

     File handler:

             File handler takes care of creation, addition, changes and deletion of files in a project. It also sees that the files that are created are of correct extension under an appropriate project.

     Help document:

             If a user is using the tool for the first time he may have to learn the tool. A tool should be designed in such a way that the user should be able to walk through the process easily with out much of reading and learning effort. But at the same time he should also be provided with a help document at anytime he uses the tools so that he can trace back what he has done till now and what other options he has after a particular move. Any tool must have a help document. If the help document is interactive with the user during his use of the tool it makes it really easy for him to work with it. This module takes care of all the help a user needs during the use of the tool by providing examples and messages and a help document that he can refer anytime.

     Template Compiler:

             When the user makes a selection of his application type (Console application, Library and Windows Application) template compiler selects an appropriate template and generates the code with the inputs from the user about the file, path, namespace and class name. This is where the tools purpose is served, Generating code. Then this generated code is displayed in a form text box area where the user can add his code. The user doesn’t have worry about the already compiled code as it is error free. It then parses the file and supplies the information to the parser to create an XML file.

    The code generated for each type is as follows

     Console application class contains a default constructor, main entry point, and a function with the signature bool test() function. The main function is enclosed by a #if() test, displays a title, and calls the test() function. Interface code that declares a namespace and an interface. Library application provides a namespace and class with a default constructor. Win Form application class contains a default constructor that creates an instance of each Library created since its process was started with each instance as it reference. Each library, as it is constructed, calls a display function in the Win Form to announce its construction.

     Parser:

             To parse text means to break it up into smaller parts. Here the parser analyzes an xml file and reads it line by line according to the user specification. The result is stored in a xml template with predefined tags like name, path, author so on.

     Xml template and Data:

    XML Template consists of all the pre specified XML script, which will be used by the product builder to create source code file according to the user inputs. It consists of a file which is parsed by the parser to extract the necessary code information for output file. XML Compiler uses the parser to extract the necessary code information from the XML template. For this purpose this is responsible for the integrity, accuracy, entirety of the given XML template. All this operations are handled by a exception handler. For a file xml will look something like this:

    <?xml version="1.0">

    <property>

    < CodeTemplate Language="C#" TargetLanguage="C#"

                Description="Generates a class including a special informational header" />

    < Property Name="NameSpace" Type="String"

                Category="Context"

                Description="The namespace to use for this class" />

    < Property Name="ClassName" Type="String"

                Category="Context"

                Description="The name of the class to generate" />

    </property>

    Visual Studio project creation:

             This is definitely a module in its own sense. Using the output file from the xml template the tools has to create a project with all the files included in the application. There are few changes that are to be made to the .csproj file with values from the output file. Again an xml parser can be used to change the values like file name, path, guid etc.