Multiple cassandra instances [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
for my master thesis, I have to modify Cassandra (I want to make a distributed version where different clusters will send the modifications with some dependencies and stuff :) ). So, I am starting to finally understand the code and I think I know how to do it, but I have encountered a problem:
I have to run different instances of cassandra on my computer (so I would have like 3 terminals running cassandra on different addresses, and 3 others terminal open with cqlsh for each cassandra, and when I insert values in a table with one terminal cqlsh, it will only affect the corresponding cassandra cluster) . I have found different ways on internet to do it, but every times, you should duplicate the binaries (so the code in my case), and since I am working on it, I don't want to duplicate it, because every time I make a small modification, I should reduplicate everything (I guess I could use a git to easily push and pull the modification from the original folder, but I am sure that there should be an easier way, right? :) )
thank you in advance :)
PS: I use windows (I can switch to linux (virtual box) but I would like to continue to work on windows if possible) and cassandra 3.10

take a look at cassandra ccm, it allows you to run multiple instances on the same physical machine. (used mostly for testing)
https://github.com/pcmanus/ccm

Related

How to share a Java Project with a JDBC and a SQL connection? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed yesterday.
Improve this question
I made a french conjugator GUI using Java. I also created a SQL Database which had all the french verbs that users could pick and choose using SQL Workbench and connected it to the project.
When I tried to share it with my friends, they were able to access the Java project and see the various GUI elements, but none of the conjugations came up. I shared the database as well exported in the .sql format.
What can I do to fix this problem?
Probably you are using a data base like MySql or PostgreSQL .., like that all of your friends need to install this data base into their machine and have the same configurations as yours.
The first solution (simple) is to use an internal data base like : JavaDB,
SqlLite .
The second solution is to put a script that will be run within the
first execution of you Desktop application / the installation of your
application, this script will downloed the DB use and configure it,
create the tables and do the Job.

Simplest Distribution Method for Java Front-end Database Application? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 10 months ago.
Improve this question
I would like to create a front-end application in Java to query a Microsoft SQL database. This application will need to be distributed to around 20 computers and must be extremely user friendly. I'm hoping someone can explain two things:
The simplest way to distribute this application across multiple windows machines. I.e.least amount of software installation and maintenance.
Explain how once distributed, the application might be able to connect to the database upon launch, as opposed to authenticating a user each time.
So far I plan to use Java, JavaFX, & Microsoft JDBC driver. Open to new ideas though, cheers in advance.
For distribution, I can think of a couple of choices:
IF you are sure that each of you 20 computers has a JVM installed, you could package the app as a "FatJar", a single Jar file with all of the dependencies in it. There are plugins for this in both Maven and Gradle.
If you don't have a JVM on these computers, and don't want to have to install one, you could create a native application using GraalVM and Gluon.
Take a look at https://gluonhq.com/create-native-javafx-applications-using-graalvm-22-builds-from-gluon
If you want to connect to the database without user intervention, see sql server login credential for jdbc

Send commands from terminal to Java swing app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have a working java app and now I would like to extend it to be controlled over ssh. Let's say I have a swing button that increases a counter. I would like to be able to ssh in that computer and say something $: myapp increase and have the button's action listener executed.
Maybe I'm using the wrong keywords but I could not find a solution. The 'kinda' solution I could think of is using signals but I'm not even sure if they can be used as I am used to from C and if that can be done without knowing the actual process ID.
Any material that can get me started would be welcome.
signals are hard to read from java, because there is a lot of difference between OSes on how to do those (some don't even have the concept), and java is designed to expose anything that can be generalized across all OSes java runs on, and to not expose anything that might not be there.
The usual way to do it, is via TCP/IP (so, java.net.Socket), or HTTP (so, jetty or some such).
Note that webapps can trivially be accessed remotely and can be scripted fairly easily. You could also consider building a command line / terminal based app, for example with lanterna which you can shove into a terminal session keeper / eternal SSH kinda deal.

How to handle data synchronisation between 2 Spring apps? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm looking for the optimal way to handle the following scenario, preferably some implementation that's already been made for something like this.
There are two Systems (Springboot Webapps) that are supposed to communicate which each other through a Rest-gateway. Transfers shall be handled with Json over HTTP.
1st System is the Project part, 2nd System is the Persons part and they both implement their own persistent sql-database. Both systems depend on each others data and it cannot be expected that both systems are online at all times.
What would be the best way to achieve that both systems data is always up 2 date? Is there any plugin you could recommend to handle the synchronization process which also implements scenarios like one system shutting down while sending or the other way round?
Thanks in advance!
If you can't expect both systems to be online at all times, and you don't want any downtime when one of them is down, I think that the best way to do it is to share a common database. This has some problems of its own and you should think if it's worth, maybe you would be better having two completely independent services which rely on each other and being ready to replicate one of them if it's needed.

Java Data Base Overflow? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
My code is simple, it generates a Data Base to store certain data (obviously), but the problem resides in the fact that it would create an "overflow" of DBs becuase every time the class ran it would generate another Data Base, I heard of a command:
CREATE DATABASE IF NOT EXISTS insertYourFavoriteName;
But some people say that why should I need a DB for each computer, when I could just do a central one when users conect, but correct me if I'm wrong, that would make the app depend on internet, right?
So in resume here are the 2 questions:
Does the command mentioned above works? Or does a better version or way to work around it exists?
Data Bases where all users connect to it mean that you need a server, and as a consecuence your app would depend on internet?
If you want to learn about databases you practice basic CRUD operations on that database. After that do some sample applications on database
If you want to create a database if not exists in mysql simply use this CREATE DATABASE IF NOT EXISTS DBName;
Basically before checking all these things you have to have basic understanding of what is database and how it works, So, please go through some good resources and get good understanding on the concepts.

Categories