My name is Neil Dhruva. I am currently pursuing Bachelors in Computer Science from BITS-Pilani, Goa, India.
- Web Development
- App Development with Java
- Open Source
- Mobile App Development
Languages Worked With
BRL-CAD Tentative Proposal
Topic - Materials Database: Create a Materials Database web site for collecting, managing, and providing programmatic interfaces to material properties.
Brief project summary (<500 words)
The project deals with creating a Content Management Site to aid the functioning of the BRL-CAD software. The CMS is meant for managing a database of various different materials and properties of these materials for users to share with each other and use in their projects. The users can add new materials to this site, edit properties of existing materials, and request generation of certain file formats like XML that consist of different materials and corresponding properties.
The website will thus make it easier for users to share data and results used in their projects.
Detailed project description (>500 words)
I have a few ideas regarding the Materials Database website. The website at present contains the following:
- It has 2 options: (1) generate an xml file of the current database (2) login as admin to admin.php
- Page has a simple linear layout of all the materials that have been logged so far along with various properties that have been added to each material.
- Options are provided for editing the description of each element which gives a text box when 'edit' is clicked.
- The user can create his/her own material, add traits to it and edit it. The user can also make it private or public. Every element is associated with a user which obviously is via the relational backend.
- Also, when a user tries to change a trait/material that will affect the rest, he/she is asked if sure whether to make the change. All this is accomplished by the GET method.
- This generates the XML document and outputs it to the browser.
I feel a lot of other features can be added to the existing site:
- The most important one being 'Search'. The main purpose of this website is sharing information and I believe Search is an integral part of helping users achieve results faster.
- User interaction is another important feature which can be incorporated in terms of better profile pages with message facilities. Links can be provided and an individual can be notified in such events via mail.
- Also, various different pages along with a navigation bar should be assigned for different tasks, for eg, main page with different materials, another page for editing the database, one more profile page and so on. Also, every material can be assigned a page with the GET method. All of this is shown in the website flow diagram.
- POST method should be used for the edit pages.
- Comparison of different materials based on different properties can be added.
- I also think the backend will require work in order to relate tables better for handling more data. And this can further be used to publish the data in various formats like XML which has already been done.
- Server side caching can be done to optimize the speed with which pages can be viewed.
- Database: The database will mainly store two things: user information and materials information. User Information mainly includes name, e-mail, password, and other personal profile features. It will also include paths of files uploaded by users. Materials information will include the ID, name, description and the properties. There will be more tables that the user and materials table can each be broken down into, or just for foreign key associations.
However, I had another idea in mind as well. One could link all the user profiles back to the BRL-CAD wiki pages of the users. This will make it easy for integrating the materials website with the BRL-CAD official website. A link in the toolbox can then be provided to the Materials Database.
- MySQL: For the tables, I believe MyISAM would be better than InnoDB because there will be a lot more reads than writes. Also, the full-text search option will then be available which will be very handy for the database. This will require some work regarding foreign key maintenance, but I don't think there will be too many tables to worry about. Also, MySQL manages Query caching, parsing and optimization pretty well.
- Apache: I am reading a lot about server management and performance optimization. One of the things we can incorporate is a Reverse Proxy or an HTTP accelerator. I am not sure about this approach because it is meant for very high traffic sites and I'm still reading about it.
There are a lot of techniques involved in maximizing PHP processing of scripts. I'll be using output buffering with ob_start() etc. for some temporary server side caching. The buffered data can then be flushed to the user. Also, since we are using individual pages for user profiles and each material, I suppose flat-file caching would be a good option to cache recently generated HTML, especially when the materials pages are viewed because there will rarely be changes in these pages. I am also reading about the mod_rewrite facility of Apache that should be greatly helpful in managing cache files. Managing cache files can be a bit tricky, given the uncertainty about user traffic, when to replace certain cache files etc. Hence, I will try to incorporate this feature towards the end of the project.
- Authentication: User authentication is another issue to be tackled. Creation of new user and the 'forget password' option can both be authenticated by sending a mail to the user. The mail can either be the generation of a new password and the user can then change it or it can be an authentication key. I'll use SMTP for sending mails and set up a queue folder for mails not sent and deal with the situation accordingly.
Once the user is logged in, sessions will be used, which are in turn authenticated by cookies for each user. The users can then view their profile, recent XMLs generated by them and various materials added to the database by the individual user (user's contribution).
- Error Handling : Error handling has to be accomplished in order to keep track of various errors encountered by users. This can be done by creating a directory for error handling and using PHP functions like error_log() to tackle the errors generated. The administrator can also be notified by mail if the error is serious.
Apart from these, I have also uploaded a basic architecture diagram of the web server process along with a a website flowchart at . I have also provided the basic flow of the website as I see it presently, along with possible database tables and files on the server at .
I will come up with a lot more ideas as the project moves along. I had developed a CMS last year for a project at an Information and Library Network in my hometown under their open source and software development wing. It was based on allowing the employees order inventory and office supplies via an online portal. I have uploaded a few snapshots of the same here .
The project will be very useful for all the users of BRL-CAD and I hope I can contribute to the same.
 - http://brlcad.org/wiki/Special:Upload
 - http://mater.brlcad.org/xml/generate.php
 - http://brlcad.org/w/images/4/4d/Arch_diagram3.pdf
 - http://brlcad.org/w/images/8/89/Website_flow.pdf
 - http://brlcad.org/wiki/Image:Cms_snapshots.pdf
Deliverables (specific, measurable goals) / Milestones
- Develop basic front end, set up a database
- User profile pages
- Materials pages
- Search features
- Generating XML and other formats from database entries
- Improve front end
- Server side caching for faster page retrieval
Describe time availability (40+ hours/week assumed)
I have my end-semester exams from May 1 to May 15 and then the summer break from May 16 to August 2. Hence, I will be absolutely committed to GSoC throughout the span of 14 weeks.
- May 1 - May 15
- End-semester exams at college
- May 15 - May 31
- Go through the current code, database structure and select everything that can be improved upon and what all needs to be created.
- Read more about Apache server, MySQL data handling
- Read more about caching, IP authentication, SMTP etc.
- June 1 - June 10
- Prepare a basic layout of the website to work with (css)
- Prepare database tables (users, materials)
- Create user login, authentication pages and user area
- June 11 - June 30
- Finalize design of the Materials pages (layout)
- Code for the Materials pages, interaction with the database
- Implement the interaction between user and materials database, user authentication to edit the database entries and so on.
- July 1 - July 15
- Write code for converting MySQL entries to XML and other required formats (can use part of existing code for this)
- Code for easier front end for generating such documents and downloading them like check-boxes to include all the materials and properties required in the document
- July 16 - July 25
- Implement server side caching, error logging and other features not thought about in the initial stage.
- July 26 - August 13
- Write the documentation, tutorials, examples if any to make working with the website easier
- Review code, run tests
- August 13 - August 20
- Make all the necessary changes/additions required before final submission.
Currently Reading About
- CakePHP(for better security, caching etc.)
- JSON (alternate to XML)
- Caching using PHP; APC (Alternative PHP Cache)
- Reverse Proxy
BRL-CAD is a great open source software and fun to work with and I want really to contribute to this project. My PHP skills are better than C++ and hence I think I can better contribute to BRL-CAD with my web development skills.
Sharing is important in every community and I believe BRL-CAD users can benefit a lot from the Materials Database site.
I have been coding for the past few years now and I believe I am getting a good hang of things, especially website development. I want to further my knowledge while at the same time contribute to the open source community. GSoC would be the perfect opportunity for me to accomplish both of these.