Guest
25 Jul 2012 12:44

I am new to Cobalt and I’m not clear on the capabilities of the Cobalt system.

Does Cobalt have the ability to pass data from Server-A to Server-B; i.e.: Server-to-Server communications?

If so, how do you send data from one Server to another Server – Post? Get? Other?

Do you have any examples of code?

Thanks

CRS

Last Modified: 12 Jan 2023


Sergey
Total posts: 13,748
25 Jul 2012 23:01

I would listen for your user case. It is hard to understand what you need without practical example.


Guest
27 Jul 2012 18:06

Here is a summary of what I want to do:

1) Server-A will send a unique User-ID to Server-B

2) Server-B will do a database lookup for the User-ID and fetch his transaction number

3) Server-B will then send the transaction number back to Server-A

4) Server-A will display the transaction number on a page – done!

If Cobalt can do the above described sequence, we can probably use Cobalt in our next project.

Thanks for your help

CRS


Sackgesicht VIP
Total posts: 1,636
28 Jul 2012 05:40

CRS,

you can do this with Cobalt. There are several ways to achieve it.

Assuming that the remote database is also a MySQL server, you have to make sure that it allows "remote connection", which is disabled by default.

There are a lot of tutorials for this on the internet, just use your preferred search engine with the keywords "Mysql remote connection".

One way to do it from cobalts site would be a modified template, which just queries the remote database with the unique userid and the result would be the transaction number. Then just display it on the desired position in your template. With this approach, you would always have a "real time" query to the second server, whenever the content is displayed.

Another approach would be using a customized field, which will either store the number or queries it also all the time when needed.

A new tutorial about customized fields was just released some days ago. Plaese see it here.


Guest
28 Jul 2012 13:26

Thanks for the response and example.

We were thinking about adding PHP code for sending/receiving data using JSON .

Is this possible with Cobalt? Are there any examples using PHP/JSON?

CRS


Sergey
Total posts: 13,748
28 Jul 2012 19:23

If you need SaaS or Web Service based solution, Cobalt is not what you need. I would even say Joomla is not wat you need.

But if it is ok that DB server works on its own format and protocols, then you may create Joomla DB on Amason DB service and connect to your Joomla installed on any other server.

But if you want to make queries to DB through something like RESTfull service and get result in JSON, I would only recommend to write small RESTful service.


hermanlamb
Total posts: 3
12 Jan 2023 01:31

The transaction number may be retrieved from the remote database by using the one-of-a-kind userid in conjunction with a changed template, which is one method for doing this task via Cobalt's website. Then all you need to do is show color by number in the location of your choosing inside your design. Using this strategy, you would always have a query to the second server running in "real time," regardless of whether or not the material is being shown.

Powered by Cobalt