How to access Clarion Tables from Java - java

I have this client with this system coded in Clarion. He is needing an webservice in Java to public some APIs from their system.
Does anyone know the best approach to access and modify any given clarion table ( .dat file) ?

You can use Capesoft's Nettalk or Clarion Handy Tools to create a SOAP server that accesses .dat, .tps or any other data Clarion is capable of accessing. The examples provided make it quite simple and these servers perform well.

Related

Most robust way to store api keys (client side)?

I have created a java daemon program that collects data from social network accounts. I use a lot of services including Flick, S3, GeoCoding, etc. Currently I have the program set up to read all these API keys from a properties file. I also have a similarly formatted properties file in my test folder that contains different keys for testing purposes. These property files are not committed to source obviously. This collection program writes to a mongo db. I am also building a web app that also works with mongo and will be deployed along side the collection. During my development I am reading that it is best to store keys as environment variables on the production side. It got me think; which leads me to my question...
I am wondering if there is a better way to handle these keys in my java program (from a deployment standpoint) or some possible routes that people have tried in doing something similar to this. Can someone shed some light on this?
I would recommend a database. If you are only storing API keys for personal use, then the size of the database isn't probably a major concern. Personally, I would suggest MySQL (or alternatively SQLite) as they are both quite well-supported.
If you encrypt your keys then it shouldn't matter too much where you store your database, although of course I still wouldn't make it openly downloadable. Just pick a good encryption tool and do not try developing your own encryption algorithm!
The latest hotness (in a world of containers) is to use zookeeper, etcd or consul as a distributed configuration store. The confd tool is capable of ensuring that application configuration files are kept in sync with changes to configuration.
My personal preference is Consul which has a similar template tool called consul-template, and another called envconsul if you would prefer your program to consume environment variables.
Finally Hasicorp, the makers of consul, have an encryption product called vault. It works well with consul and is also supported by consul-template.

Java and MySQL Convoluted Setup

I am tasked with writing an application in Java (it is not web hosted, but rather deployed to multiple platforms - this decision is not in my control).
I know Java well enough to do this and MySQL enough to seem clever but is probably dangerous. I am not an expert though which is why I'm here asking for design help with this.
Here are the requirements:
1) The java application will require generic read access to certain tables in a database - This does not need access control
2) The java application will need to be able to modify a few specific tables (not necessarily on the same database - but some are), but only when the user accid matches the rows in that table
3) Due to the nature of the infrastructure the users cannot access the database directly for the read data (though they could for the write data)
How do I give users write access to a table so that they only insert/modify on their account id.
If they have write access to a table they could modify rows that aren't tied to their account id. And while I can set the app to make sure it ties it to their account, if they have write access they can access it outside the app? And if I make a generic write account for the app they could simply view the user/pass in the java code which is as bad?
The infrastructure will not allow me to set up a real server-client communication system (which could handle auth and processing). The the best I can do is background process that only communicates with internal systems. This app will be external. The best I could do is allow the external users access to a database.
I was thinking something like having the app work on a seperate replicated database and then have the background process transfer it to the real one (this doesn't need to be real time so..) but it doesn't solve the inherent security issue with write access.
Is there a way to give users conditional write access to a table (condtiional on their accid matching) wholly within MySQLs security features?
The read data is obviously easy, just open read access to the table. Its the write access I"m not sure about and I'm just hoping I'm missing something.
I appreciate any comment and suggestions. Even if the answer is its not possible.
Thanks.

Java <-> Python: share objects

I have an embedded system using a python interface. Currently the system is using a (system-local) XML-file to persist data in case the system gets turned off. But normally the system is running the entire time. When the system starts, the XML-file is read in and information is stored in python-objects. The information then is used for processing. My aim is to edit this information remotely (over TCP/IP) even during process. I would like to use JAVA to get this done, and i have been thinking about something to share the objects. The problem is, that I'm missing some keywords to find the right technologies to get this done. What i found is SOAP, but i think it is not the right thing for this case, is that true? I'm grateful for any tips.
As I understand, you are using XML file to store start up configuration
And my assumptions on your interface between Java & Python apps
You want your Java application to retrieve objects over Python interface
And process them locally and send it back to Python interface to reload config ?
So, depending on your circumstances, you can workout something with the following
Jython
Pickle (if you have no restriction on startup config file format or can afford to do conversion)
https://pypi.python.org/pypi/Pyro4
Also you can get some ideas from here:
Sharing a complex object between Python processes?
You should ask your python application to open a XML-RPC socket which clients can connect on. This could let an outside application to execute an endpoint, which would manipulate your python object values in someway. There are several good choices for Java XML-RPC libraries, including the amazing org.apache.xmlrpc library.

simple cms - only to create/edit content and export it via jdbc or java api

(i even don't know if i need a cms)
what i need is: a simple web based way for a functional department to create/edit multilingual text documents (probably tagged with customizable semantic tags).
The containing Texts are used in an RIA showing statistical data and infos about it. This infos and other user visible Stings should be fully managed by functional department.
the destination of the this texts/documents is an embedded apache derby db - delivered together with RIA release (as zip-File,- the texts are static).
So on the other hand the cms (if this is an cms) should provide an interface to export the data - either a simple db-structure to get data via jdbc or a java api.
so what cmc/?? do you suggest for this usecase
thx in advance
Maybe you could use a java web framework like Tapestry to create a simple web application.
It has some premade components too easily modify and save data to a database.

Import custom protocol into MS Excel / Access

I have a standalone Java application capable of replaying a time series of data records. Communication with the server is performed using a bespoke binary wire protocol over TCP/IP.
We have a requirement to be able to easily import data records from this application into MS Excel / Access and I am interested in the recommended way to do this.
One idea we're exploring is to write a web "wrapper" service (also in Java) that will communicate with the underlying server and then translate the binary data into a more friendly text format for consumption by Excel / Access. However, the drawback here is that we lose any type information associated with each field in a given record.
I've briefly looked into writing custom ODBC / OleDB drivers but this seems complex and is probably overkill for what we're trying to achieve.
Can anyone recommend any other approaches?
How about xlloop? http://xlloop.sourceforge.net/
Uses an Excel plugin to connect to a function server, where you can create your own functions.
You may connect with an Access Database via the JDBC/ODBC Bridge driver.
From your previous comments I assume that you need to serve dynamic/changing data. If that is the case then take maybe the IRtdServer interface and this article referring to Excel. Its a COM Interface so you probably will need something like Com4j

Categories