Trying to get Cesium to interact with messages from RabbitMQ

Hi all! First post here.

I’m pretty well versed in Java and Python, but new to Node.js and I’m putting together an app that can interact with messages from a friends AMQP bus.

I might have over-complicated things by choosing to use Vite as the base for the project, but I figured it would take care of a lot of the structuring and possibly simplify the process of keeping dependencies straight - so I chose to move forwards with it (possibly a mistake?)

After a bit of browsing I was able to find GitHub - CesiumGS/cesium-vite-example: The minimal recommended setup for an application using Cesium with Vite. and clone it to a new repo - aaaaand that’s as far as I’ve gotten.

I have a browser that displays the interactive CesiumJS map, and my project is (ostensibly) well-structured… but now I don’t really know what the next step is.

I’m locked into needing it to receive messages from AMQP (Specifically RabbitMQ), and according to our good friend Charles GPT the next step is to jump to Node.js or Python to come up with some back-end code.

I’m better-versed in Python and have come up with a simple Client + Server program pair in the past, and used web sockets to communicate between programs before, but that was Python → Python, and I’m not sure how much bigger of a beast this will be.

I’m also curious if the Node.js or Python route is the better route - maybe Node.js (the front end also being Node.js-based) will have an easier time interfacing with my front end?

Finally… I’m completely lost as far as the structure of this thing. If I were in Java, I’d be looking for the public static void main(String[] args) method (or whatever the entry point is, if there’s custom run/debug options that point to a different entry point) and I would know how to add logic there, or in an imported class - and, for that matter, I would know how to import classes and how to add new dependencies to my project in the first place… no dice here; this is all new.

I guess the major questions are:

  • where should I begin looking to add more logic to this thing? (e.g.: on receive message, display a text box with the contents of the message)
  • if I were to add new dependencies, is that as simple as npm install <new dependency> or are there other considerations? Once a dependency is added, is there some black magic I should be aware of when importing it into a working file?
  • If/when I get a primitive (either python-based or Node.js-based) “back-end” shooting messages out to the appropriate localhost port, what does receiving that message on the Cesium-side of things look like?

Sorry for the bombardment of questions; I recognize I’m a bit in over my head, but I figure asking for expertise and suggestions is the best way to speed things up. Thanks in advance for any responses and attempts to help out.

Hi @Drew_Bruggman,

Thanks for your post and welcome to the Cesium community.

It sounds like you are embarking on building a web application that will use Cesium and talk to an external service. These forums are mostly focused on providing help specific to CesiumJS, so I think a better place to start would first be tutorials on building frontend web applications with npm to pick up the general strategy. And then follow that up with tutorials on getting the frontend to talk to a backend server, which as you alluded to can be node.js, python, or whatever you are most comfortable with. You should plan for the RabbitMQ service to communicate with your server.

Once you get the hang of general application development, you should see pretty quickly how you can install and use packages like Cesium in your app, and then I suggest checking out our learning resources to see more about what you can do with the digital globe CesiumJS – Cesium

Good luck getting started with your project and let us know if you need help getting cesium working with your setup.
Thanks,
Luke

1 Like