LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-01-2011, 03:28 PM   #76
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 352

Original Poster
Rep: Reputation: Disabled

If I can use MySQL in the installer then that is what I would use as it would handle multiple accesses and would probably be able to serialize io to create order. A big problem here is that I have never used these packages so your input helps.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-01-2011, 04:25 PM   #77
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi again -
Quote:
If I did use SQLite I would most likely need to run it as a SERVICE in its own right
Absolutely not. SQLite may be USED from a service, or it may be used from a simple program. But, unlike MySql or PostgreSQL, SQLite does NOT entail any "server programs". It's much more like MS-Access or a flat file. It is *not* a client/server database like MS SQL Server or Oracle.
 
Old 09-01-2011, 09:33 PM   #78
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 352

Original Poster
Rep: Reputation: Disabled
Let me explain once again what I am doing. I invented a device that controls misting in plant propagation using cuttings. It measures the dielectric constant of water on the sensor and from that information tells the amount of water on the rootless plant. If the plant receives too much water it can rot and die. If it receives too little water it will dry up and die. This is the only product that works well enough to close the loop in plant misting for this field. The way they do it now is with timers which cause the plant to die with not enough water fast enough or rot. This device is to be used by plant propagators in wholesale nurseries that do 3 to 30 million a year in sales. After the plant groew roots they want to change parameters in the devices to harden off the plant. This is where the network (RS485) and computer (PC) come in. These people can aford to spend the money buying a computer running Linux. I chose Linux because it is suppose to be stable. I was wondering how to communicate between apache and my program and that is why I started a link on the newbie part of this forum. I was moved to this section because I was told it did not belong to the newbie section. Since then I have added a fuction to my device that also takes care of hardening off . This opens the the field of buyers to the onese and twoses of buyers with small systems. (the wholesale people would buy 40 devices or more). The small systems cannot afford to buy a seperate PC running linux and since IBM's name was on the original PC they and everyone following them (MS) got 80% of the pc market. So with this new group of buyers they would most likely have windows. So now the focus has moved from linux to windows. I may still use a linux system for the big boys but now I have to make it work on windows first. Actually it will need to work on linux, macintosh and windows. That is where java come in. If the person already has a pc running windows then all I have to supply to them is a usb to rs485 converter and the software to drive it. I need to collect data from the devices for information proving that the system works and showing the big (and small) user how often it comes on over a day week month or whatever. That requires a damon or SERVICE for ms windows running in the background all the time. It polls the devices and puts the data in a database. The user sees a gui program which also would need to communicate to the database. For the big systems an apache server would allow them to access the system at home so they can rest assure that all is working.

What I need is a stable system. If MySQL is stable and works under windows, linux and the mac then that is what I need to use. I have never distributed a system before so I guess I could install MySQL from installshield. It will also have to install the SERVICE/damon and the gui user program. I will need three machines running so I guess I will have to invoke the jre on two of them. The only reason I am using java if for portability. It will probably take me an extra year to come up with this stuff. Why don't I get someone else to do it ? because I don't have the money. I have been involved with computers on a daily basis in hardware and software since 1968 so I know what I am doing enough to do this project. Your thoughts are welcome.
 
Old 09-01-2011, 09:39 PM   #79
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 352

Original Poster
Rep: Reputation: Disabled
I realise SQLite is a set of routines. What I was saying is I would have to write a program using SQLite that wouls run in the background as a ms SERVICE or linux daemon.
 
Old 09-02-2011, 01:56 AM   #80
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -
Quote:
I realise SQLite is a set of routines.
No offense. I wasn't sure, and it was an important enough distinction that I wanted to be sure *you* fully realized this. Cool
Quote:
it will need to work on linux, macintosh and windows. That is where java come in.
I agree - an excellent choice.
Quote:
What I was saying is I would have to write a program using SQLite that would run in the background as a ms SERVICE or linux daemon.
Well, actually - since you're discussing something more than a simple .exe talking to a local database, it sounds like MySql might be back in the running as the preferred choice. But Sqlite is definitely still an option, if you wish.

And I noticed you discussed the Java service wrapper in another part of this thread. I've used them in the past (for JBoss, in a production environment). It will definitely do the job for you.

Quote:
The user sees a gui program which also would need to communicate to the database. For the big systems an apache server would allow them to access the system at home so they can rest assure that all is working.
Strong suggestion: I would definitely consider doing the ENTIRE user interface as a WEB interface. HTML is light years easier to write than Java Swing, and I would argue that with a little CSS and a little help from an artistically inclined friend or colleague, the GUI would also be far more appealing.

You have two main choices:
* Write your web stuff in PHP (my recommendation)
... or ...
* Include Tomcat in your Apache server, and use JSP (this would allow you to keep "everything in Java")

To summarize:
* You can use Java as a service to interface with your hardware
* You can write the data to MySql from your Java service
* Apache integrates well with MySQL, and can provide an excellent user interface
* You can write your web server-side code in PHP or JSP (among many other alternatives)

'Hope that helps .. PSM
 
1 members found this post helpful.
Old 09-02-2011, 12:04 PM   #81
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 352

Original Poster
Rep: Reputation: Disabled
To Paulsm4: Thank you for your reply. I would love to do the user interface with html. I guess I could include the apache interface in all versions but I have one problem in that I was considering not being able to update the boxes via the internet due to the fear of having a hacker get into the system and set parameters that would destroy the growing plants and make me liable to a lawsuit. Thus the reason for the local gui.
 
Old 09-02-2011, 01:25 PM   #82
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Using any HTTP server, it should be easy to limit access by IP. Allowing HTTP requests only from localhost would make the system quite secure. Having said that, I would not be so quick to assume that HTML is the best option for a GUI (although it may be). While the implementation side may be simpler, it may be restrictive in the kinds of things it can do. HTML is not well suited to UI's which are highly interactive & does not provide the kind of responsiveness that a Human-Machine-Interface (HMI) may require. There are ways around this, such as the use of AJAX and/or Java applets running on the browser, however these are still limited by the capabilities of HTTP, and end up adding complexity anyway. HTML is intended primarily as a presentation format, with limited capacity for interaction through HTML forms. A proper HMI will provide a richer set of widgets that are tailored for control system style applications. If you make use of the existing toolkits and play your cards right, you may be able to assemble the GUI component by writing zero code. A control system is very often composed of process variables which change asynchronously and on an unscheduled basis. HTTP, with its request-response paradigm, does not accommodate such behavior well, and a protocol using a publish-subscribe mechanism is often more appropriate.

Have you thought about other client applications that may emerge over time, such as data logging, alarming, integration with other software (business related, perhaps research oriented, etc), higher level controls such as sequencing, integration with other control systems such as building mechanical controls, weather data, etc? The protocol(s) you implement now for the GUI can and should also be capable of supporting any of the kinds of applications I mention here, if they are going to be used. Some thought and work up-front seems prudent.

--- rod.

Last edited by theNbomr; 09-02-2011 at 01:26 PM.
 
1 members found this post helpful.
Old 10-18-2011, 09:42 AM   #83
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 352

Original Poster
Rep: Reputation: Disabled
I posted the following question on UBUNTU forums in the absolute beginner forum four days ago but never got a response (it is gigantic) maybe I could get help here --
Hi -- I have the 10.4.3 CD that loads fine in LIVE mode and UBUNTU comes up ok. I clicked install on a brand new 160mb IDE drive (only HD in computer) and after the install I get BOOT DISK FAILURE. My BIOS is set up for CDROM,C,A (would like CDROM,A,C but can't get it). HD is in C SELECT mode. From an other post I redid the install and click ADVANCED on the last page and Boot sector was checked as well as the SDA (I am a newbie to LINUX) was set to the hard drive (the only partition that appeared on the list). So it looks like it should write the boot sector correctly. any ideas? Thanks. Alvin.....
 
Old 10-18-2011, 10:54 AM   #84
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
You'd be far better reposting/having this split into a new thread in a different forum here, it's not a programming question or related to this topic.

If the HDD's in Select mode, is the jumper on it right, i.e. is it set to Master if it's the only one, and on the right connection?
 
Old 10-18-2011, 12:16 PM   #85
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 352

Original Poster
Rep: Reputation: Disabled
I switched to dev/sda1 and it came up with ERROR: OUT OF DISK and then said grub rescue> so I guess I loaded ubuntu from the hard disk. I used the ubuntu install defaults and it took 158mb of my 160mb hd. I will repost if need be. Thanks.
 
Old 10-22-2011, 08:24 PM   #86
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 352

Original Poster
Rep: Reputation: Disabled
Found it!

To end the discussion on my Linux UBUNTU problems I was getting OUT OF DISK message. I found that the 4 $ computer's BIOS stated that the hard disk was 8.4+ gig ( an old computer). My disk is 160 GB. So during the install (remember i do not know what I am doing) I set up the root partition ( / EX4) to 7 gig and the swap area to 1 gig. After I did that it would not load but I found in a kindle book I have on UBUNTU the command >sudo grub-install sda< which I modified to sda1. I ran the CD live version of UBUNTU and entered that command. and restarted the system. It coughed a few times but finally loaded UBUNTU from hard disk. I am writing this from Firefox under the UBUNTU I loaded. Also, I purchased a wireless card for the 4$ computer but was worried that the CDROM that came with the device only worked under windows. But UBUNTU recognized the wireless card and all I had to do was to supply the WPA code to get into my wireless router. SO I am totally amazed by Ubuntu. The EAGLE PCB program I use for may business will run under linux, The CCS C compiler for my PIC microcomputers also works under linux (but not the IDE) so with the supplied Open Office supplied with UBUNTU I really do not need windows.
 
Old 10-23-2011, 06:53 AM   #87
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Sounds good man, cheers for providing useful steps/hints for others. And it seems a good time for a friendly reminder that it sounds like FOSS made this possible, so being as your original business system was a software+hardware combo iirc, will you be opening the software's source (if only directly to your customers) under something like GPL to allow others to tinker & tweak should they want to?
 
Old 10-24-2011, 11:51 PM   #88
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 352

Original Poster
Rep: Reputation: Disabled
Would not be open source as this is a product that must work and not be changed as that would make manufacturing impossible.
 
Old 10-25-2011, 08:52 AM   #89
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
I think you misunderstand me or what FOSS is. The product you deliver to your customers would be exactly as you wish and your support contract can specify that you only cover the original setup plus your supplied updates. You're just also giving a copy of the source code or a link to obtain it from.

Should they find a flaw with or wish to change the behaviour of the system, with the FOSS stack you've built it on, they'd probably still need your specific bit to be open-source for them to see the code and how they could help fix bugs or contribute development time & effort.

If they wished to modify the behaviour so as to not be compatible with your delivered system, you'd be under no obligation to support this derived work, and they'd have to provide the source for their changes if they shared it (assuming you used something like the GPL) so you'd be able to see how they're doing things differently if you wanted to absorb that feature back into the main product or make a second type of system.

If you have a concern that their access to the source would expose your system to malicious intent, I'm afraid you're just practicing security through obscurity, and your system is either designed to securely communicate and validate inputs, or not.
 
Old 10-25-2011, 12:00 PM   #90
schmitta
Member
 
Registered: May 2011
Location: Blacksburg VA
Distribution: UBUNTU, LXLE
Posts: 352

Original Poster
Rep: Reputation: Disabled
I will have to lookup FOSS with google. First cut I would not be open source as I have too much work to do in too many areas. Maybe later on it could be released open source. This would be a turn key system with the user not getting involved with the software other than to use it. I could probably update the software over the internet. Malware would be a problem for me. I am new to open source anyway as far as management, control, etc.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Enterprise LAMP Summit & Big LAMP Camp LXer Syndicated Linux News 0 09-21-2009 01:51 AM
LXer: LAMP vs. LAMP Rematch LXer Syndicated Linux News 0 11-08-2006 03:03 AM
A program for FC4 to communicate with a Windows Hyperterminal Program at other end vhasun Linux - Software 2 05-19-2006 02:54 PM
My C Chat Program is unable to communicate. mcp_achindra Programming 1 03-20-2004 10:04 AM
program to communicate directly with ethernet sabby Programming 4 12-18-2002 11:37 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration