The process for making webapps in Rust seems extremely clean compared to other languages (or maybe I'm not exposed enough but I remember making things with Golang and even just JS was torture with common hosting solutions). Props to shuttle.rs and the Rust community!
> I remember making things with Golang… was torture with common hosting solutions)
I want to make sure I understand this: You made a VCALENDAR generator with a web-accessible endpoint. It fills in the VCALENDAR with info passed in via URL parameters. And rather than returning a webpage, it just returns the VCALENDAR file. So you send your friends the link, they click it, rather then returning text/html content, it returns a downloadable response consisting of a pre-filled VCALENDAR file with the co…
Do you even need a service for this? Couldn't this be a simple static HTML + minimal JS that opens a base64 URL with content-type "text/x-vcalendar"?
Not sure I understand because that's what it is basically. The Rust part is just for the routing; it decides whether to serve the form or the generated calendar file.
I want to make sure I understand this: You made a VCALENDAR generator with a web-accessible endpoint. It fills in the VCALENDAR with info passed in via URL parameters. And rather than returning a webpage, it just returns the VCALENDAR file. So you send your friends the link, they click it, rather then returning text/html content, it returns a downloadable response consisting of a pre-filled VCALENDAR file with the co…
That's correct.
Sorry but how is it serverless? Is it a static HTML file with JS that does the job? Isn't there a server that the request goes to?
Looks cool but...why not just send the .ics file directly via your IM of choice? Am I missing something here? I don't see the benefit if you still have to click, open file in your calendar, add it to the calendar. Can you tell me why the above wouldn't work and why this is better?
You could do that but you'd have to create the ics file manually and not every platform allows you to share ics files. My original use-case was Github. Wanted to share invites for https://github.com/hello-rust/community. Github prevents sharing ics.
Another thing is that people could edit a link in-place to e.g. update the time without creating a new file.
Sorry but how is it serverless? Is it a static HTML file with JS that does the job? Isn't there a server that the request goes to?
Good question. It depends on your definition of serverless. Strictly speaking there is no serverless, there's always some infrastructure somewhere.
However the calendar file gets created out of thin air from the GET parameters alone. There is no state or storage involved. Other calendar apps have a backend with a DB; this one doesn't.
Now whether that counts as truly serverless is up to you I guess. It's as close as you could get with a calendar I'd say. Not easy to get the point across in a title. ;) Hope that helps.
Sorry but how is it serverless? Is it a static HTML file with JS that does the job? Isn't there a server that the request goes to?
Good question. It depends on your definition of serverless. Strictly speaking there is no serverless, there's always some infrastructure somewhere. However the calendar file gets created out of thin air from the GET parameters alone. There is no state or storage involved. Other calendar apps have a backend with a DB; this one doesn't. Now whether that counts as truly serverless is up to you I guess. It's as close as…
serverless is when you save the state but don't keep a machine sitting around when there are no requests, so you'd keep your calendar state in a hosted db and when someone asks for the calendar, a thread spins up and creates the calendar from the state and then disappears until there is another request. This is basically the exact opposite of serverless
The process for making webapps in Rust seems extremely clean compared to other languages (or maybe I'm not exposed enough but I remember making things with Golang and even just JS was torture with common hosting solutions). Props to shuttle.rs and the Rust community!
> I remember making things with Golang… was torture with common hosting solutions) What made it difficult to deploy Go apps?
I did it around 2 years ago: the web solutions were not very mature and it was poorly supported (but that's my subjective experience)
Speaking of zerocal, have you ever noticed that low calorie packaged foods like pickles and cauliflower will put tiny serving sizes on the package so they can advertise 0 calories? I think they round down to zero when it's less than 5 calories.
Yep. Another suspect of this is cooking oil spray, like Pam. They can advertise very low calories, usually 0, per serving but a serving is considered like 1/3 of a second spray.
Good question. It depends on your definition of serverless. Strictly speaking there is no serverless, there's always some infrastructure somewhere. However the calendar file gets created out of thin air from the GET parameters alone. There is no state or storage involved. Other calendar apps have a backend with a DB; this one doesn't. Now whether that counts as truly serverless is up to you I guess. It's as close as…
serverless is when you save the state but don't keep a machine sitting around when there are no requests, so you'd keep your calendar state in a hosted db and when someone asks for the calendar, a thread spins up and creates the calendar from the state and then disappears until there is another request. This is basically the exact opposite of serverless
This can easily run on Cloudflare workers, you don't even need a server