You can probably settle for a set of Java data structures that are inter-operable with Clojure.
1. Use interfaces (because Clojure implements them too) such as java.util.List, java.util.Set, java.util.Map etc. 2. Use type hints and enable "warn on reflection". 3. When in Clojure, first convert to Clojure data structure before doing any processing. 4. Try to minimize the cross-section surface area that connects the Java and Clojure parts and keep it clean. This may not answer all of your questions (such as concurrency), but I coded something in Java+Clojure, and the result I guess is pretty good. URL below: Taimen -- http://code.google.com/p/bitumenframework/ Regards, Shantanu On Oct 26, 12:55 pm, vanallan <vanal...@gmail.com> wrote: > Hi > thanks for the replies :) > The whole system consists of a couple of hundreds of thousands lines > of Java code. The part i am investigating is a validation sub system > that validates a number of input parameters given from the user > against various predefined values and rules, and against databases and > such. These methods don't just validate the input, they also set up a > couple of objects based on the input given. > > I want these methods to run its own task in parallel, but sequential > to the rest of the system. The reason i am doing this is to see if > there is some improvements in performance and to see if it is possible > at all to implement parts of a big system in a functional language. > The same object is sent as an argument to all methods, and this object > consist of a lot of other objects. > > On Oct 24, 5:54 pm, eyeris <drewpvo...@gmail.com> wrote: > > > > > It's difficult to provide advice without more information about your > > current code. You say that you want a part of your system, which > > manipulates a lot of objects, to run in parallel. Do you mean that you > > want this part of the system to run parallel to the other parts -or- > > do you mean that this part will remain in sequence with the other > > parts of the system, but it will run its own tasks in parallel? > > Furthermore, what do you expect to gain from the parallelism? If it's > > simple divide-and-conquer parallelism to process a chunk of data > > faster, then that is pretty easy to implement in Java, so long as the > > data is dividable. On the other hand, if you want this part of your > > system to run in parallel with the other parts, then there's a wide > > spectrum of Clojure/Java mixes that could make sense. Like I said > > above, we'll need much more information before we can provide any > > valuable advice. > > > On Oct 23, 7:41 am, vanallan <vanal...@gmail.com> 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 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---