Architectural advice

Hi,

I'd like to write for the sake of learning a small system that reads temperature and humidity via some sensors with ethernet interface, and shows the results on a web page, using the same method for configuring the system.

If I should write it in C++, I'd write a service or a deamon (depending of O/S: windows or linux) that fetches data from remote sensors, stores them in a DB and sends a signal to another process when something is wrong (e.g. temperature is too high or too low). This process receives the signal that something is wrong, analyze it and pages a human user in order to inform him about that matter.

My questions are:

1) From an architectural and Java-J2EE-J2SE ecc ecc point of view, is this structure correct? For correct I mean, for example, if I say: "I write directly to the DB", you may answer "use a persistance layer"

2) If yes, what is the Java equivalent to windows services/linux deamons?

Thanks a lot

sandman42

[996 byte] By [Sandman42a] at [2007-11-27 5:04:49]
# 1

> 1) From an architectural and Java-J2EE-J2SE ecc ecc

> point of view, is this structure correct? For correct

> I mean, for example, if I say: "I write directly to

> the DB", you may answer "use a persistance layer"

You have an external system you keep polling. Not much of a structure/architecture so far, IMO, and it's not like you have an alternative (unless the sensors have some way of notifying you). so I don't really know what you'd like to hear.

> 2) If yes, what is the Java equivalent to windows

> services/linux deamons?

http://wrapper.tanukisoftware.org/doc/english/introduction.html

CeciNEstPasUnProgrammeura at 2007-7-12 10:23:14 > top of Java-index,Java Essentials,New To Java...
# 2

I'd like to hear nothing special but there are many ways to do the same thing.

Java "system" (let me call it in this way) is organized and structured in his own way, so what I'd like to hear is "do it in this way", i.e. "use this technology, since it's the java way to do that/since it's the ultimate technology availlable"

Let me do a silly example: if somebody asks: "I'd have to store some date and times in a DB. SInce they come from a device that sends me data in ASCII, I'd store them in a CHAR field", I'll answer: "use DATE field, because etc.etc.etc".

This is obvious, but from the experience of the folks here, if somebody has a similar idea, I'd like to hear from him/her.

Anyway, thanks for the wrapper link.

sandman42

Sandman42a at 2007-7-12 10:23:14 > top of Java-index,Java Essentials,New To Java...