Client-side file parsing

What java technologies or strategies are available To do client-side parsing?  Basically, I have a bunch of files (600 files, 300MB worth) and each of these files contains header information as well as bmp information.  I am only interested in the header information.  Preliminary workings of this application has java code that does the parsing by reading each file's header information and creating a data structure to hold that data.  Now I am trying to turn this into a web application.  The only way I can see doing this parsing is for the client app (browser) to transfer the files to the server and do all of the parsing on the server side.  The problem is that there are a large number of files so it's not practical to send all of the files.  Is there a way to do this on the client side, i.e. compile the java into a client side application?  Any other options?
mock5cAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
HegemonConnect With a Mentor Commented:
Yes you can create a client-side application, possibly launched by Java Web Start.
0
 
gremwellConnect With a Mentor Commented:
Your application could consist of a server side code and a signed Java applet. Java code bundled with the signed applet can be arranged to have access to the file system on the client side. This way it can have opportunity to parse the files locally, without uploading to the server.

Some resources:
 http://en.wikipedia.org/wiki/Java_applet - about applets, see Applet Security chapter there
 http://www.captain.at/programming/java/ - specific example of reading local files from an applet
0
 
mock5cAuthor Commented:
@Hegemon:  By Java Web Start do you mean JNLP?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
CEHJCommented:
>>do you mean JNLP?

Yes, it's launched by jnlp
0
 
HegemonCommented:
Yes, JNLP is another name for it.
0
 
objectsCommented:
> The problem is that there are a large number of files so it's not practical to send all of the files.

just zip and upload them
0
 
mock5cAuthor Commented:
The design is to not transfer the files to a remote server unless they have been validated.  That's why I can't send all the files to the server to start.  When they do get validated, zipping them prior to uploading is an excellent idea.

I'm a beginner at web programming so the whole client-server thing is throwing me off.  It sounds like my two options are applet or JNLP.  For JNLP, does that simply mean all the code is compiled and runs on the client side and thus does not require a web server at runtime?
0
 
objectsCommented:
no, jnlp still needs a web server.
It removes the need for the browser to be involved.
An applet may be more appropriate for your needs (assuming a browser is already involved).
0
 
gremwellCommented:
If you have not dealt with Java applets before, you could start developing a stand-alone Java application running on client side interacting with web server running on server. If you keep GUI simple, it can be easily package as a signed applet later on, with minimal modifications. For file upload transactions between the client and the servers you may want to stick to HTTP protocol and use POST or PUT methods.
0
 
HegemonCommented:
jnlp is only a convenience allowing to launch the application from a central storage, thus simplifying distribution problem. It may or may not be used as the application may be distributed in other ways, depending on the needs.
0
 
ValeriConnect With a Mentor Commented:
>> I am only interested in the header information.
So you have to parse on the client side. Why to transfer so many MB, if you are interested in small part of this information?! So transfer only the data structures retrieved from the headers.
>> Now I am trying to turn this into a web application.
It means that the only solution is applet. Only applet will start jvm on the client side.
It will help you:
http://www.java2s.com/Code/Java/Swing-JFC/AppletandSwingComponents.htm
0
 
mock5cAuthor Commented:
@Valeri:

>> I am only interested in the header information.
>So you have to parse on the client side. Why to transfer so many MB, if you are interested in small part of >this information?!

I'm interested in validating information in the header.  If validation passes, then I'm interested in the bmp portion of the file.  If the header validation fails, the bmp is no good to me and I don't want to transfer it.

>So transfer only the data structures retrieved from the headers.

That's the problem.  How do I parse the files and create the data structure on the client side and send this information back to the server.  It is all server side now.  If applet is the solution to this, then I will research it.  Thanks for the link.


0
 
CEHJCommented:
You can do all the validation at the client, just as you would have validated it at the server
0
 
mock5cAuthor Commented:
@CEHJ: You mean validation at the client by using applet, correct?
0
 
ValeriCommented:
>> How do I parse the files and create the data structure on the client side and send this information back to the server.
Starting applet on the client side will start jvm. So you can define your own structures, to parse the files, define your own classes...everything!
As CEHJ said : "You can do all the validation at the client, just as you would have validated it at the server"
0
 
CEHJCommented:
>>@CEHJ: You mean validation at the client by using applet, correct?

That's right
0
 
objectsCommented:
> @CEHJ: You mean validation at the client by using applet, correct?

you should validate at the client *and* the server
just validating client side is generally not sufficient
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.