Ok thanks for the answer :)

I have now began to implement the Java parts. The data that is going
to be processed in Clojure is mapped to clojure structs, but I now
have another question. How should I update the values in the structs?
Since functions are going to run in parallel and a function may need
the updated value from another function I though that I should put the
struct members that is going to be updated in refs or maybe atoms. Is
this a good way or how should I manage the updated values in structs?

Thanks :)

On Oct 26, 4:11 pm, Shantanu Kumar <kumar.shant...@gmail.com> wrote:
> You can probably settle for a set ofJavadata structures that are
> inter-operable withClojure.
>
> 1. Use interfaces (becauseClojureimplements them too) such 
> asjava.util.List,java.util.Set,java.util.Map etc.
> 2. Use type hints and enable "warn on reflection".
> 3. When inClojure, first convert toClojuredata structure before
> doing any processing.
> 4. Try to minimize the cross-section surface area that connects 
> theJavaandClojureparts and keep it clean.
>
> This may not answer all of your questions (such as concurrency), but I
> coded something inJava+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
> > ofJavacode. 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 abigsystem 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 inJava, 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 ofClojure/Javamixes 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
> > > >bigJavasystem toClojure. 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
> > > >Javamethods? Should i try to retain theJavastructure 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
> > > >Clojurein abigJavasolution? Also i should mention that i'm quite
> > > > new toClojure, 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to