View Full Version : Using Linux/Java as a back-end
mrallen
March 3rd, 2003, 07:30 PM
Stewart here. The Tonto guy. You might have noticed that Tonto is written in Java. And that's partly because everything (and I mean everything) in this house runs on Linux and Java. Now that I've recently come to the NetRemote party, I'm interested in using it to control/monitor some of my systems. Problem is that just about everything here is geared towards Windows. What I really need to know (in order to build a Java dispatch server) is what's going on at the network/socket level. I built a crude Java server to emulate Girder receiving commands, but NetRemote doesn't like to talk to it. It hangs after the password negotiation (but the sample Java code on Girder's site likes it).
Sooo, what I'm looking for is just enough information to implement a server to receive events over tcp sockets when a button is pressed. On the flip side, I need to send updated information to NetRemote to change the display. Since I will be coding this from scratch, the API's do not apply.
Any and all help is greatly appreciated.
mrallen
March 3rd, 2003, 11:52 PM
Also looking for implementation details of the NRIR server. I'd like to also be able to receive IR for pass-through.
brohebus
March 3rd, 2003, 11:57 PM
Also looking for implementation details of the NRIR server. I'd like to also be able to receive IR for pass-through.
DaveT is the man for NRIRServer.
You have much stronger convictions than I - I would have caved and set up a Win32 box rather than take the road less travelled.
-Dave
mrallen
March 4th, 2003, 01:02 AM
I can't wait around for someone else to build it for me. And I can't run a server that requires a mouse, monitor and permission from Redmond to boot up.
brockgr
March 4th, 2003, 03:06 AM
In related news - Jon Rhees just posted up the spec for the USB-UIRT protocol - so a linux driver is nearly here.
:arrow: http://166.70.183.44/phpbb2/viewtopic.php?t=25
Mastiff
March 5th, 2003, 01:54 AM
mrallen, what permission? Haven't you heard about hacking? :twisted:
mrallen
March 5th, 2003, 05:47 AM
what permission? Haven't you heard about hacking?
hacking. yes. I've been doing that for more than 20 years. you're talking about cracking. no, thanks. not interested.
Ben S
March 5th, 2003, 09:15 AM
Can you send me your java version of Girder? I'll step through NetRemote and see what it thinks its doing. I want to make this work for you, sorry it's not working yet.
Can you send a PM to Dave T. about NRIRServ? He's the keeper of the code on that one. I can send you details about what I'm sending. I'll send that to you via email in the next day or so.
Mastiff
March 5th, 2003, 09:22 AM
mrallen, I beg to differ. Cracking is per definition illegal and a breach of copyrighted material if you do it with software while hacking can be almost the same procedures (I know the original definition of hacking, I'm close to 40 years old and have been there all the way, from BBS and up), but does not have to violate any laws to be real hacking. Using a corporate key for Win XP that you don't need to activate every time you re-install or change more much on your computer than Uncle Bill likes is not illegal, at least not in Norway. In other words it's not cracking. Anyway, back to subject, I always seem to go off topic whenever Linux comes up. Using that for anything except a basic file and Internet server really comes under the definition of hacking! :wink:
mrallen
March 5th, 2003, 09:34 AM
mrallen, I beg to differ. Cracking is per definition illegal...
exactly. my comment about 'permission from redmond' has to do with XP EULA, MS data collection and system intrusion practices. and since I can't in good conscience agree to these or pay for more MS licenses... I run Linux. Linux runs my house. It will also run my theater when I get my custom distro completed.
Mastiff
March 5th, 2003, 09:47 AM
I agree with you in principle, but I haven't got time for an OS that is hands-on as much as Linux is, I prefer ready made solutions (well, ready after a few hundred upgrades...). XP is very stable for me, with a minimum of tweaking (most regards ATI drivers) and I find more enjoyment in the few minutes it takes every now and then to get around Micro$ofts sneaky tricks. Must be annoying to spend weeks on some "security" measure only to see it getting blown open by a 15 year old two days after release... :D
brohebus
March 6th, 2003, 08:58 AM
Must be annoying to spend weeks on some "security" measure only to see it getting blown open by a 15 year old two days after release... :D
I'm pretty pragmatic when it comes to OS software - I'll use whatever gets the job done best. I currently have several Windows boxes, a RH 7.3 box running my personal mail and webserver, an older Apple (System 8), and even a 3Com Audrey running QNX.
However, I use primarily use my computer to do things, which requires certain applications, and Windows has better application support for the types of things I do. I would swing to Linux the second it could offer me the functionality of QuarkXpress, Illustrator, Photoshop (no, Gimp doesn't count), and solid DV editing. I would prefer to use Apple, but their hardware is too expensive IMHO.
Linux has come a long way since my first experiences with it RH 5.0), but hasn't reached critical mass of applications yet for the type of stuff I do. For general internet office work, I think that Linux has a chance to make some inroads. However, it still needs a bit of work. For example, why in god's name do you still have to use xf86config to change the desktop display resolution - if there is one thing you should be able to do in a GUI, changing the screen res should be it. I hear that they've added a GUI config tools in RH8, so maybe I shouldn't complain anymore.
Anyway, I'm rambling. I agree that MS' licensing practices are insidious. I work with Microsoft as part of my job. Most 'Softies are decent, smart people - it's their soul-sucking executives and enormous legal department that are evil.
-Dave
mrallen
March 6th, 2003, 11:53 AM
'pragmatism' is one of my core tenets. I'm nothing if not deeply pragmatic. but (and there's always a but) for people like me there is an ever-thinning line between pragmatism and laziness. the line gets thinner as linux and osx offer more; the excuses sound more hollow.
granted, I spent may years using the very apps you mention. linux can't offer these, but osx does (mostly). so I use osx right now for video editing. linux is still my primary desktop (and has been for 5 years) because I still spend most of my time writing code. but I still have all of the 'office' apps I would ever need (mozilla + openoffice).
I'm very concerned about a digital future locked up in proprietary 'rights management' spearheaded by media industry and controlled by microsoft. very orwellian things are afoot in the good old USA and not just in redmond. so I choose to expend my energies supporting diversity, freedom and choice. I will take the path less travelled because I now firmly believe the alternative leads over a cliff.
[ms stuff deleted - apologies for the rant]
so it costs me a few more bucks and more of my time to go this route. but what i've gotten in return is priceless.
QuickCarl
March 6th, 2003, 06:13 PM
Fellows... please... we don't need MS bashing... I understand all sides, most people with a brain do.
Stewart - you have one heck of a great program!
Can't wait to see ALL the elements come together to make the ULTIMATE remote control... JMO-Carl
brohebus
March 6th, 2003, 09:51 PM
Stewart-
I hope I didn't come across as critical of your stance as I completely agree with your approach. For general office use Linux is 80-90% there depending on which distro you use; but while there are many open source alternatives available to people, many are not inclined to use them due to fear or misconception.
Prior to my current job, I used to work for a company that developed Linux software solutions, so I have plenty of experience with the merits and advantages of open source spftware. I would probably be a larger advocate of Apple if it wasn't for the fact that they are as highly proprietary as MS is. I sincerely believe that their 'open source' stance is nothing more than self preservation - the move to open source underpinnings only came after years of trying to develop their own closed systems (Copeland anyone?). Somehow, but due to their underdog status, Apple has managed to co-opt the techno-libertarians to empathize with them, although Apple is just as profit driven as MS. Must be those black turtlenecks Steve Jobs has taken to wearing. :lol: I believe that if Apple commanded a larger chunk of the market, they too would start throwing their weight around in a manner that would distress a lot of users. But that's a story for another day.
I currently work for a company that develops specialized cryptographic systems, and prior to that contracted with a firm that developed DRM solutions, so DRM is a topic that I watch very closely. Even though I see advantages to it from a business perspective - legitimate copyright holders do have the right to enforce how the content they created is used and DRM is one tool that can aid in the achievement of this goal in the lawless digital fronteir - I too have concerns about how it will affect my right to enjoy digital media. In virtually every situation that I come across, DRM, as many media companies envision it, will do mothing but severely impinge on my rights as a media consumer. I can asure you that based on my professional experience, things are set to get much worse before they get better in the DRM realm.
In the short term, my forecast is bleak, but it is my belief that in the long run, it will be the consumer, not the media and software conglomerates, that will dictate how stringent a yolk DRM places on media consuming public. The customer will vote with their feet. We have seen this already with the DRM crippled DiVX DVD (not to be confised with the CODEC for the uninitiated) system launched by Circuit City. I forsee that it will be the average consumer, rather than the black hats and crackers, confused and angry over the fact that the DRM 'enhanced' CD they 'bought' will only play in a specific device, requiring a second , or even third, copy to play in the car and office, that will ultimately 'break' DRM.
The odd thing is that the encryption techniques long trumpeted as a means to ensure privacy and security in the digital realm is now the very thing that is being repurposed to power the much despised DRM. Ironic how things work out sometimes. :(
-Dave
mrallen
March 6th, 2003, 10:09 PM
Apple is no saint. No delusions there. But OS X brought me back because it's at least Unix. And it covers the areas that Linux doesn't. Plus, the enemy of my enemy... (figuratively)
hadees
July 13th, 2003, 03:46 PM
so how is the linux back end comming? might i suggest making it interact some how with lirc, since it seems every linux program in this area seems to use that. That way you also wouldn't need to change MythTV or Freevo to use it.
mrallen
July 13th, 2003, 04:26 PM
I haven't had time to work on it in the last couple of months. I expect to start working on it again in a couple of weeks. I've looked at lirc for possible integration. It's too early to say how I will implement most things.
hadees
July 14th, 2003, 05:10 PM
it doesn't have to be interaction as much as emulation. The programs on linux that you would use it with (just a guess here) is MythTV (http://mythtv.org) or Freevo (http://freevo.sf.net). Both of them use lirc to get commands from remotes. I think you can use keyboard commands also but I think intigration into existing programs may be easier.
Just my two cents. I am also a programer so if you need any help I would be glad to help.
~Hadees
mrallen
July 14th, 2003, 08:59 PM
thanks for the feedback. i'll let you know when i start coding again.
Aaron
July 14th, 2003, 08:59 PM
Linux / Java backend thoughts...
Myself being a long time Microsoft user and former Microsoftie (that means MS employee)... This may surprise you...
Stewert, I think you did a tremendous job with Tonto though I have had problems with Java Engine performance (lock-ups, extremely long delays in the app, etc) so I'm not sure if it was the Java or some program bugs.
BUT,
I'd love to see a Java based "server" side for NetRemote.
In a previous post of mine, I mentioned that I'd like to see a "remote" version of Netremote. So the client postion is small and only receives video display and sends mouse/keyboard commands.
This way you could have a central server (MS or Java) and ANY client with a small "display" app built for that platform.
Sort of like remote desktop or terminal services for Netremote.
this would greatly increase performance and allow for many other benefits such as secure logon per device/user, device/user customizability, central control, etc.
thoughts guys?
mrallen
July 14th, 2003, 09:50 PM
There are historical reasons why the renderer in Tonto sucks; it's not entirely Java's fault. When I started Tonto, I knew nothing about CCFs or Prontos and a lot of incorrect design assumptions were made. So it's usually only a problem with large color CCFs. I've begun to build a new renderer which is much faster and consumes less memory.
I think a 'remote' version of NetRemote would be very cool. It's a greater departure from CCFs (more like CCF browsing/caching) which I think is worth exploring.
A cool use of bluetooth, for example, would be for devices to advertise a control CCF interface. When you walk within range, NetRemote would pick up the CCF and display it.
hadees
August 8th, 2003, 09:00 PM
any progress yet?
mrallen
August 8th, 2003, 09:08 PM
I have a decent chunk of a new renderer written. Whether or not this goes live in the current version of Tonto is another matter. It's possible that I will fork the current source base and begin to build a NetRemote-only version. That would speed things up a lot and make it easier to switch to a new renderer. Because building the renderer is the easy part. Hooking it up to copy/cut/paste/undo/redo is the *real* work.
hadees
August 13th, 2003, 04:57 PM
How are you going to have it send out keys? will it just act like a keyboard or are you writing it to integrate into applications? My ultimate goal is to get this to control Mythtv (http://mythtv.org).
mrallen
August 13th, 2003, 09:36 PM
ahh. first, i would like some integration w/ lirc. second, i would like to make it easy to either write java modules and/or do simple scripting callouts (like bash or python) through a simple config file.
hadees
August 24th, 2003, 12:27 AM
lirc is fine with me. Any thing useable yet? Still willing to help out
mrallen
August 24th, 2003, 03:00 PM
sorry, no. I have not had time to work on it.
hadees
October 28th, 2003, 09:32 PM
I guess you still haven't had time to work on it. Like i said originaly i am intrested in helping out if you could point me in the correct direction or give me what ever stuff you have already done that would be a great help.
Thanks
Hadees
hadees
March 8th, 2004, 02:38 AM
just wondering if there was any progress made
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.