HN user

slashdotdash

913 karma
Posts40
Comments62
View on HN
medium.com 4y ago

Supercharging our event-sourcing capabilities with Phoenix LiveView

slashdotdash
4pts0
www.theargus.co.uk 5y ago

UK Covid-19 data underreported due to file size limit exceeded

slashdotdash
134pts22
blog.timescale.com 5y ago

Tips to improve PostgreSQL Insert performance

slashdotdash
1pts0
www.bbc.co.uk 6y ago

Elon Musk aims to revolutionise battery technology

slashdotdash
28pts19
mattbearman.svbtle.com 6y ago

Why I sold my startup for £100k

slashdotdash
2pts0
stressgrid.com 6y ago

Webserver Benchmark: Erlang vs. Go vs. Java vs. Node.js

slashdotdash
35pts7
www.bbc.co.uk 6y ago

The Missing Cryptoqueen

slashdotdash
1pts0
m.youtube.com 6y ago

Autonomous vehicles and Transport as a Service (TaaS) will end car ownership

slashdotdash
4pts2
www.trustnodes.com 6y ago

Linus Torvalds Won’t Say If He Invented Bitcoin

slashdotdash
4pts3
twitter.com 7y ago

Don't build a side project entirely dependent upon a third party API

slashdotdash
2pts0
stressgrid.com 7y ago

Achieving 100k connections per second with Elixir

slashdotdash
544pts110
www.colinsteele.org 7y ago

How We Built an Online Travel Agency Using Amazon, Clojure, and a Small Team

slashdotdash
4pts0
developer.procurios.com 7y ago

An event sourcing first-timer's retrospect

slashdotdash
1pts0
blogs.msdn.microsoft.com 8y ago

Microsoft Visual Studio Team Services (VSTS) failure postmortem

slashdotdash
1pts1
medium.com 9y ago

5 simple mistakes to avoid when starting up

slashdotdash
1pts0
news.ycombinator.com 9y ago

Ask HN: What to build using a bank account API?

slashdotdash
2pts2
particular.net 9y ago

Put your events on a diet in an event-driven architecture

slashdotdash
2pts0
medium.com 9y ago

Are you a victim, neutralizer, or transformer of constraints?

slashdotdash
1pts0
medium.com 9y ago

Improving Stack Overflow jobs search with machine learning and R

slashdotdash
154pts17
github.com 9y ago

Exemplary fullstack Medium.com clone powered by React, Angular, Node, and more

slashdotdash
2pts1
philipwalton.com 9y ago

How we track pageviews is all wrong

slashdotdash
6pts0
news.ycombinator.com 9y ago

Show HN: Building a CQRS/ES web application in Elixir using Phoenix

slashdotdash
3pts3
10consulting.com 9y ago

Building a CQRS/ES web application in Elixir using Phoenix

slashdotdash
2pts1
elm-lang.org 9y ago

Blazing Fast HTML: Elm vs. React vs. Angular vs. Ember

slashdotdash
100pts54
dockyard.com 9y ago

Phoenix Channels vs. Rails Action Cable

slashdotdash
12pts1
samsaffron.com 10y ago

Fixing Discourse performance regressions, Rails profiling and debugging

slashdotdash
1pts0
www.youtube.com 11y ago

Angular 2.0 Core by Igor Minar and Tobias Bosch at Ng-europe 2014

slashdotdash
4pts0
bahmutov.calepin.co 11y ago

From procedural to reactive JavaScript

slashdotdash
2pts0
www.dwmkerr.com 12y ago

Better Specifications: using Markdown and GitHub Pull Requests

slashdotdash
1pts0
blog.testdouble.com 12y ago

Breaking up (with) your test suite.

slashdotdash
1pts0

I enabled the 80% charge limit from day one (September 2023) and after 159 cycles it is still at 100% maximum capacity.

I think it is also crucial to not allow deep discharge of the battery too frequently. Ideally keep the battery charge in the range of 40-80%. My usage is relatively low so I am mostly within that range.

Infrequently I have charged to 100% for longer days away from home. Enabling low power mode helps to prolong battery life on these occasions too.

The Spider’s Web is a documentary film which covers this subject in detail. Well worth watching if you have an interest in finding out more.

“An investigation into the world of Britain’s secrecy jurisdictions and the City of London. Today, up to half of global offshore wealth may be hidden in British offshore jurisdictions and Britain and its offshore jurisdictions are the largest global players in the world of international finance.”

http://spiderswebfilm.com/

Vehicle to grid may actually improve battery health and keep them healthier for longer.

“This new research into the potentials of V2G shows that it could actually improve vehicle battery life by around ten percent over a year.”

This requires intelligent usage where the battery state of charge is kept within a limited window, not fully charged or drained.

[1] https://warwick.ac.uk/newsandevents/pressreleases/clean_ener...

[2] https://www.sciencedirect.com/science/article/pii/S036054421...

For anyone interested in event sourcing with the actor model I've built an open source Elixir library called Commanded (https://github.com/commanded/commanded) which takes advantage of Erlang's BEAM VM to host aggregate processes. There's also an event store implemented in Elixir which uses Postgres for storage (https://github.com/commanded/eventstore).

The actor model provides the guarantee that requests to a single instance are processed serially, while requests to different instances can be processed concurrently. Distributed Erlang allows these instances to be scaled out amongst a cluster of nodes with transparent routing of commands to the instance, regardless of which connected node it is running on.

In Elixir and Erlang, the OTP platform provides the building blocks to host an aggregate instance as a process (as a `GenServer`). Following the "functional core, imperative shell" style I model the domain code as pure functions with the host process taking care of any IO, such as reading and appending the aggregate's events.

In reality, it's impossible for a households to get a contract that follows market rate, you always pay the same per kWh no matter if it's Sunday or Monday, windy or calm.

In the UK you can use the Agile tariff from Octopus Energy (https://octopus.energy/agile/) which has half hourly dynamic pricing per electricity kWh. The next 24hrs worth of prices are released each day around 4pm and follow market cost. There’s a 12p/kWh surcharge between 4pm and 7pm during peak demand. Used in conjunction with a smart meter it bills per half hour usage and can go negative.

Twice in the last two week’s it has gone below zero due to recent storms. It’s a great tariff if you have an electric car to charge in the early hours when prices are cheapest and can reduce usage during the peak three hours. A home battery would also help out as it could be charged during cheap periods and discharged when prices are too high.

Alberto Brandolini’s “Introducing EventStorming” [1] book is worth reading, even in its incomplete state, to understand the approach from its author.

There aren’t too many concepts to understand, it almost feels too simple to be of any value. But in all of the sessions I’ve been involved with participants have come away with a better understanding of the domain and often a useful model to begin working from.

[1] https://leanpub.com/introducing_eventstorming

Specialized ANGi is a Bluetooth hardware dongle that attaches to your helmet and will allow a contact to live track your ride (using Specialized’s app on your smartphone) and can also detect crashes and automatically send a text message to a contact. It’s available to purchase on its own or included with many Specialized helmets. I have one on a new MTB helmet after a recent crash on a trail.

https://www.specialized.com/us/en/angi

I’ve personally suffered the same fate as Relive with Strava cutting off access to their API for a side project of mine [1]. They gave me twenty minutes notice via email before disabling access and effectively killing my app.

Ostensibly the reason was due to competing with a feature that Strava intend to build themselves (“thanks for proving the demand”). This was back in March, I’ve since been informed that access won’t ever be reinstated so have open sourced the code [2].

Lesson learnt, don’t depend entirely on third party APIs.

[1] https://segmentchallenge.com/

[2] https://github.com/slashdotdash/segment-challenge

The remainder of the U.K., outside of London, has a larger dependency on the EU. These regions will suffer disproportionately more than London.

"In particular, Northern Ireland (the UK’s poorest region), the North East (England’s poorest region) and the South West (Southern England’s poorest region) appear to be the most dependent on the ability of the UK to trade in goods with relatively few restrictions with other EU countries." [1]

[1] "UK regions, the European Union and manufacturing exports" http://speri.dept.shef.ac.uk/wp-content/uploads/2016/05/Brie...

For anyone curious about Phoenix and Elixir, I can sincerely recommend the following resources to get you started:

- Programming Phoenix by Chris McCord, Bruce Tate, and José Valim [1]

- The Little Elixir & OTP Guidebook by Benjamin Tan Wei Hao [2]

- Elixir in Action by Saša Jurić [3]

Phoenix initially attracted me to Elixir, I've stuck around for that and the OTP platform: pattern matching, process based concurrency (actor model), supervision, immutability, macros, and more.

"Elixir took the Erlang virtual machine, BEAM, and put a sensible face on it. It gives you all the power of Erlang plus a powerful macro system." – Dave Thomas

[1] https://startlearningelixir.com/r/programming-phoenix

[2] https://startlearningelixir.com/r/the-little-elixir-and-otp-...

[3] https://startlearningelixir.com/r/elixir-in-action

It's taking the concept of TodoMVC, and extending it further.

See how the exact same Medium.com clone (called Conduit) is built using any of our supported frontends and backends. Yes, you can mix and match them, because they all adhere to the same API spec.

Choose any frontend (React, Angular 2, & more) and any backend (Node, Django, & more) and see how they power a real world, beautifully designed fullstack app called "Conduit".

Economists have been saying for years that the UK economy is too heavily weighted towards finance. We now have an opportunity to resolve that.

But the cause of this issue is not due to being a member of the EU; other member states have more balanced economies. Can you explain what has prevented successive UK governments from addressing this imbalance, yet will now be resolved by Brexit?

To address the concern with changing "immutable" events. I've just built a migrator [1] tool for my PostgreSQL-based event store. It implements the copy & transform migration strategy. The source event store database is untouched. Transformed events are written out to a separate database.

It uses Elixir streams to provide composable transforms to rewrite, aggregate, remove, and alter serialization format of events.

[1] https://github.com/slashdotdash/eventstore-migrator

If CQRS/ES wants to make it into mainstream it needs to think about tooling.

I agree with this entirely. CQRS/ES applications really help from tailored tooling. Tracking chains of events using correlation and causation identifiers. Auditing commands. Projecting events out to datastores like Elasticsearch. Then using Kibana[1] to create dashboards to drill down into the data. I'd like to go into this in more detail in the future. Revisit this case study after 6-12 months and describe the pitfalls, and countermeasures. Identify tools that allow you to monitor the system proactively.

[1] https://www.elastic.co/products/kibana

Pushing read model updates back to the client using a two way communication channel is one technical solution. I want to experiment with using Phoenix channels[1] to solve this. I think that has potential for easing the UI/UX concerns. You post a command from the web front-end and subscribe to receive updates for the read model you're looking at. Domain events can drive the client notification.

[1] http://www.phoenixframework.org/docs/channels

I'm the original author. Any application built following the CQRS/ES pattern requires development of the same building blocks: command registration and dispatch; hosting and delegation to aggregate roots; event handling; long running process managers.

I built Commanded as a self-contained, reusable, open-source library. With the goal of demonstrating one approach to implementing the pattern using Elixir. I hope it provides some use. That's why I've written up the case study. Anyone can take the code as is, to bootstrap their own application. Use it as a learning tool, take away the good ideas. Rebuild and improve upon the bad.

I received a pull request only today adding support for Greg Young's event store. That's going to broaden the appeal.