Alessandro Pagnin (@alepane) header
Alessandro Pagnin (@alepane) profile picture
Curtarolo, Padova, Italia
Joined January 2007
Photo by Alessandro Pagnin (@alepane)Photo by Alessandro Pagnin (@alepane)Photo by Alessandro Pagnin (@alepane)Photo by Alessandro Pagnin (@alepane)Photo by Alessandro Pagnin (@alepane)Photo by Alessandro Pagnin (@alepane)Photo by Alessandro Pagnin (@alepane)Photo by Alessandro Pagnin (@alepane)Photo by Alessandro Pagnin (@alepane)
gRPC is better to implement Microservices than GraphQL, but GraphQL is better to expose a set of Microservices to the web. Cosmo Connect combines them and gives you the best of both worlds. 1. Define your GraphQL Schema 2. generate a service proto definition 3. implement the gRPC service How did we come up with this approach? At WunderGraph, we're a heavy user of Go. It's a great language, but it also has its limits. For example, generics are very weak in Go, so a lot of workflows rely on code generation. One tool that we're all familiar with is gqlgen, maintained by Steve Coffman. It's probable one of the best and most widely used implementations of GraphQL with Federation support, at least in the Go community. The workflow is very simple. 1. Define your GraphQL Schema (sounds familiar) 2. generate Go stubs 3. implement Go stubs As much as we liked this workflow, not everyone can use it, not every code base is written in Go, and not every company has the required skills. So why not stick to the workflow, but make it more generic, so it can be used by everyone, any language, any framework? That's where gRPC comes into play. But what sounds simple, actually was a real challenge. Frameworks like gqlgen do a lot more than just generating stubs and calling them. They handle the complexity of GraphQL, like parsing, validation, execution, etc... The solution? We moved the complexity of GraphQL into Cosmo Router and kept the "Subgraph" contract as simple as we can. In a nutshell, we only create so called "loader" functions for our Services. They execute Queries or Mutations, or look up entities to resolve additional fields. Problems like batching, authentication, authorization, etc. we're all handling in the Router. At the service layer, it's really just business logic and data loading. That not just makes your service layer very slim in the sense that it's very little code, it's also just super lightweight. Isn't that perfect for LLMs to work with? Very little complexity, strictly typed contracts. Much easier to test compared to a regular GraphQL Subgraph. What's the most powerful feature of all? We can now add new capabilities to Cosmo Router, like for example Caching, and everyone immediately benefits, independent of language or framework. Even if you're running on Python or Ruby, all you did was implement loader functions. If Apollo wanted to implement a new super powerful directive, they'd have to get all Subgraph frameworks to adopt and maintain it. With Cosmo Connect, we just add it to the Router. We're now able to independently innovate at our own pace.
1
2
5
225
Cosmo Connect is here! Federation for any API, not just GraphQL.
1
4
2
12
987
What's a good workflow to propose schema changes? It's a tradeoff between autonomy and governance, but we cannot skip it. We've talked a lot with our customers and the community about their approaches to schema changes. Some use GitHub Pull Requests, some use tools like Miro or even Google Docs or Confluence to discuss changes. But all of these solutions have their problems. The tools are not designed for the job. GitHub is great to track code changes and review them, but it's not designed to manage Schema over time. You can build something on top of GH, but it will never be great. Miro, Google Docs, Confluence & similar tools come with a different set of challenges. Although they make realtime collaboration much easier, they are not designed for this kind of problem. It can take an engineer multiple hours to set up a Miro board for a Schema discussion, but after a week or so, other changes made the board outdated and obsolete. We've looked at all the existing tools and workflows our customers used and added a spark of "Vercel Previews". The outcome? Design schema collaboratively in realtime, combined with async threads and a Pull Request style review process. Instead of just checking composition, breaking changes, linting, etc. we're also verifying that there are no open threads. It's a simple but powerful approach to ensure that all relevant stakeholders that the schema change is acceptable.
1
2
2
168
Alessandro Pagnin retweeted
Google just launched VideoPoet, and it's insane It's literally ChatGPT for: - Text-to-Video - Image-to-Video - Inpainting - Video Editing Here're 10 wild examples:
163
1,641
112
10,576
3,224,744
Alessandro Pagnin retweeted
Fun fact: even monkeys do not eat the banana fibrous threads and they accurately remove them before eating the fruit. [📹 jlatosha] teapaw.org/SwiftlyWild/status/169…
582
3,842
926
43,943
5,900,397
352
7,633
412
77,603
6,018,384
Alessandro Pagnin retweeted
Always happens
34
537
59
6,251
946,447
Alessandro Pagnin retweeted
Don't you have a pointless meeting to schedule?
196
3,520
412
29,929
5,351,493
Alessandro Pagnin retweeted
Replying to @elonmusk
Ok last one I promise
21
62
9
284
93,429
Alessandro Pagnin retweeted
This is the scariest tweet I've made in a long time. On Friday I met with a psychiatrist, @MundinMd and did a 30 minute session, where I was her patient. These are the notes that the system she was using, which uses @OpenAI's GPT as back end, made. Wow. Thread:
188
399
144
2,226
1,412,784
Alessandro Pagnin retweeted
110
2,586
113
36,230
4,504,740
Alessandro Pagnin retweeted
146
4,977
312
37,556
1,983,358
Alessandro Pagnin retweeted
+1 for grouping similar topics
33
1,525
97
7,803
Alessandro Pagnin retweeted
me: i finished and shipped the feature! project manager: did you update jira? me: no
9
70
4
684
66,316
Chef PinkPr was on a flight when he looked outside his window to witness @SpaceX launch of Falcon 9 @elonmusk 🤯
217
1,917
150
18,600
3,196,607
Alessandro Pagnin retweeted
It’s always like this.
4
44
4
124
Alessandro Pagnin retweeted
Software developers to QA engineers: teapaw.org/i_zzzzzz/status/157273…
Still one of the funniest things I've ever seen
1
6
1
20
Alessandro Pagnin retweeted
Piyomaru struggles to unsheathe a sword.
居合NG動画ピヨ、全然抜けなくて(´・ω・`)ピヨ💦
4
48
4
302
Alessandro Pagnin retweeted
Move 🔎findbar to top @firefox about:support > Open profile folder > create chrome/userChrome.css .browserContainer > findbar { -moz-box-ordinal-group: 0; } about:config > search for 'userprof' > enable 'toolkit.legacyUserProfileCustomizations.stylesheets' restart Firefox
1
1
Alessandro Pagnin retweeted
However, seeing the queen #Elizabeth and the king #Federer in the same day is quite something. Only in #London 🇬🇧 #RemembranceDay #NittoATPFinals