Live data from Hacker News

Phoenix 1.6, RC0 released

phoenixframework.org

51–60 of 62 posts

Re: Phoenix 1.6, RC0 released

#51
post #43
post #40

Earlier quoted context omitted.

Hi Chris Excited to see in this thread you joining fly.io Can talk about what (if) any plans exist to make deploying Phoenix apps at fly easier. Said another way, I’d love to click a button to deploy my app to be (a) globally distributed, (b) managed global database, (c) managed operating systems, (d) managed dns. Basically heroku for Phoenix (and more)

Yes! What you're describing is important, and roughly matches what we want for all apps. Managing apps + databases across multiple regions should be as simple as `fly region add syd`. This takes like 5 steps right now, it should take one. We're also improving the Phoenix deploy process. I don't like it when people have to see Dockerfiles. Modern app deployment needs frameworks and infrastructure to work together. Our…

That’s really exciting to hear.

A few follow-ups:

a. Will pre-prod environments be included in those plans you outlined above (eg Dev, Test, Stage)

b. Any plans to make it easier on Developers to have local/remote environments for development? (Eg GitHub Codespaces)

c. Do customers typically also use 3rd party security offerings like Cloudflare in conjunction with fly.io - or do you see more customer just using fly.io without any additional protection?

d. One thing that Cloudflare Workers does that’s interesting is that it deploys your webasm code to every pop/region they have & them orchestrate the communication between the regions to keep data consistent. Is similar functionality on roadmap?

e. Any rough order of magnitude on timing for what you described?

Re: Phoenix 1.6, RC0 released

#52
post #50
post #46

Earlier quoted context omitted.

We have a multi-region Liveview demo here: https://liveview-counter.fly.dev/ The total cost to run this is on Fly.io is $38/mo (~$2/mo per region). We've seen as many as 10k concurrent users pushing 30k "clicks" per second. People are fond of writing JavaScript in their browser console to simulate very fast clicks, so it turned into a funny stress test. My browser slowed down, the Elixir processes never did.

Thanks, I remember seeing that one a few months ago. I hope this doesn't come off too harshly but that demo feels like it's meant to showcase high requests per second, not be a representation of how a real application would perform. It's broadcasting a counter over a websocket connection. It feels very similar to the old 2 million websocket connection demo. In other words I can't use your demo to make a meaningful co…

It's not too harsh at all! The demo is really meant to show liveview interaction latency, we didn't really ever think it would be useful for load.

That 300ms load time is actually because it queries Australia when you first load the page. Each region keeps its own counter and it grabs the current value from all of them at load time. It's probably worth optimizing that. :)

Re: Phoenix 1.6, RC0 released

#53
Yesterday we launched a big feature built using Elixir/Phoenix/LiveView/Surface and it has been really great.

We are a SAAS for managing sports teams and clubs https://www.sportmember.com and our current stack is Ruby on Rails, GraphQL and React Native for our app.

When deciding to develop this new feature we narrowed it down to these two options:

1) Rails/GraphQL/React

2) Elixir and LiveView

What's great about Elixir and LiveView is

1) The whole GraphQL API layer was not necessary to build. The best API is no API ;-)

2) No need to duplicate code like for example for validation on the frontend and the backend

3) Developing the whole feature using just Elixir instead of having to switch between TypeScript and Ruby

This means that we have been able to develop this feature in about 2/3 of the time which is pretty nice!

Re: Phoenix 1.6, RC0 released

#54
post #28

Looks good. In one of the HEEx examples in this post it mentions components and uses a weather component as an example with: I'm curious, what would the syntax look like if you wanted to create something like a card component that has an optional header, body and footer where you would want your arguments to be blocks of arbitrary HTML that you pass in and not a single string variable? Basically a way to do something…

I think this might be what you are looking for: https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#...

Re: Phoenix 1.6, RC0 released

#55
post #51
post #43

Earlier quoted context omitted.

Yes! What you're describing is important, and roughly matches what we want for all apps. Managing apps + databases across multiple regions should be as simple as `fly region add syd`. This takes like 5 steps right now, it should take one. We're also improving the Phoenix deploy process. I don't like it when people have to see Dockerfiles. Modern app deployment needs frameworks and infrastructure to work together. Our…

That’s really exciting to hear. A few follow-ups: a. Will pre-prod environments be included in those plans you outlined above (eg Dev, Test, Stage) b. Any plans to make it easier on Developers to have local/remote environments for development? (Eg GitHub Codespaces) c. Do customers typically also use 3rd party security offerings like Cloudflare in conjunction with fly.io - or do you see more customer just using fly.i…

Our database roadmap is:

1. Self service snapshots/restores

2. Get it out of beta

3. Single command database and apps management

My time estimates are always wrong, but that feels like 3 months.

The really slick Phoenix release process is going to happen in parallel but it's hard to say when.

Re: Phoenix 1.6, RC0 released

#56
post #28

Looks good. In one of the HEEx examples in this post it mentions components and uses a weather component as an example with: I'm curious, what would the syntax look like if you wanted to create something like a card component that has an optional header, body and footer where you would want your arguments to be blocks of arbitrary HTML that you pass in and not a single string variable? Basically a way to do something…

I think this might be what you are looking for: https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#...

Thanks, I think that would very likely handle the basic case of having 1 block.

But in a re-usable card component you might decide to have a title, body and footer block where the footer is optional and perhaps falls back with a default value if it's undefined. Slots with Surface handle this use case based on their docs. I think there's a lot of component use cases where you'd want the idea of having multiple blocks.

The docs you linked don't cover if HEEx supports anything like that, or being able to use multiple named blocks in 1 component. I tried to read the source but render_block is a macro and I couldn't proceed to trace it.

Re: Phoenix 1.6, RC0 released

#57
post #23

Earlier quoted context omitted.

It's worked out really well for us at PepsiCo, it's basically our go to for in house application development on the eCommerce side. We'll be hiring some elixir devs again soon.

Would you happen to know if you (the company) hire international candidates?

We're not hiring any FTEs outside of the US yet, but we probably will in 2022. Keep an eye out, there should be some interesting stuff coming up in the future.

Re: Phoenix 1.6, RC0 released

#58
Follow-up question: having built a mobile app backend on Phoenix (with Channels) and having played a bit with Absinthe and LiveView -- is there a future of Phoenix that's focused not only on web but also mobile?

Re: Phoenix 1.6, RC0 released

#59
post #29

Earlier quoted context omitted.

When learning elixir and phoenix, it is hard to find updated tutorials. Whenever I try an youtube tutorial, there is always an error. Can you share some updated links/books for a beginner?

For liveview there's Programming Phoenix LiveView[1]. The stuff on https://pragmaticstudio.com should also be up to date. You can also check out the newsletter http://elixirweekly.net . [1] https://pragprog.com/titles/liveview/programming-phoenix-liv...

Thanks!

Re: Phoenix 1.6, RC0 released

#60
post #48

Earlier quoted context omitted.

Guessing a significant chunk is due to talent base.

The typical reaction to Elixir on my resume is still "we have a crazy Elixir person on our team too!"

Mine is "Elixir, what's that?".

Usually I reply something like "You know Discord?".

Post reply on HN