If the Java layers are not already thread safe, you are facing a real
problem if you just try to layout some Clojure code on top of them...
You would have to be careful about isolating chunks that are thread safe
then look at what's left.

The difficulty then would be to find a way to introduce Clojure code at
some point where it will be paying off without requiring
months to rewrite the Java code.

If you want to benefit from parallel processing in Clojure your greatest
rewards will be to move away from Java structures but that might be
a huge effort if these data structures are present everywhere in the
Java code that will remain. A mid-approach would be to make
these structures thread-safe first and then share them between Clojure
and Java as a first step and later move away from them or at least
concealed them at the periphery in the java code.

I do not see anything else than a tailored and prudent approach if you
want to avoid a total rewrite.
That tailored approach depends a lot on the structure of the
application...

What's the code size ?

On Fri, 2009-10-23 at 05:41 -0700, vanallan wrote:

> Hi!
> I am currently investigating if it is possible to convert a part of a
> big Java system to Clojure. The reason for this is to make this part
> run in parallel and hence ease the implementation by porting it to
> Clojure. The problem is that these parts of the system is today
> setting and changing a lot mutable data in a lot of different objects.
> 
> Which approach do you think i should have when i try to port these
> Java methods? Should i try to retain the Java structure and change
> these objects or is it better to create my own data structure and
> somehow manage them? Does anyone have any experience in integrating
> Clojure in a big Java solution? Also i should mention that i'm quite
> new to Clojure, and functional programming overall. :)
> 
> Thanks
> 
> > 
> 

Luc Préfontaine

Armageddon was yesterday, today we have a real problem...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to