Share data between Java EE servers

253 views Asked by At

What products/projects could help me with the following scenario?

  • More than one server (same location)
  • Some state should be shared between server (for instance information if a scheduled task is running and on what server).

The obvious answer could of course be databases but we are using Seam and there doesn't seem to be a good way to nest transactions inside a Seam-bean so I need to find a way where I don't have to go crazy over configuration (tried to use EJB:s but persistence.xml wasn't pretty afterwards). So i need another way around this problem until Seam support nested transactions.

This is basically the same scenario as I have if you need more details: https://community.jboss.org/thread/182126.

Any ideas?

1

There are 1 answers

2
Rob On BEST ANSWER

Sounds like you need to do distributed job management.

The reality is that in the Java EE world, you are going to end up having to do Queues, as in MoM [Message-oriented Middleware]. Seam will work with JMS, and you can have publish and subscribe queues.

Where you might want to take a look for an alternative is at Akka. It gives you the ability to distribute jobs across machines using an Actor/Agent model that is transparent. That's to say your agents can cooperate with each other whether they are on the same instance or across the network from each other, and you are not writing a ton of code to make that happen, or having to special handle things up and down the message chain.

The other thing Akka has going for it is the notion of Supervision, aka Go Ahead and Fail, or Let it Crash. This is the idea (followed by the Telcos for years), that systems will fail and you should design for it and have a means of making things resilient.

Finally, the state of other options job wise in the Java world is dismal. Have used Seam for years. It's great, but they decided to just support Quartz for jobs, which is useless.

Akka is built on Netty, too, which does some pretty crazy stuff in terms of concurrency and performance.

[Not a TypeSafe employee, btw…]