|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
News
News
News
|
Messages: 51
Messages: 51
Messages: 51
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
Dan Creswell: How to write a JINI Service
Dan Creswell, in "How to write a JINI Service," shows the simplest of simple JINI services including support for the service starter, a reasonable amount of control over reggie discovery/registration ("reggie" being the JINI lookup service), codebase and configuration.
He walks through the entire deployment process, including defining the interface, writing the service implementation, building a .jar, and writing the configuration files (a step often slightly skipped in J2EE deployment tutorials, when considering application-server settings like security configuration), and running the service.
His conclusion: Writing a JINI service isn't any more difficult than writing an RMI service. We've used a fair number of built in JINI facilities like the service-starter which we don't need to use but it saves aggravation in the long run because it gives us easy configuration facilities (including fully remote deployment with everything sourced from a webserver), removes all the nasty boot code boilerplate (like setting a security manager). However, considering the amount of code in the tutorial, the question has to be asked: is there a simpler way to approach this? Should there be?
|
|
Message #195793
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Hi,
Isn't JINI a technology in coma dying a very slow death?
J
|
|
Message #195797
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
However, considering the amount of code in the tutorial, the question has to be asked: is there a simpler way to approach this? Should there be? Well, some of the code in the init method (which is by far the largest piece of code) is basically still boilerplate and could easily be placed in a generic helper class. In particular the bits associated with building a proxy, and the configuration stuff (which in this case is just the usual export control and configuration stuff).
'Course, I'm not going to say it's perfect (nothing ever is). There are various tools around that make this even easier like the Inca X plugins for Eclipse etc.
|
|
Message #195802
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
However, considering the amount of code in the tutorial, the question has to be asked: is there a simpler way to approach this? Should there be? Well, some of the code in the init method (which is by far the largest piece of code) is basically still boilerplate and could easily be placed in a generic helper class. In particular the bits associated with building a proxy, and the configuration stuff (which in this case is just the usual export control and configuration stuff).'Course, I'm not going to say it's perfect (nothing ever is). There are various tools around that make this even easier like the Inca X plugins for Eclipse etc. Dan, if it's boilerplated stuff, perhaps it should indeed be put in a helper class - or at the very least, a helper library (think of how commons-mail handles the typical case of *just wanting to send a freakin' email!*)
|
|
Message #195817
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Seems like Spring and Aspects could help alot. Okay, that's a bit opaque for me - could you give an example of your thinking please?
|
|
Message #195823
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Define service interface. Write generic proxy that will look up actual JINI service proxy and delegate calls to it.
Same concept applied to EJB, RMI and WebServices.
|
|
Message #195828
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Define service interface.Write generic proxy that will look up actual JINI service proxy and delegate calls to it.Same concept applied to EJB, RMI and WebServices. Ah, gotcha not where my mind was going - thanks for the clarification!
|
|
Message #195872
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Hi,Isn't JINI a technology in coma dying a very slow death?J you're an idiot.
c
|
|
Message #195878
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Hi,Isn't JINI a technology in coma dying a very slow death?J you're an idiot.c
Do we have to sink to the level of Slashdot? Surely a better response is to provide evidence of continued use of and interest in JINI rather than personal insults?
|
|
Message #195883
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Jini is one of those things that is used, but few talk about. Check out what Orbitz is doing (very cool stuff) and see look at Gigaspaces. Some [more] incredible things can be done with Jini if more people would look at it - instead of the typical web ui/app server/database. I had talked to someone at IBM and that were using Jini to provide printing services.
|
|
Message #195899
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Hi,Isn't JINI a technology in coma dying a very slow death?J you're an idiot.c Do we have to sink to the level of Slashdot? Surely a better response is to provide evidence of continued use of and interest in JINI rather than personal insults?
Sincerest apologies. This post caught me at a (very) bad moment. It can be frustrating to see people propogating FUD about things they clearly know nothing about. IMHO the Jini body of work is some of the most inspiring Java technology around. The fact that parts of it are slightly more complex than the majority of frameworks discussed on TSS is simply a reflection of the difficulties inherent in the problems Jini is trying to solve.
c
|
|
Message #195900
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Generic Proxy
Its possible to listen to service registration and deregistration events, then you can bind the service proxies into jndi meaning that your service lookup becomes a jndi lookup.
Using a "ServiceLocator" or whatever means that this can then be generified into the same framework as your ejbs. No spring or aspects needed!
James
|
|
Message #195902
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Jini is one of those things that is used, but few talk about. Check out what Orbitz is doing (very cool stuff) and see look at Gigaspaces. Some [more] incredible things can be done with Jini if more people would look at it - instead of the typical web ui/app server/database. I had talked to someone at IBM and that were using Jini to provide printing services. Yes, and you can find others here: http://www.lonecrusader.co.uk/success.html
And that doesn't include several other companies who have asked to remain anonymous (I'm working on changing their minds).
The blog entry itself has attracted significant interest netting several thousand hits since I posted it before New Year and it's deemed popular over at del.icio.us right now.
|
|
Message #195905
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Dan, if it's boilerplated stuff, perhaps it should indeed be put in a helper class - or at the very least, a helper library (think of how commons-mail handles the typical case of *just wanting to send a freakin' email!*) Looking at the code a number of the first lines are to do with setting up defaults.
As far as the exporting goes, there is a lot to do and keep track of when you export a remote object in Jini, because there are a number of ways to do it. I have been working on something of a library to do with exporting etc. and keeping track of all this stuff, that basically takes the remote object builds the exporter, wraps the remote reference, possibly adds in support for secure remote calls and smart proxies, and it does it like this.
_proxy = (Queue) DefaultExporterManager.getManager().exportProxy(this, "Service", UuidFactory.generate());
with definitions for "Service" defined in a configuration file like
<code>
import net.jini.jeri.*; import net.jini.jeri.http.*;
ExportManager { mgrDefs = new String[]{"Service"}; }
ExportManager.Service{ exporterClass = BasicJeriExporter.class; serverEndpoint = HttpServerEndpoint.getInstance(0); ILFactory = new BasicILFactory(); proxyCreator = new QueueServiceCreator(); } </code>
This removes the need to setup the exporter in code, and keep track of everything, because it can import a lot of this information from the configuration file and manage the remote object (independent of how it is exported) for you.
I'll get it released, if anyone wants to take it out for a test drive.
--Calum
|
|
Message #195918
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
It can be frustrating to see people propogating FUD about things they clearly know nothing about. Oh I agree!
IMHO the Jini body of work is some of the most inspiring Java technology around. I agree even more. My personal interest is in JavaSpaces, which I think is one of the most interesting and under-used technologies ever (I have past experience in distributed numerical computation - I would have loved to have Jini/JavaSpaces many years ago).
I have found that a calm response along with evidence to back your case can be even more annoying to a debating opponent :)
|
|
Message #195935
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Isn't there an large insurance company using it? I assume you mean Countrywide? If not, you might have to spell it out for everyone cos my brain's fried and I can't remember.
|
|
Message #195940
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
Isn't there an large insurance company using it? I assume you mean Countrywide? If not, you might have to spell it out for everyone cos my brain's fried and I can't remember. I would have if I could have remembered. I had read it somewhere in the past, then couldn't find it again.
|
|
Message #195947
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
My personal interest is in JavaSpaces, which I think is one of the most interesting and under-used technologies ever (I have past experience in distributed numerical computation - I would have loved to have Jini/JavaSpaces many years ago). If you are acquainted with distributed numerical computation, then you'll really like the data grid capabilities in our Coherence 3.1 release. Coherence dynamically load-balances both the data and the computations across any number of servers. The computations themselves are performed at in-memory speed, since no data are being moved around the network to achieve the computations.
We already have some of the biggest risk-management systems in the world running on Coherence, and they were the starting point for designing these features. This idea was originally implemented in Coherence by the world's largest bank using our Invocation Service coupled with our Partitioned Cache Service, but the data grid capabilities are now built into the Partitioned Service itself.
Peace,
Cameron Purdy Tangosol Coherence: Clustered Shared Memory for Java
|
|
Message #195972
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
I have past experience in distributed numerical computation If you are acquainted with distributed numerical computation, then you'll really like the data grid capabilities in our Coherence 3.1 release. I posted some more information on the new data grid capabilities on my blog:http://jroller.com/page/cpurdy?entry=data_grid_in_actionEnjoy!Peace,Cameron PurdyTangosol Coherence: Clustered Shared Memory for Java I never knew a hashmap was so useful/powerful. ;) :)
|
|
Message #195976
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
I never knew a hashmap was so useful/powerful. ;) :) It's an Enterprise HashMap ;-)
(We call Coherence a "coherent cache" because that's what a lot of people use it for, but it is a fully coherent object space that happens to provide the standard java.util.Map API regardless of the selected data topology and regardless of the number of servers. There is no more natural API in Java for a space than the Map API; as Dan can tell you, I have big problems with the JavaSpaces API because -- IMHO -- it feels totally un-natural to a Java developer.)
Peace,
Cameron Purdy Tangosol Coherence: Clustered Shared Memory for Java
|
|
Message #195978
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Generic Proxy
Correct me if I am wrong, but most JINI services are not stubs (that can be binded to JNDI) but actual classes that get dynamically loaded into client JVM. Can JNDI do the same?
|
|
Message #195986
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
<s Dan can tell you, I have big problems with the JavaSpaces I've seen some things you've posted about Jini. I understand the "un-natural" part. I have trouble enough trying to get people to use something other than their standard report tool.
Oddly, I think tuples are built into Ruby.
|
|
Message #196069
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
as Dan can tell you, I have big problems with the JavaSpaces API because -- IMHO -- it feels totally un-natural to a Java developer.) In respect of un-natural, I think "different" may be a better term. If all we ever do is use the same old idioms and the same old constructs, we're only ever going to get so much progress.
As human beings we like the familiar and feel uncomfortable with things that take us away from it. However, it has often been shown that going outside of the comfort zone is what leads to improvement.
A Map may be a fantastic API for a cache but you're going to struggle to convince me that it's the best option in other areas such as grid. Sure you can probably make it fit but is that the right choice?
|
|
Message #196076
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Dan Creswell: How to write a JINI Service
If you are acquainted with distributed numerical computation, then you'll really like the data grid capabilities in our Coherence 3.1 release. Coherence dynamically load-balances both the data and the computations across any number of servers. Hi Cameron, Im curious (and a bit short on time ATM to read your docco), how do the classes that implement the "behaviour" get to all the nodes in your cluster?
cheers craig
|
|
Message #196078
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
mobile agents
Hi Cameron, Im curious (and a bit short on time ATM to read your docco), how do the classes that implement the "behaviour" get to all the nodes in your cluster? Most of the time they are deployed as part of the application, i.e. the same way that the necessary Servlet classes would end up on all the Tomcat servers.
Sometimes applications are more dynamic and need runtime distribution of classes, and we use Java's built-in class marshalling support for that. From what we've seen, this is rarely used, since new classes are not typically being introduced into a running application.
Peace,
Cameron Purdy Tangosol Coherence: Clustered Shared Memory for Java
|
|
Message #196085
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Generic Proxy
You are right.
However, by binding a Reference into JNDI
context.bind( jndiName, new Reference(className, factory, null) );
and having the factory implement getObjectInstance, and use a ServiceDiscoveryManager/LookupCache you can look up the service in the same way as normal, but via JNDI.
James
|
|
Message #196086
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
mobile agents
Would it be fair to say then that what you have isnt really a "mobile agent" system, just an excellent way of avoiding dragging all of your distributed data back to one place to work on?
|
|
Message #196087
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
as Dan can tell you, I have big problems with the JavaSpaces API because -- IMHO -- it feels totally un-natural to a Java developer.) In respect of un-natural, I think "different" may be a better term.
Dan, your work is a great credit to the JINI community, and I know how much you like it and really believe in it. I was careful to add "IMHO" because "natural", "unnatural", etc. are all subjective, and none of us will ever have the last word on such a conversation ;-).
If all we ever do is use the same old idioms and the same old constructs, we're only ever going to get so much progress. As human beings we like the familiar and feel uncomfortable with things that take us away from it. However, it has often been shown that going outside of the comfort zone is what leads to improvement. Of course, but I (IMHO) believe that the Javaspaces API was designed in spite of existing standards and conventions. See:
http://jroller.com/page/cpurdy?entry=the_seven_habits_of_highly2
(Some time when we talk, I'll expand on this some more. My opinions on this particular topic are actually more caustic than I am prepared to express in public.)
A Map may be a fantastic API for a cache but you're going to struggle to convince me that it's the best option in other areas such as grid. A Javaspace is just a very limited Map that puts serious restrictions on its content. That's why a commercial implementation added the Map API to their space implementation, and that's why the Javaspaces API itself is getting more and more Map-like methods added to it.
Secondly, regarding "grids", our software addresses the data access problem for applications running in grid environments, hence we refer to it as a Data Grid.
I don't argue for a "best option". Instead, I look at the Map API as a good "black box" that allows grid-aware implementations to be "mounted" behind it. I think with a major revision the Javaspace API could be a good "black box" API too, and that's what I've been trying to get Sun to see (with no luck so far).
I wish you could see what our customers are doing in grid environments. We've got end-to-end algorithmic trading grids (marktet feed all the way through to execution and settlement). We provide the data backbones for some of the busiest networks in the world (e.g. equities trading, travel and logistics). We provide HA infrastructure for datacenter failover ("disaster recovery" / "continuancy planning") -- and it has proven to work (i.e. a customer's datacenter went down with no interruption to their real time grid systems running on our software).
Sure you can probably make it fit but is that the right choice? I'm just curious what you like about the Javaspace API that you can't do more easily with a transactional Map that supports queries, locking, agent invocation, events and the new Java ConcurrentMap API?
Peace,
Cameron Purdy Tangosol Coherence: Clustered Shared Memory for Java
|
|
Message #196098
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
Dan, your work is a great credit to the JINI community, and I know how much you like it and really believe in it. I was careful to add "IMHO" because "natural", "unnatural", etc. are all subjective, and none of us will ever have the last word on such a conversation ;-). Well, thank you and I'd agree with the subjective aspect. Yes, I do believe in JINI but I don't expect everyone to want to use it nor do I attempt to encourage that (I hope!).
A Javaspace is just a very limited Map that puts serious restrictions on its content. That's why a commercial implementation added the Map API to their space implementation, and that's why the Javaspaces API itself is getting more and more Map-like methods added to it. Well that's one point of view but this feels subjective to me like a lot of the other things you and I debate. JavaSpace05 is the latest (and only standardized) API addition at this point in time and it has batching and a slightly broader event model. I personally would not view any of those as Map-like methods. What a given commercial implementation chooses to do is up to them and their mental models in respect of product usage/deployment patterns.
I may be over-generalizing but Maps are all about lookup by key (unless you throw in the querying stuff you've added) which some people do with JavaSpaces. But there's another viewpoint which is that JavaSpaces are about flows of objects (yes, I know you don't think of JavaSpace Entry's as objects :) rather than key'd lookup.
I don't argue for a "best option". Instead, I look at the Map API as a good "black box" that allows grid-aware implementations to be "mounted" behind it. I think with a major revision the Javaspace API could be a good "black box" API too, and that's what I've been trying to get Sun to see (with no luck so far). Okay, so this tweaked my interest centre - do you mean make a JavaSpace more Map like or something else? A better "black box" API to do what that you wouldn't say just use Map/Coherence? I've not been party to most of this discussion so I'm sorry if I'm asking you to repeat yourself.
I'm just curious what you like about the Javaspace API that you can't do more easily with a transactional Map that supports queries, locking, agent invocation, events and the new Java ConcurrentMap API? So you'll probably shout "NDA!" at this point (and possibly "read the API" and maybe even "offline"/"phone call") but what do you do about failure of nodes actively executing agent invocations? Do you restart those invocations or report an exception and have the client request it again or something else? And in a similar vein, what happens if a client starts a transaction on a map but crashes before completing it? Oh, and one more - how about load balancing and scheduling of agent invocations? I may have several different kinds of agent/task but I might want one to have more priority than the other (or at least access to fewer servers) how do I separate out/control the amount of load they exert?
Fundamentally I suspect we just think about things in different ways. What you find easy, I don't and vice versa it appears. I can't quite grok something that is supposedly a Map but supports all these other things as well. It just feels a little overloaded (IMHO, caveat subjective! :).
I guess it all has to go offline and wait until we can do the chat, hopefully sometime this year.
|
|
Message #196112
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
I guess it all has to go offline and wait until we can do the chat, hopefully sometime this year. Great. Finally a good, worthwhile conversation. Oh well, guess I'll go back to torturing others on other threads.
|
|
Message #196115
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
mobile agents
Would it be fair to say then that what you have isnt really a "mobile agent" system, just an excellent way of avoiding dragging all of your distributed data back to one place to work on? "Not dragging all of your distributed data back to one place to work on" is just one of the benefits of using an agent approach.
What an agent is, at its simplest, is a goal-based actor operating within a relevant context of state and events. Some agent implementations provide a thread (or fibre) for each agent; we don't use that model. In our implementation, the agents within a particular context can share a configurable thread pool, so the runtime resource utilization within a particular VM can be managed. With the Invocable Map API, the agents are going to typically be short-lived, representing a single operation. In our next release, we will also support event-based agents, so if there is specific evaluations and conditional tasks that those agents have to do on state change, they can do so, and they will migrate to where the relevant data is being managed within the grid. We don't currently support timer-based a.k.a. scheduled agents, e.g. check some condition every n seconds, etc., nor do we enforce agent singularity (where the agent maintains its own state over time as it moves from one point to another within the grid), although you can accomplish that simply by storing the singular state as an entry in the grid.
We have quite a few sources for inspiration on this topic, starting with Einar Landre (he is a big proponent of agent-based software, and we discussed this topic at Bruce Eckel's summit last year), the work of the JSR 236/237 groups that we're involved with, and from a whole bunch of ideas that our customers give us. We're not following the academic path on this topic (e.g. neural nets) but rather trying to provide the basis for building simple solutions to complex distributed programming problems.
Peace,
Cameron Purdy Tangosol Coherence: The Java Data Grid
|
|
Message #196116
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
So you'll probably shout "NDA!" at this point (and possibly "read the API" and maybe even "offline"/"phone call") but what do you do about failure of nodes actively executing agent invocations? Do you restart those invocations or report an exception and have the client request it again or something else? The execution fails over automatically, just as if it were running on a CPU in a mainframe and the CPU dies (the thread of execution is reloaded from a checkpoint onto another CPU).
And in a similar vein, what happens if a client starts a transaction on a map but crashes before completing it? The transaction is automatically rolled back and all resources associated with it are released.
Oh, and one more - how about load balancing and scheduling of agent invocations? I may have several different kinds of agent/task but I might want one to have more priority than the other (or at least access to fewer servers) how do I separate out/control the amount of load they exert? The state is load-balanced, and the agents gravitate to the state, so their balancing is a derivative.
We don't have an implementation (yet?) of prioritization of agents, outside of the ability to configure the thread pools. Only recently has it been brought up as a possible requirement, so we're still in the early "pondering stages" on that topic.
Peace,
Cameron Purdy Tangosol Coherence: The Java Data Grid
|
|
Message #196117
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
I guess it all has to go offline and wait until we can do the chat, hopefully sometime this year. Great. Finally a good, worthwhile conversation. Oh well, guess I'll go back to torturing others on other threads.
Are you petitioning for this conversation to continue in the open? Sorry, I can't quite determine the vibe from your posting.
|
|
Message #196119
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
At the point where I'm asking too many questions and should take out a support contract, let me know! :)
The transaction is automatically rolled back and all resources associated with it are released. Cool, so how quickly might I expect this to happen typically? Can I configure it?
The state is load-balanced, and the agents gravitate to the state, so their balancing is a derivative. So I think you're maybe saying that the way you partition the state determines how many agents I'm likely to have executing against that state? I'm probably not being clear here - let's say I have an 8-CPU machine - ideally I'd want maybe 8 threads all executing the invocation - how do I do that?
We don't have an implementation (yet?) of prioritization of agents, outside of the ability to configure the thread pools. Only recently has it been brought up as a possible requirement, so we're still in the early "pondering stages" on that topic. Well, you can't address everything all at the same time can you :)
|
|
Message #196128
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
The transaction is automatically rolled back and all resources associated with it are released. Cool, so how quickly might I expect this to happen typically?
Transactions have a configurable time-out.
Typically, node death (and failover) occur sub-second.
"Typical" worst-case scenario is when network problems are such that node death requires several seconds to verify.
The state is load-balanced, and the agents gravitate to the state, so their balancing is a derivative. So I think you're maybe saying that the way you partition the state determines how many agents I'm likely to have executing against that state? I'm probably not being clear here - let's say I have an 8-CPU machine - ideally I'd want maybe 8 threads all executing the invocation - how do I do that?
To use multiple threads (in a standard manner), an agent can simply give a set of work items to a work manager.
However, I've never seen this requirement. Could you describe a situation where you'd think that it would occur?
Peace,
Cameron Purdy Tangosol Coherence: The Java Data Grid
|
|
Message #196131
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
Are you petitioning for this conversation to continue in the open? Sorry, I can't quite determine the vibe from your posting. Yes and No. A little humor and a little truth. I understand you and Cameron not wanting to air "dirty laundry". There are things I am not willing really discuss in public. At the same time I am lamenting the fact that a good conversation has to handled off-line. You and Cameron seem pretty smart, and I would love to learn. People are always whining on TSS that there is no good news - but the stuff that gets the most postings has very little worth.
Does that explain it?
|
|
Message #196132
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
Transactions have a configurable time-out.Typically, node death (and failover) occur sub-second."Typical" worst-case scenario is when network problems are such that node death requires several seconds to verify. That's a fixed length timeout right?
To use multiple threads (in a standard manner), an agent can simply give a set of work items to a work manager.However, I've never seen this requirement. Could you describe a situation where you'd think that it would occur? Okay, so the question you ask makes me think I still haven't grok'd your architecture correctly! :)
Simplistic scenario for discussion: Let's say I have 64 values that I want to perform some uniform calculation on. On an 8 CPU box, I'd ideally want to run 8 threads and have each do the computation against 8 values. On a single CPU box, I mightn't want to do that, 8 threads might thrash it.
So the question becomes how do I go about sizing/cutting my tasks so as to get the right thread utilization across the boxes?
|
|
Message #196158
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
Transactions have a configurable time-out.Typically, node death (and failover) occur sub-second."Typical" worst-case scenario is when network problems are such that node death requires several seconds to verify. That's a fixed length timeout right?
No, it's a reflection of how fault tolerant you've configured Coherence to be for temporary network glitches.
There is a configurable hard networking time-out, but if you hit that, it's an indication that something is REALLY wrong (e.g. a JVM bug that causes a JVM process to completely lock up but yet not be detectable as locked up by the OS.) Sun used to have such bugs in the Solaris VM .. e.g. the old "new Date().toString()" bug that would randomly lock up a JVM for five minutes.
To use multiple threads (in a standard manner), an agent can simply give a set of work items to a work manager.However, I've never seen this requirement. Could you describe a situation where you'd think that it would occur? Okay, so the question you ask makes me think I still haven't grok'd your architecture correctly! :)Simplistic scenario for discussion: Let's say I have 64 values that I want to perform some uniform calculation on. On an 8 CPU box, I'd ideally want to run 8 threads and have each do the computation against 8 values. On a single CPU box, I mightn't want to do that, 8 threads might thrash it.So the question becomes how do I go about sizing/cutting my tasks so as to get the right thread utilization across the boxes?
It's black boxed, and I haven't reviewed that part of the implementation. It could be executed on one thread or on multiple; either is possible / legal / acceptable by the API specification (i.e. within the "black box").
Remember, all of our cache topologies (including replicated, partitioned, near, local, overflow, read-through / write-through / write-behind, etc.) support the same API, and thus support the Invocable Map API. Each can have a different implementation.
Peace,
Cameron Purdy Tangosol Coherence: The Java Data Grid
|
|
Message #196194
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
Transactions have a configurable time-out.Typically, node death (and failover) occur sub-second."Typical" worst-case scenario is when network problems are such that node death requires several seconds to verify. That's a fixed length timeout right? No, it's a reflection of how fault tolerant you've configured Coherence to be for temporary network glitches.There is a configurable hard networking time-out, but if you hit that, it's an indication that something is REALLY wrong (e.g. a JVM bug that causes a JVM process to completely lock up but yet not be detectable as locked up by the OS.) Sun used to have such bugs in the Solaris VM .. e.g. the old "new Date().toString()" bug that would randomly lock up a JVM for five minutes.
Ooh might be getting crossed wires, I was referring to the transaction timeout being fixed? So I was thinking if you get node death your recovery protocols trigger failover, cancel locks (pessimistic options only?) etc.
However, if the client is doing the transaction and spins, deadlocks or whatever (i.e. not node death) for some reason, you're gonna have to wait on the transaction timeout?
|
|
Message #196213
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
A Javaspace is just a very limited Map that puts serious restrictions on its content. That's why a commercial implementation added the Map API to their space implementation, and that's why the Javaspaces API itself is getting more and more Map-like methods added to it. This comment for me was very interesting in respect of the fact that it represents a view of a JavaSpace which I hadn't really considered previously.
Coincidentally, several other things got posted on various blogs recently which all relate in one way or another. So I've posted a summary and references back up on my blog in the usual place: http://www.jroller.com/page/dancres?entry=javaspaces_maps_caches_and_flows
|
|
Message #196217
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Insurance Company doing JINI????
Still not entirely sure this is the company Mark was thinking about but Countrywide featured their work at the 7th JCM - check out Calum Shaw-Mackay's presentation:
http://www.jini.org/meetings/seventh/J7Program_T.html
A number of the bits of infrastructure he mentions are actively being developed and are open source (Neon for example).
|
|
Message #196271
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
Ooh might be getting crossed wires, I was referring to the transaction timeout being fixed? No, it's configurable per transaction.
So I was thinking if you get node death your recovery protocols trigger failover, cancel locks (pessimistic options only?) etc. Yes, that is exactly what happens.
However, if the client is doing the transaction and spins, deadlocks or whatever (i.e. not node death) for some reason, you're gonna have to wait on the transaction timeout? For pessimistic transactions, yes, by definition. In that case there would be two time-outs in play: The transaction time-out and the network time-out. The first is how long resources are leased for, while the second is how long the rest of the cluster is willing to wait without any communication from the node, e.g. how long a full GC could take.
Peace,
Cameron Purdy Tangosol Coherence: Clustered Shared Memory for Java
|
|
Message #196275
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
Ooh might be getting crossed wires, I was referring to the transaction timeout being fixed? No, it's configurable per transaction.
Yah, I get that - no I meant you ask for a lease on the transaction (which is configurable per transaction as you say) but it's a fixed lease - you can't extend it?
|
|
Message #196286
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
Ooh might be getting crossed wires, I was referring to the transaction timeout being fixed? No, it's configurable per transaction.
Yah, I get that - no I meant you ask for a lease on the transaction (which is configurable per transaction as you say) but it's a fixed lease - you can't extend it?
No, I don't believe so.
Peace,
Cameron Purdy Tangosol Coherence: Clustered Shared Memory for Java
|
|
Message #196326
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
Ooh might be getting crossed wires, I was referring to the transaction timeout being fixed? No, it's configurable per transaction. Yah, I get that - no I meant you ask for a lease on the transaction (which is configurable per transaction as you say) but it's a fixed lease - you can't extend it? No, I don't believe so.Peace,Cameron PurdyTangosol Coherence: Clustered Shared Memory for Java
Okay, so I'm missing something - can you give me a snippet of code to demonstrate?
|
|
Message #196375
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
No, I don't believe so. Okay, so I'm missing something - can you give me a snippet of code to demonstrate?
I'm not sure what your question is.
I'm saying that I don't believe that the time-outs get extended beyond the configured time-out of the current transaction (i.e. there is no lease renewal).
Peace,
Cameron Purdy Tangosol Coherence: The Java Data Grid
|
|
Message #196381
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
API discussion
I'm not sure what your question is.I'm saying that I don't believe that the time-outs get extended beyond the configured time-out of the current transaction (i.e. there is no lease renewal). Ah, okay - too many negatives for me:
.....but it's a fixed lease - you can't extend it? No, I don't believe so. I took that to mean you didn't believe I was correct on the extension thing.
Thanks for clarifying!
|
|
 |
New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com |
 |
 |
Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(November 2, Article)
SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options.
(September 28, Article)
Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team.
(September 22, Article)
Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies.
(July 14, Article)
JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags.
(June 29, Article)
In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project.
(June 23, Tech Talk)
Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now.
(June 15, Tech Talk)
In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements.
(June 15, Tech Talk)
In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls.
(June 4, Tech Talk)
Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable.
(May 28, Tech Talk)
This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work.
(May 26, Tech Talk)
Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers.
(May 21, Tech Talk)
Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application.
(May 19, Article)
In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources.
(May 19, Tech Talk)
Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)
The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)
|
|