ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
- you do not need a RTOS. Any linux would work fine. If you want a small OS only for your system then I would use DSL or tinycore.
- I would use LAMP for the presentation of the data and use any browser as client(this will save you a lot of problems). To collect the data I would have a demon runnig and feeding the database. The database would become your intercommunication tool. LAMP is not so hard to set up. To do the web pages in PHP is also not to hard but sql might be. To write the demon is a harder job if its done in c for example. Maybe Perl is a easier and better choice.
- You could make the hole system run on windows, mac, linux etc.
- so you need to learn
sql, html, php, c or perl and ofcourse programs like mysql, apache, linux etc.
As suggested maybe its better to pay for the help doing these parts and you can devote your time on marketing, selling etc.
Good luck and we are here to help.
and if you do not like eclipse try netbeans with git or subversion.
and you could make the hole system as a blackbox running a small webserver and the demon under linux. You would connect it the the localnetwork (ethernet) and connect all the watteringunits to the serial port or usb via a converter. Like a router!
Last edited by kalleanka; 11-14-2011 at 08:04 AM.
1 members found this post helpful.
Click here to see the post LQ members have rated as the most helpful post in this thread.
Kalleanka may be correct. Running as a browser only the daemon would have to change for windows, mac and linux. The browser would already be there for the system and apache and MySQL exist for all three platforms. This would be especially true for HTML5. HTML5 works on smartphones and now in automobiles plus it would work for all browsers seamlessly. I guess I could limit parameter changing to the host machine or maybe live dangerously and let the user change parameters anywhere in the world. Java would then only be needed for javascript in the html.
Perl is interpreted, you can write the script once and it'll work where there's a perl interpreter installed, whereas a C program needs to be recompiled for each OS (Windows, Linux, etc) and machine architecture (x86, ARM, etc).
This relates to why people like Java, it's compiled but to a intermediate level where it'll still run anywhere there's a JRE.
Javascript is interpreted, like Perl, so you don't need to worry about if the browser's on a phone (ARM), PC (x86), or other.
To Proud -- Things are look as if I will have two approaches 1) for large systems I will have a PC running linux that will communicate with the RS485 system via a daemon and and two the outside with apache. I am wondering if I can make it an ISP and make it connect directly to the internet. For the other 2) I think the device can exist standalone without a PC. This would be for small applications of only stand alone mist sensors. If the user wants to change parameters in the mist sensor he can buy a small linux PC from me to do so. It would not be cheap but not very expensive either. I would not use the users PC running windows or mac to do the connection. They would have to buy the linux pc from me. Alvin...
AFAIK you can have a Java program/service running without a GUI or specific desktop user logged in, yes. It would still be technically run under a specific user account, but that's like any service and just how OSs work unless you move the process into the kernel.
The same way you'd launch any other service or daemon? Using the OS's startup scripts. For Linux I believe that's the init or systemd mechanism. Windows has the Service Control Manager. There seem to be a variety of wrappers available, such as http://commons.apache.org/daemon/jsvc.html
A daemon is a process which has detached itself from its initial controlling terminal. I'm not sure if/how that can be accomplished in Java. It isn't strictly necessary to daemonize all services, and depending on the application, it might be undesirable if, for instance, there is an interactive component to it. There is a fairly well defined structure for starting, stopping, querying, and restarting services in Linux. Sometimes, it is as simple as adding a line or two to /etc/rc.local
Supposedly Python is interpreted on Linux, Windows and the Mac. Would that be an alternative to Java to be cross platform and could I do a daemon with Python? Thanks. Alvin....
You can use the python-daemon 1.5.5 to daemonize Python programs. Yes, Python would be a cross platform alternative to Java, in my opinion. If it was my project, I think I would probably chose it over Java for non-GUI applications. Possibly even for GUI applications.
I am using the Python book "Python Programming and GUIs for Electronic Engineers" ( http://www.elektor.com/products/book....1320886.lynkx ) which is great for me - Also goes over apache, html needed and server side Python code. Thanks for you input on what you would do if you were building the project. Alvin...
Even though its not directly related to this thread...
Quote:
Originally Posted by aspire1
For what it's worth and it may not be relevant to what you're doing...anyway.
I recently had to devise a way of connecting an Arduino connected via usb/serial to network. I used a java program accessing the serial port. I delegated
responsibility for syncing read/writes and providing data to the arduino. Arduino sent a handshake to the java program when it wanted to send data
and Arduino sent a handshake to the java program when it was available to receive data. I cached the data sent from the Arduino in the java program
using a map so any clients that connected didn't have to directly read from the Arduino. The Arduino would constantly update the data in the java program
map.
Clients connected via sockets to the java program. I used apache and Php to pass through client connections ( inefficient under lots of connections
but it meant I could use Apaches security features). No reason why browsers couldn't connect directly to the java program though.
The requests to write would be forwarded to the java program which would queue them and send them down the usb/serial to the Arduino.
The model may be of use or not.
My home automation project to involves Micro Controllers talking over RS485 and tied to an Ubuntu Server.
Ive developed a Java GUI with the Swing library and is deployed as a Java Application - not an applet.
My problem, How can I remotely access the Java application which is running on the server since the GUI is not a web-app/html?
As described below?
Quote:
Originally Posted by aspire1
I used apache and Php to pass through client connections ( inefficient under lots of connections
but it meant I could use Apaches security features). No reason why browsers couldn't connect directly to the java program though.
If I need to start a new thread please let me know.
thanks for any help in advance!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.