• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Q: CORBA/Java passing objects

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
If I have a java vector of objects, can I pass it across a network using CORBA, so that the server has a copy of the objects? Then the server can do some calculations (by calling methods in the objects), and return a result?
I know CORBA doesnt directly support vectors, so is it possible to use a sequence? Or a series of structs? At a push, I know I could send the objects as a string, but then, I wouldnt be able to use their methods.
eg. I have a vector with three objects, A,B,C. Can I send this to another computer, and have that computer run object A, which would call methods in object B and object C, and return a result?
I hope thats clear enough, and thanks for your time. (I have looked around the web, and a few books, but havent found anything that I can understand to help).
/M Wrench
 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm that would be easy if you were using RMI. What language is your server written in?
Chris
 
M Wrench
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The server is also written in Java (I am writing the server as well
However, I'd much prefer to use CORBA. I've settled on sending the data values that make up the objects to the server, as a string, then instantiating the objects on the server, doing the calculation, and then just returning the value result.
Probably not the best solution (probably very slow?), but I know how to do it, which is good.
I'm still looking for alternative though, or criticisms on my method, or anything, I'm just keen to learn
M Wrench
 
Chris Shepherd
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I can certainly understand wanting to code with what you know rather than having to puzzle out something new. I'll ask you tho, what is this program for? Is it just something simple thats a throwaway in 3 months, or is it something you expect to keep around and update for longer than that?
If it is just a throwaway, then do it your way because the learning curve to get the RMI working would probably take longer. If you are going to want to keep it around longer, or make it part of a comercial program, you should really consider using RMI instead. It will be cleaner to manage and change. It does exactly what you want to do without having to cobble something together. It is also of some importance how often you need to talk to the server. The more you need to talk, the more you are going to need to have something that works easily for the job you want to do.
Personally, I'd go with RMI, but thats a decision for you. If you decide to go that route and need help getting it going, please feel free to ask and I'll do what I can to get you going.
Chris
 
M Wrench
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The application is basically a huge piece of coursework. Its not commercial, and probably wont be developed after the deadline at all.
I'll have to talk to the server alot, so the decision I have made is probably bad for efficiency(!), but efficiency isnt the main concern. The work is more of a learning exercise, focusing on project management, so a great program isnt required.
I'm relectant to use RMI, being as its a Java only solution. I'm hoping to write servers in multiple languages (well, 2), to show the application can be easily expanded, and if I'm using RMI then thats not the case. Also, Java is the language I have most experience with, in general, and I'm looking to branch out, in anyway, to other languages.
I can appreciate that RMI is probably a better overall solution for what I am trying to do though, and I will try and look into it sometime.
Thanks for your help, it is appreciated,
M Wrench
 
reply
    Bookmark Topic Watch Topic
  • New Topic