• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Collaboration

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am looking for collaborators for the SCJD programming assignment. I am nearly finished with the assignment. I am willing to share design decisiions and code. Sun encourages collaboration for the project, but insists that code be your own, because of the subtle differences in assignments.
The project I am working on is the Fly by night. I mainly question whether the DB locking techniques I've done are accurate. If anyone is interested, please reply to this post and I will offer my design decisions as well as the requirements of my version of the assignment. And questions I have regarding certain elements of the assignment.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ben, thanks in advance for your help.
The question I have is related to database part of the project.
Do you have to keep text data file* in synch with binary
( binary + metadata ) file**?
*text data file - example of this file is provided by SUN
**binary file - file created by "Data conversion utility"
So, after makeing updates to binary file do you have to make sure that flat text data file is in synch with changed binary or we forget about text file right after running "Data conversion utility" and generating binary database.
thanks again,
roman
 
Ben Nichols
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Roman,
In my assignment, there is nothing stating that the convert utility be in anyway tied to the rest of the program. As I read it the convert utility is a separate command-line utility used to prep a flat file into a database binary for the client server portion of the program to take as a command-line. If there was such a requirement, it would be simple but wasteful of resources to write the database out as a flat file on every change. Typical databases are never implemented this way. Imports and Exports are resource intensive, and they are generally manual or scripted activities performed on an as needed basis.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm also doing Fly By Night.
Are you allowing the user to cancel a "reserve seats" operation? It could take a long time if someone else has a lock on the flight.
Are you making time outs on the locks? Without them, a client could grab a lock, quit, and make it impossible for anyone else to reserve seats on that flight.
The way I implemented locking was to keep an ArrayList with an entry for each flight. When someone grabs a lock, the corresponding entry in the ArrayList is set. Would-be lockers wait() for locks and are notify()ed when locks become available.
I've been thinking about making the flat file reader launchable from the GUI client.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ben is absolutly perfect and I agree 100% with him. I have one question ? Are U considering data checks like 13:75 hrs while converting or just dumping whatever U find in the Text File ?

Originally posted by Ben Nichols:
Roman,
In my assignment, there is nothing stating that the convert utility be in anyway tied to the rest of the program. As I read it the convert utility is a separate command-line utility used to prep a flat file into a database binary for the client server portion of the program to take as a command-line. If there was such a requirement, it would be simple but wasteful of resources to write the database out as a flat file on every change. Typical databases are never implemented this way. Imports and Exports are resource intensive, and they are generally manual or scripted activities performed on an as needed basis.


 
Ben Nichols
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My requirements state:
"Record locking must be implemented using the methods
public void lock(int) and
public void unlock(int)...
The lock method should block until the requested lock can be applied."
Although I would agree that it is inelegant, this translates into deadlocking the client until the lock can be obtained. Since the lock method cannot even return, the client cannot cancel a request.
A good way to implement this would be a timeout in the lock function as it is blocking, that allows the new lock to be applied after the function has been blocking for some amount of time. I do not see a requirement for this level of sophistication in the assignment. The only acceptable way to implement this is with the timeout period passed to the server via command-line or parameters file, and those do not appear to be options.

Originally posted by J. Adams:
I'm also doing Fly By Night.
Are you allowing the user to cancel a "reserve seats" operation? It could take a long time if someone else has a lock on the flight.
Are you making time outs on the locks? Without them, a client could grab a lock, quit, and make it impossible for anyone else to reserve seats on that flight.


Ben
 
Ben Nichols
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Data.class is designed to support any sort of database using text-only fields. My convert utility does not validate data, because the database does not have field types (i.e. char, int, string, date/time...). My requirements state that the convert utility should be easy to reuse for other projects. To me this means if you want to import a address book, or flat file ascii database of plane replacement parts, your convert utility should be able to handle it. Validating data is not possible unless the database supports field types, and the user is able to match imported fields to existing field types during the import process. For an easy to command-line utility, this would be very difficult. Note: (Paraphrase) The dataset may be modified for a clearly justified reason, and such changes should be kept to a minimum. (End Paraphrase) I took this blurb from the requirements to mean that one probably had to make modifications to the dataset to meet the requirements.

Originally posted by Rao V Kuna:
Ben is absolutly perfect and I agree 100% with him. I have one question ? Are U considering data checks like 13:75 hrs while converting or just dumping whatever U find in the Text File ?


 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ben
Thanks very much. I have couple of questions which I could not come to conclusion.
1. What is the length attribute in FieldInfo object ? Is it length of the field in Bytes or length of the field in chars ? I am thinking it should be bytes but how can we define the length of the string field in bytes ?
2. Do we need add Record Number to the record details given in the ascii file.
Thanks

Originally posted by Ben Nichols:
The Data.class is designed to support any sort of database using text-only fields. My convert utility does not validate data, because the database does not have field types (i.e. char, int, string, date/time...). My requirements state that the convert utility should be easy to reuse for other projects. To me this means if you want to import a address book, or flat file ascii database of plane replacement parts, your convert utility should be able to handle it. Validating data is not possible unless the database supports field types, and the user is able to match imported fields to existing field types during the import process. For an easy to command-line utility, this would be very difficult. Note: (Paraphrase) The dataset may be modified for a clearly justified reason, and such changes should be kept to a minimum. (End Paraphrase) I took this blurb from the requirements to mean that one probably had to make modifications to the dataset to meet the requirements.


 
Ben Nichols
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Length is in characters, which the Data.class stores as bytes. For the record number, you're on your own. There are comments in the Data.class file (under the find method) that suggest record number is the first field.

Originally posted by Rao Kuna:
Ben
Thanks very much. I have couple of questions which I could not come to conclusion.
1. What is the length attribute in FieldInfo object ? Is it length of the field in Bytes or length of the field in chars ? I am thinking it should be bytes but how can we define the length of the string field in bytes ?
2. Do we need add Record Number to the record details given in the ascii file.
Thanks


 
Rao Kuna
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
U mean, while creating database bin file, we need to create the instance of FieldInfo object like:
new FieldInfo("Flight Name", 40) where 40 indicates the maximum length of the field "Flight Name" in bytes ?
Thanks
Rao

Originally posted by Ben Nichols:
The Length is in characters, which the Data.class stores as bytes. For the record number, you're on your own. There are comments in the Data.class file (under the find method) that suggest record number is the first field.


 
Ben Nichols
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just the length in characters is necessary for the FieldInfo object.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have doubt about Fly By Night assignment. Whether to include passenger information in the same file as the flight information binary file or in a diffrent file or not to include at all ?
Thanx for your suggestions in advance.
 
Ben Nichols
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The requirements for the assignment I received don't mention passenger info. If passenger info is required for your assignment the ideal method to store it would be two files, in which one passenger info record would have a flight number field.
Alternatively, if passengers should be allowed to book multiple filghts there should be three files. One for flights, one for passengers, and one containing the fields "Flight Number", and "Passenger ID" allowing a many to many relationship for flight booking.

Originally posted by hegdemk:
I have doubt about Fly By Night assignment. Whether to include passenger information in the same file as the flight information binary file or in a diffrent file or not to include at all ?
[/B]


 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Ben. Even my requirements does not specifically mention anything about passenger information. But without any Date and Passenger information in the database, all you will be able to reserve is just aginst the number of seats available on an airlines. Without a name you can not query or cancel a reservation. The functionality of the whole system from the practical view point is NULL. That's what Sun wants us to develop ?
 
Ben Nichols
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the project goal is to test us on a number of areas rather than to make a usable production level product. The scenario is to help us conceptualize certain elements of usage.
 
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where does the following exist?
"Sun encourages collaboration for the project, but insists that code be your own, because of the subtle differences in assignments."
If it is in the instructions, please give me key words to search on. I do not see it. I have read the instructions more than once.
 
Michael Finney
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still have not seen proof that I can help anyone. I will not participate until I see it is legal and supported by Sun.
So, I will ask something here similar to what I did at another email list site.

People often say Sun wants us to discuss things and work out things together. Can someone show me some real proof?
In regards to Sun, all I see from them is the statement "You may not use files from sets issued to other certification candidates - even if you believe they are identical."
Please show me proof of what Sun allows and/or disallows between "certification candidates".
Nothing found at http://suned.sun.com/USA/certification/javamain.html
My instructions say: "Your ability to think through these issues, in the face of realistically imperfect specifications, and come to a tenable solution is something upon which you are being graded. "
"You should consider the options available and make a decision about how to address the problem yourself. This decision making process is part of the marking scheme, ..."
Now reality tells me they do not want a lot of people emailing them and asking 10 billion questions. It would become a support nightmare. It could be the motivation for saying the specifications are imperfect and to not ask them questions. I could even believe it possible that Sun wants us (the candidates) to discuss certain statements they have actually tried to make clear in their instructions. However, I require proof of what I can actually share.
Thanks.
 
I carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic