Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

"Overall Architecture"

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have suddenly realised that I dont understand how I am suposed to do the following
"Additionally, the program must be able to work in a non-networked mode. In this mode, the database and user interface run in the same VM and no networking is performed, and no sockets should be created. The user must be able to select the operating mode, although it is acceptable that the program stay in one mode once it has started up.
"
I have been working on making two jar files, one client and one server but that wont work for me in a "no network mode". How should I think?
/Lina
 
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In a non-networked mode you still need the client and the server but the client won't be invoking remote calls on the server.
You should still use the same GUI and database that the networked mode uses. In a sense the Data class is the server in non-networked or local mode as you should be bypassing all networking code i.e. serialising objects.
In non-networked mode the client and server are on the same JVM so no networking is required.
Hope this helps.
regards
[ June 10, 2003: Message edited by: HS Thomas ]
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lina

I have been working on making two jar files, one client and one server but that wont work for me in a "no network mode". How should I think?


I divided my application into several packages:
  • suncertify.db
  • suncertify.help
  • suncertify.test
  • suncertify.util
  • suncertify.connectivity
  • suncertify.client
  • suncertify.server

  • (Yes, I did go overboard )
    Some of these packages were in both client.jar and server.jar:
    client.jar:
  • suncertify.db
  • suncertify.help
  • suncertify.util
  • suncertify.connectivity
  • suncertify.client
  • suncertify.server (stub files)


  • server.jar:
  • suncertify.db
  • suncertify.util
  • suncertify.server


  • As you can see, suncertify.db was in both. In standalone mode the GUI used it's local copy of the classes in suncertify.db. In networked mode, it ignored the local classes.
    Alternatively, if you are willing to set a classpath, you could just call the classes in the db package in the server jar file directly.
    Regards, Andrew
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!