Re: Embedded JavaSpaces
Jeff Ramsdale <[email protected]>
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <6E58A7C8A2126D44ACBC06D1DA24CFD1EBF87F@blv2-exc-01.siq.solutionsiq.com> |
> Jeff Ramsdale wrote: > > I've Googled around a bit and haven't had much success finding > > examples of folks using an embedded JavaSpace in their applications. > > It's not possible to run an embedded JavaSpace with the starter kit > > (Porter) code, is it? I belive Blitz and GigaSpaces both > have embedded > > They (Blitz and GigaSpaces) do indeed. > > Haven't really looked at Outrigger's code but I suspect it > wouldn't take much hacking around with the newly open-sourced > code to get an Outrigger running locally and passing > operations in and out of it. Ok > You might need to implement your own local transaction > manager to allow you to perform atomic operations but that's about it. I saw something about that in Blitz and didn't think through it. That makes sense, though. > > implementations--are there any others? I imagined it > wouldn't be hard > > What criteria did you have in mind? Basically I was hoping for transparent switchability between a local and foreign JavaSpace based on a user configuration at runtime. That is, a properties file could indicate whether the user wanted to run in a local distributed mode. The embedded JavaSpace would always be used but additionally the remote JavaSpace could be used if the appropriate property were set. > > to write one though I'm not sure my skills are up to the task. Any > > comments? Links? > > > > Depends exactly what you want - how many of the features of a > JavaSpace do you really need? > > IMHO (as an implementer), I'd say it was damned hard if you > need all the usual functionality, to write an implementation > yourself. There are a surprising number of places where you > can get deadlocks, race conditions, state stability problems > and issues with blocking takes or reads (just when have you > considered all possible current matches?). I clearly wasn't thinking it through all the way--I haven't yet delved into transactions, so they didn't enter my thinking (I'll get there!). We've written a wrapper for JavaSpace that deals with some of the threading issues one runs into with normal JavaSpace use so I can certainly understand the possibility for problems. (Incidentally, is there a semi-standard way of interacting with a JavaSpace to deal with the threading issues and notifies, etc., or does everyone write their own helper utility?) > > In my specific application I have work I want to expose to remote > > workers via a JavaSpace but I think it would work well to > have workers > > local to my application as well. So I imagine having two > Spaces--one > > local and one remote--that allow me to selectively remote > my work or > > not. I'd be interested in other implementation ideas too, > though I'm > > curious about the issue of embedded JavaSpaces... > > > > Can't really contribute any other ideas but ask me more > questions and I'll try and satisfy your curious nature :) Don't know what I would add to the above. I imagined that it would be a somewhat common pattern to have applications doing work that would distribute some things and not others (perhaps based on configuration), suggesting the pairing of a local JavaSpace with a remote one. Guess not? > Dan. Jeff | Jeff Ramsdale | | SolutionsIQ | | Bellevue, WA | =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff JAVASPACES-USERS". For general help, send email to [email protected] and include in the body of the message "help". To view past JAVASPACES-USERS postings, please see: http://archives.java.sun.com/archives/javaspaces-users.html JDC members can download the JavaSpaces(tm) Technology from: http://developer.java.sun.com/developer/products/jini/