Why not use SpringBoot? #2
-
|
Hi ! I am still trying to get my head around how Alpaca drivers are supposed to work and what I have gathered so far, is that each "driver" is actually its own server that runs on local network and then Alpaca Management gathers all the drivers on the network and makes them available to "user" app... I just got EduSnap which is small telescope with attached camera, intended for Astrophotography (I imagine only for beginners) with at the moment only proprietary app which can use it, but since this is kickstarter project, I am hoping that creators would be open to other people creating Alpaca driver or making it themselves... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
There's a couple reasons I didn't go with Spring Boot. I was already extremely familiar with JAX-RS web services APIs from work, and the microprofile APIs include JAX-RS. Also, Microprofile is a "standard" and there must be half a dozen implementations to choose from. I wanted the developer to have flexibility to chose the implementation that best aligned with their needs. I chose Quarkus as it seemed to have the most momentum right now, and is very lightweight compared to the others I checked with. It's startup speed is impressive and is designed for microservices in mind. It also is setup to use GraalVM to compile your application to a native application if you desire. I did verify that Alpaca4J works with Helidon, another Microprofile framework. My feeling is that using Java for Alpaca driver development makes most sense when implementing drivers for devices that have some sort of network or file based native driver. Most hardware devices export a native API, which would be a real pain to use from Java. I implemented ObservingConditions and SafetyMonitor drivers. My home weather station had a mechanism to push updates to an HTTP URL, so it was easy work for a Java based service as it didn't directly talk to the hardware. Another approach might be to suck the current observing conditions from some web based service like Weather Underground. My hope is that new Astro hardware starts embedding Alpaca drivers directly on the hardware. I could imagine a camera that implements the Alpaca Camera device and had WiFi, so any machine on the network could directly interface with the camera. I'm currently building a homebrew motorized flat panel and it'll take that approach, using an embedded Raspberry Pi Zero with WiFi. It would only need a power cable, and I'm considering slapping a battery in there so you wouldn't even need that. Though in this case I'll probably use the Python Alpaca framework. Python has tons of support in the embedded space, making it a great choice if you want to run on a small microcontroller. Had the python implementation existed back when I wanted to create my Alpaca driver for my weather station, I probably would have just used that. I didn't know Python at the time so I went with what I knew. |
Beta Was this translation helpful? Give feedback.
There's a couple reasons I didn't go with Spring Boot. I was already extremely familiar with JAX-RS web services APIs from work, and the microprofile APIs include JAX-RS. Also, Microprofile is a "standard" and there must be half a dozen implementations to choose from. I wanted the developer to have flexibility to chose the implementation that best aligned with their needs. I chose Quarkus as it seemed to have the most momentum right now, and is very lightweight compared to the others I checked with. It's startup speed is impressive and is designed for microservices in mind. It also is setup to use GraalVM to compile your application to a native application if you desire. I did verify that…